- Issue created by @andypost
- Merge request !7836[8.4] Fix implicitly nullable type declarations for phpstan job #3444232 → (Closed) created by andypost
- Status changed to Needs review
8 months ago 9:41pm 29 April 2024 - 🇫🇷France andypost
Ready to be merged and makes phpstan green https://git.drupalcode.org/issue/drupal-3427903/-/jobs/1470419
- 🇮🇳India onkararun
Hi @andypost i have tested MR !7836 3444232-8.4-fix-implicitly-ordering on Drupal Version 11.x-dev & PHP Version 8.3
Testing Steps:-
1). Install Drupal 11.x version.
2). /projects/drupal/ git remote add drupal-3444232 https://git.drupalcode.org/issue/drupal-3444232.git
3). git fetch drupal-3444232
4). git checkout -b '3444232-8.4-fix-implicitly-ordering' --track drupal-3444232/'3444232-8.4-fix-implicitly-ordering'During testing the code i found some error on following files
1. core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/DefaultSelection.php - checked this file using vendor/bin/phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/DefaultSelection.php, then i got the errorFILE: /var/www/html/drupal/core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/DefaultSelection.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------------------------------------------
224 | WARNING | [x] '@todo: Use property labels instead of the column name.' should match the format '@todo Fix problem X here.'
227 | ERROR | [ ] The array declaration extends to column 157 (the limit is 120). The array content should be split up over multiple lines
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------2. core/lib/Drupal/Core/Template/TwigNodeTrans.php - checked this file using vendor/bin/phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml core/lib/Drupal/Core/Template/TwigNodeTrans.php , then i got the error
FILE: /var/www/html/drupal/core/lib/Drupal/Core/Template/TwigNodeTrans.php
----------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------
95 | WARNING | [x] There must be no blank line following an inline comment
----------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------3. core/modules/content_moderation/src/Form/ContentModerationConfigureEntityTypesForm.php - checked this file using vendor/bin/phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml core/modules/content_moderation/src/Form/ContentModerationConfigureEntityTypesForm.php , then i got the error
FILE: /var/www/html/drupal/core/modules/content_moderation/src/Form/ContentModerationConfigureEntityTypesForm.php
----------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------------------------------------
224 | ERROR | The array declaration extends to column 166 (the limit is 120). The array content should be split up over multiple lines
226 | ERROR | The array declaration extends to column 240 (the limit is 120). The array content should be split up over multiple lines
----------------------------------------------------------------------------------------------------------------------------------------4. core/modules/language/tests/src/Unit/ContentLanguageSettingsUnitTest.php - checked this file using vendor/bin/phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml core/modules/language/tests/src/Unit/ContentLanguageSettingsUnitTest.php , then i got the error
FILE: /var/www/html/drupal/core/modules/language/tests/src/Unit/ContentLanguageSettingsUnitTest.php
--------------------------------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
--------------------------------------------------------------------------------------------------------------------------------------------
8 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\DependencyInjection\ContainerBuilder.
154 | ERROR | [x] Missing function doc comment
183 | ERROR | [x] Missing function doc comment
217 | ERROR | [x] Missing function doc comment
284 | ERROR | [x] Missing function doc comment
--------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------5. core/modules/node/src/NodeForm.php - checked this file using vendor/bin/phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml core/modules/node/src/NodeForm.php , then i got the error
FILE: /var/www/html/drupal/core/modules/node/src/NodeForm.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
247 | ERROR | Missing parameter type
249 | ERROR | Missing parameter type
----------------------------------------------------------------------6. core/tests/Drupal/Tests/Core/Entity/Routing/DefaultHtmlRouteProviderTest.php - checked this file using vendor/bin/phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml core/tests/Drupal/Tests/Core/Entity/Routing/DefaultHtmlRouteProviderTest.php , then i got the error
FILE: /var/www/html/drupal/core/tests/Drupal/Tests/Core/Entity/Routing/DefaultHtmlRouteProviderTest.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 15 ERRORS AND 5 WARNINGS AFFECTING 15 LINES
----------------------------------------------------------------------------------------------------------------------------------------------
69 | ERROR | [x] Missing function doc comment
116 | ERROR | [x] Missing function doc comment
171 | ERROR | [ ] The array declaration extends to column 125 (the limit is 120). The array content should be split up over multiple lines
179 | ERROR | [ ] The array declaration extends to column 165 (the limit is 120). The array content should be split up over multiple lines
194 | ERROR | [ ] The array declaration extends to column 165 (the limit is 120). The array content should be split up over multiple lines
213 | ERROR | [x] Missing function doc comment
268 | ERROR | [x] Missing function doc comment
381 | ERROR | [ ] Missing short description in doc comment
385 | ERROR | [ ] Description for the @return value is missing
401 | ERROR | [x] Missing class doc comment
403 | WARNING | [ ] Possible useless method overriding detected
403 | ERROR | [x] Missing function doc comment
407 | WARNING | [ ] Possible useless method overriding detected
407 | ERROR | [x] Missing function doc comment
411 | WARNING | [ ] Possible useless method overriding detected
411 | ERROR | [x] Missing function doc comment
415 | WARNING | [ ] Possible useless method overriding detected
415 | ERROR | [x] Missing function doc comment
419 | WARNING | [ ] Possible useless method overriding detected
419 | ERROR | [x] Missing function doc comment
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 10 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------------- - 🇫🇷France andypost
@Arun.k core has
git.drupalcode.org/project/drupal/-/blob/11.x/core/phpcs.xml.dist
this filebut to make sure there's no style issues we have CI which is green https://git.drupalcode.org/issue/drupal-3444232/-/jobs/1470359
- Assigned to amateescu
- Status changed to Needs work
8 months ago 2:28pm 3 May 2024 - Issue was unassigned.
- 🇫🇷France andypost
I split out 📌 [PHP 8.4] Fix phpstan job for ContentModerationConfigureEntityTypesForm Needs review but looks we can just make argument required
- Merge request !7965Resolve #3444232 "8.4 fix implicitly ordering 10.3" → (Closed) created by andypost
- Status changed to Needs review
7 months ago 4:58pm 8 May 2024 - 🇫🇷France andypost
Re-rolled after 📌 [PHP 8.4] Fix phpstan job for ContentModerationConfigureEntityTypesForm Needs review and added 10.3.x MR to make sure it's backportable
- Status changed to RTBC
7 months ago 5:25pm 14 May 2024 - 🇺🇸United States smustgrave
This set was much easier to work with then the others haha
Reviewed the changes and don't see any issue.
- Status changed to Fixed
7 months ago 2:46pm 20 May 2024 - 🇬🇧United Kingdom catch
This looks good. Committed/pushed to 11.x/11.0.x/10.4.x/10.3.x respectively, thanks!
- 🇫🇷France andypost
Thank you! Now only automated fxes left 📌 [PHP 8.4] Fix implicitly nullable type declarations Active
Automatically closed - issue fixed for 2 weeks with no activity.