- Issue created by @ptmkenny
- ๐ฏ๐ตJapan ptmkenny
The MR fixes as many of the simple issues as I could.
The remaining issues are as follows:
FILE: /var/www/html/web/modules/contrib/tome/modules/tome_static/src/Commands/StaticCommand.php ----------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ----------------------------------------------------------------------------------------------- 112 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead ----------------------------------------------------------------------------------------------- FILE: /var/www/html/web/modules/contrib/tome/modules/tome_sync/modules/tome_sync_autoclean/src/EventSubscriber/ExportEventSubscriber.php ---------------------------------------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ---------------------------------------------------------------------------------------------------------------------------------------- 116 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead ---------------------------------------------------------------------------------------------------------------------------------------- FILE: /var/www/html/web/modules/contrib/tome/modules/tome_sync/tests/src/Functional/BookTest.php ------------------------------------------------------------------------------------------------ FOUND 4 ERRORS AFFECTING 4 LINES ------------------------------------------------------------------------------------------------ 120 | ERROR | Missing parameter type 122 | ERROR | Missing parameter type 124 | ERROR | Missing parameter type 126 | ERROR | Missing parameter type ------------------------------------------------------------------------------------------------ FILE: /var/www/html/web/modules/contrib/tome/modules/tome_sync/src/JsonFileStorage.php --------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES --------------------------------------------------------------------------------------------- 25 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 32 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead --------------------------------------------------------------------------------------------- FILE: /var/www/html/web/modules/contrib/tome/modules/tome_sync/src/EventSubscriber/ConfigEventSubscriber.php ------------------------------------------------------------------------------------------------------------ FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES ------------------------------------------------------------------------------------------------------------ 42 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 55 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 67 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead ------------------------------------------------------------------------------------------------------------ FILE: /var/www/html/web/modules/contrib/tome/modules/tome_sync/src/Form/ImportPartialForm.php ---------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES ---------------------------------------------------------------------------------------------- 195 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 241 | WARNING | Unused variable $i. 242 | WARNING | Unused variable $j. 268 | WARNING | Unused variable $translation. ---------------------------------------------------------------------------------------------- FILE: /var/www/html/web/modules/contrib/tome/modules/tome_sync/src/Form/CleanFilesForm.php ------------------------------------------------------------------------------------------------------------------------------------------ FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES ------------------------------------------------------------------------------------------------------------------------------------------ 98 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 105 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 107 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 129 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 145 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead ------------------------------------------------------------------------------------------------------------------------------------------ FILE: /var/www/html/web/modules/contrib/tome/modules/tome_sync/src/Commands/DeleteContentCommand.php ---------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ---------------------------------------------------------------------------------------------------- 87 | WARNING | Unused variable $translation. ---------------------------------------------------------------------------------------------------- FILE: /var/www/html/web/modules/contrib/tome/modules/tome_sync/src/Commands/ImportCommand.php ---------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES ---------------------------------------------------------------------------------------------- 145 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 147 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 149 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead ---------------------------------------------------------------------------------------------- FILE: /var/www/html/web/modules/contrib/tome/modules/tome_base/tests/src/Kernel/TestBase.php ------------------------------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ------------------------------------------------------------------------------------------------------------------------------------------------- 39 | ERROR | Do not disable strict config schema checking in tests. Instead ensure your module properly declares its schema for configurations. -------------------------------------------------------------------------------------------------------------------------------------------------
I didn't handle the DI because I think that should be in a separate issue because it can break things. The other issues I wasn't sure how best to fix.
- Status changed to Needs review
about 1 year ago 3:43pm 1 May 2023 - Assigned to arpitk
- Status changed to Needs work
about 1 year ago 7:11pm 19 June 2023 - Issue was unassigned.
- Assigned to nitin_lama
- Open on Drupal.org โCore: 9.5.x + Environment: PHP 7.3 & MySQL 5.7last update
about 1 year ago Waiting for branch to pass - Issue was unassigned.
- ๐ฎ๐ณIndia nitin_lama
Fixed most of the errors/warning and committed changes on the MR. Remaining DI warning/errors are:
FILE: /home/system/Documents/contribution/tome-3339621/modules/tome_sync/tests/src/Functional/BookTest.php ---------------------------------------------------------------------------------------------------------- FOUND 4 ERRORS AFFECTING 4 LINES ---------------------------------------------------------------------------------------------------------- 120 | ERROR | Missing parameter type 122 | ERROR | Missing parameter type 124 | ERROR | Missing parameter type 126 | ERROR | Missing parameter type ---------------------------------------------------------------------------------------------------------- FILE: /home/system/Documents/contribution/tome-3339621/modules/tome_sync/modules/tome_sync_autoclean/src/EventSubscriber/ExportEventSubscriber.php -------------------------------------------------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE -------------------------------------------------------------------------------------------------------------------------------------------------- 116 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead -------------------------------------------------------------------------------------------------------------------------------------------------- FILE: /home/system/Documents/contribution/tome-3339621/modules/tome_sync/src/JsonFileStorage.php ------------------------------------------------------------------------------------------------ FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES ------------------------------------------------------------------------------------------------ 25 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 32 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead ------------------------------------------------------------------------------------------------ FILE: /home/system/Documents/contribution/tome-3339621/modules/tome_sync/src/EventSubscriber/ConfigEventSubscriber.php ---------------------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES ---------------------------------------------------------------------------------------------------------------------- 42 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 55 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 67 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead ---------------------------------------------------------------------------------------------------------------------- FILE: /home/system/Documents/contribution/tome-3339621/modules/tome_base/tests/src/Kernel/TestBase.php ------------------------------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ------------------------------------------------------------------------------------------------------------------------------------------------- 39 | ERROR | Do not disable strict config schema checking in tests. Instead ensure your module properly declares its schema for configurations. ------------------------------------------------------------------------------------------------------------------------------------------------- Time: 702ms; Memory: 10MB
- Open on Drupal.org โCore: 9.5.x + Environment: PHP 7.3 & MySQL 5.7last update
about 1 year ago Waiting for branch to pass - Assigned to priyanka_chauhan31
- Issue was unassigned.
- Status changed to Needs review
11 months ago 3:33pm 17 August 2023 - Open on Drupal.org โCore: 9.5.x + Environment: PHP 7.3 & MySQL 5.7last update
11 months ago Waiting for branch to pass - Open on Drupal.org โCore: 9.5.x + Environment: PHP 7.3 & MySQL 5.7last update
11 months ago Waiting for branch to pass - ๐ฎ๐ณIndia priyanka_chauhan31 Noida
Hi, Fixed some of the coding standard for it for branch- 8.x-1.x. Please review.
- ๐ฏ๐ตJapan ptmkenny
@priyanka_chauhan31 What did you fix? Also, please add your changes to the merge request. You can also add a patch, but multiple people have already contributed to the MR, so that should be the "upstream" for changes.
- Open on Drupal.org โCore: 9.5.x + Environment: PHP 7.3 & MySQL 5.7last update
10 months ago Waiting for branch to pass - ๐ฎ๐ณIndia priyanka_chauhan31 Noida
@ptmkenny
I have fixed some of the coding standard and inserted DI wherever it was possible. Attaching the above patch again. - Status changed to Needs work
10 months ago 1:18pm 4 September 2023 - ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
The warnings/errors are for 34 files, but the last patch changes 31 files.
Either the report shows more files than it should be corrected, or the patch corrects more files than necessary. - ๐ฏ๐ตJapan ptmkenny
@Shreyas gowda Please see my comment in #11:
What did you fix? Also, please add your changes to the merge request. You can also add a patch, but multiple people have already contributed to the MR, so that should be the "upstream" for changes.
- ๐ฎ๐ณIndia Preethy_ray
pray_12 โ made their first commit to this issueโs fork.
- Open on Drupal.org โCore: 9.5.x + Environment: PHP 7.3 & MySQL 5.7last update
5 months ago Waiting for branch to pass - Status changed to Needs review
5 months ago 7:31am 9 February 2024 - Open on Drupal.org โCore: 9.5.x + Environment: PHP 7.3 & MySQL 5.7last update
5 months ago Waiting for branch to pass - Open on Drupal.org โCore: 9.5.x + Environment: PHP 7.3 & MySQL 5.7last update
5 months ago Waiting for branch to pass - Status changed to Needs work
about 1 month ago 12:44pm 24 May 2024 - ๐ต๐ญPhilippines cleavinjosh
Hi @pray_12,
I applied MR!8, it applied smoothly.
However, I still encountered some issues after I ran
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml
.โ tome git:(ec6aae3) curl https://git.drupalcode.org/project/tome/-/merge_requests/8.diff | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 66000 0 66000 0 0 67883 0 --:--:-- --:--:-- --:--:-- 67901 patching file modules/tome_base/src/ProcessTrait.php patching file modules/tome_base/tests/src/Kernel/TestBase.php patching file modules/tome_base/tests/src/Unit/ExecutableFinderTraitTest.php patching file modules/tome_static/modules/tome_static_super_cache/tome_static_super_cache.module patching file modules/tome_static/src/Commands/StaticCommand.php patching file modules/tome_static/src/EventSubscriber/EntityPathSubscriber.php patching file modules/tome_static/src/EventSubscriber/RedirectPathSubscriber.php patching file modules/tome_static/src/Form/StaticGeneratorForm.php patching file modules/tome_static/src/RequestPreparer.php patching file modules/tome_static/src/StaticGenerator.php patching file modules/tome_static/tests/modules/tome_test/tome_test.routing.yml patching file modules/tome_static/tests/src/Kernel/CollectPathsEventTest.php patching file modules/tome_static/tests/src/Kernel/ModifyDestinationEventTest.php patching file modules/tome_static/tests/src/Kernel/ModifyHtmlEventTest.php patching file modules/tome_sync/modules/tome_sync_autoclean/src/EventSubscriber/ExportEventSubscriber.php patching file modules/tome_sync/src/CleanFilesTrait.php patching file modules/tome_sync/src/Commands/CleanFilesCommand.php patching file modules/tome_sync/src/Commands/DeleteContentCommand.php patching file modules/tome_sync/src/Commands/ExportCommand.php patching file modules/tome_sync/src/Commands/ExportContentCommand.php patching file modules/tome_sync/src/Commands/ImportCommand.php patching file modules/tome_sync/src/Commands/ImportCompleteCommand.php patching file modules/tome_sync/src/Commands/ImportContentCommand.php patching file modules/tome_sync/src/Commands/ImportPartialCommand.php patching file modules/tome_sync/src/ContentHasher.php patching file modules/tome_sync/src/ContentIndexerTrait.php patching file modules/tome_sync/src/Event/ContentCrudEvent.php patching file modules/tome_sync/src/EventSubscriber/BookEventSubscriber.php patching file modules/tome_sync/src/EventSubscriber/ConfigEventSubscriber.php patching file modules/tome_sync/src/Exporter.php patching file modules/tome_sync/src/FileSync.php patching file modules/tome_sync/src/Form/CleanFilesForm.php patching file modules/tome_sync/src/Form/ImportPartialForm.php patching file modules/tome_sync/src/Importer.php patching file modules/tome_sync/src/JsonFileStorage.php patching file modules/tome_sync/src/TomeSyncHelper.php patching file modules/tome_sync/src/TomeSyncServiceProvider.php patching file modules/tome_sync/tests/src/Functional/BookTest.php patching file modules/tome_sync/tests/src/Functional/ImportPartialFormTest.php patching file modules/tome_sync/tests/src/Kernel/FileSyncTest.php patching file modules/tome_sync/tests/src/Kernel/ImporterTest.php patching file modules/tome_sync/tests/src/Unit/Normalizer/ContentEntityNormalizerTest.php patching file modules/tome_sync/tests/src/Unit/Normalizer/EntityReferenceItemNormalizerTest.php patching file modules/tome_sync/tests/src/Unit/Normalizer/FieldItemNormalizerTest.php patching file modules/tome_sync/tests/src/Unit/Normalizer/UserEntityNormalizerTest.php patching file tests/performance/create_articles.php โ tome git:(ec6aae3) โ .. โ contrib git:(main) โ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml tome FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/tome/modules/tome_static/src/Commands/StaticPreviewCommand.php --------------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE --------------------------------------------------------------------------------------------------------------------------------- 62 | ERROR | [x] Expected newline after closing brace --------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY --------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/tome/modules/tome_sync/drush.services.yml ------------------------------------------------------------------------------------------------------------ FOUND 1 ERROR AFFECTING 1 LINE ------------------------------------------------------------------------------------------------------------ 41 | ERROR | [x] Expected 1 newline at end of file; 0 found ------------------------------------------------------------------------------------------------------------ PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------ FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/tome/modules/tome_sync/src/Form/ImportPartialForm.php ------------------------------------------------------------------------------------------------------------------------ FOUND 2 ERRORS AFFECTING 1 LINE ------------------------------------------------------------------------------------------------------------------------ 101 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter 101 | ERROR | [x] The closing parenthesis of a multi-line function declaration must be on a new line ------------------------------------------------------------------------------------------------------------------------ PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------------ FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/tome/modules/tome_sync/src/Commands/ImportCommand.php ------------------------------------------------------------------------------------------------------------------------ FOUND 2 ERRORS AFFECTING 1 LINE ------------------------------------------------------------------------------------------------------------------------ 93 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter 93 | ERROR | [x] The closing parenthesis of a multi-line function declaration must be on a new line ------------------------------------------------------------------------------------------------------------------------ PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------------ Time: 2.85 secs; Memory: 14MB โ contrib git:(main) โ
Thank you.
- Status changed to Needs review
about 1 month ago 12:58pm 24 May 2024 - Open on Drupal.org โCore: 9.5.x + Environment: PHP 7.3 & MySQL 5.7last update
about 1 month ago Waiting for branch to pass - ๐ต๐ญPhilippines cleavinjosh
I made a patch since the issues found can be fixed automatically by phpcbf.
Please review.
Thank you.
- ๐ฏ๐ตJapan ptmkenny
@cleavinjosh Thanks for working on this, but please add your changes to the MR; if you supply a patch, you need to also supply an interdiff to make it easier to review your changes.
- Open on Drupal.org โCore: 9.5.x + Environment: PHP 7.3 & MySQL 5.7last update
30 days ago Waiting for branch to pass - ๐ต๐ญPhilippines cleavinjosh
cleavinjosh โ changed the visibility of the branch cleavinjosh-8.x-1.x-patch-59ba to hidden.
- ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
apaderno โ changed the visibility of the branch 8.x-1.x to hidden.
- Open on Drupal.org โCore: 9.5.x + Environment: PHP 7.3 & MySQL 5.7last update
29 days ago Waiting for branch to pass - Open on Drupal.org โCore: 9.5.x + Environment: PHP 7.3 & MySQL 5.7last update
29 days ago Waiting for branch to pass - Status changed to Needs work
29 days ago 11:05am 30 May 2024