- ๐ฎ๐ณIndia Charchil Khandelwal
Charchil Khandelwal โ made their first commit to this issueโs fork.
- @charchil-khandelwal opened merge request.
- Status changed to Needs review
almost 2 years ago 10:18am 27 January 2023 - Status changed to Needs work
almost 2 years ago 12:14pm 27 January 2023 - ๐บ๐ธUnited States rlhawk Seattle, Washington, United States
The merge request appears to be the same as the originally submitted patch and does not address the issue in jcnventura's
comment, the breaking of backward-compatibility in the KeyConfigOverrides constructor. Also, coding standard violations are not bugs. - First commit to issue fork.
- Merge request !10Issue #3325937: Drupal Coding Standards Issues | phpcs โ (Open) created by ptmkenny
- Status changed to Needs review
almost 2 years ago 6:45am 4 February 2023 - ๐ฏ๐ตJapan ptmkenny
Submitted a new MR to branch 3325937-drupal-coding-standards that applies the changes in patch #2 without DI of entityTypeManager as requested in #3.
Did not edit the MR in branch 8.x-1.x as it is confusing to have a feature branch name that is the same as the module's dev branch.
- Status changed to Needs work
over 1 year ago 7:03pm 1 May 2023 - ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
arguments: ['key_input', '@container.namespaces', '@cache.discovery', '@module_handler'] key.config_override: class: \Drupal\key\KeyConfigOverrides - arguments: ['@config.factory', '@cache.data'] + arguments: ['@config.factory', '@cache.data', '@entity_type.manager']
The entity type manager is yet added to the constructor since
arguments
is the list of the arguments passed to a service constructor. That is what jcnventura said not to do, in comment #3. - ๐ฎ๐ณIndia zkhan.aamir
zkhan.aamir โ made their first commit to this issueโs fork.
- last update
11 months ago 8 pass - Status changed to Needs review
11 months ago 9:49am 3 January 2024 - ๐ฎ๐ณIndia nitin_lama India
All phpcs issues are fixed on MR 10. Please review.
- Status changed to Needs work
11 months ago 12:38pm 3 January 2024 - First commit to issue fork.
- last update
10 months ago 8 pass - Status changed to Needs review
9 months ago 8:52am 14 February 2024 - ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
apaderno โ changed the visibility of the branch 8.x-1.x to hidden.
- Status changed to RTBC
6 months ago 7:12pm 3 June 2024 - ๐ต๐นPortugal jcnventura
Checked all the changes in the MR. Only phpcs-style changes are being made, and the changes are good, The use of the null coalescing operator means that after this change the module is only for PHP 7.0+, but PHP 5.6 support has been dropped a long time ago by everyone (PHP, Drupal and all decent hosters).
Please add the GitLab CI changes, then merge this MR. We can then use the GitLab pipelines to see if there's anything still left. Maybe add credit on this issue to the ones that contributed to ๐ Drupal Coding Standards Issues | phpcs Needs review .
- ๐ฏ๐ตJapan ptmkenny
Adding the GitLab CI template identified many more issues:
FILE: ...937/web/modules/custom/key-3325937/tests/src/Unit/Entity/KeyEntityTest.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 8 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is Drupal\key\Plugin\KeyInput\NoneKeyInput. | | (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses) -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...937/web/modules/custom/key-3325937/tests/src/Kernel/KeyDeprecationTest.php -------------------------------------------------------------------------------- FOUND 2 ERRORS AFFECTING 2 LINES -------------------------------------------------------------------------------- 17 | ERROR | [x] @inheritdoc found. Did you mean {@inheritdoc}? | | (Drupal.Commenting.DocComment.InheritDocWithoutBraces) 18 | ERROR | [ ] Missing @var tag in member variable comment | | (Drupal.Commenting.VariableComment.MissingVar) -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...dules/custom/key-3325937/tests/src/Functional/KeyRepositoryServiceTest.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 6 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is Drupal\Key\KeyInterface. | | (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses) -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...25937/web/modules/custom/key-3325937/tests/src/Functional/KeyAdminTest.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 7 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is Drupal\Core\Url. | | (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses) -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...ey-3325937/tests/modules/key_test/src/Plugin/KeyType/MultiValueKeyType.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 43 | ERROR | [x] Multi-line function declarations must have a trailing comma | | after the last parameter | | (Drupal.Functions.MultiLineFunctionDeclaration.MissingTrailingComma) -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...custom/key-3325937/tests/modules/key_test/src/Plugin/KeyProvider/State.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 43 | ERROR | [x] Multi-line function declarations must have a trailing comma | | after the last parameter | | (Drupal.Functions.MultiLineFunctionDeclaration.MissingTrailingComma) -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...937/tests/modules/key_test/src/Plugin/KeyProvider/DeprecatedDefinition.php -------------------------------------------------------------------------------- FOUND 2 ERRORS AFFECTING 2 LINES -------------------------------------------------------------------------------- 5 | ERROR | [x] There must be one blank line after the last USE statement; 2 | | found; (PSR2.Namespaces.UseDeclaration.SpaceAfterLastUse) 21 | ERROR | [x] Namespaced classes/interfaces/traits should be referenced | | with use statements | | (Drupal.Classes.FullyQualifiedNamespace.UseStatementMissing) -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...-3325937/tests/modules/key_test/src/Plugin/KeyInput/MutliValueKeyInput.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 33 | ERROR | [x] Multi-line function declarations must have a trailing comma | | after the last parameter | | (Drupal.Functions.MultiLineFunctionDeclaration.MissingTrailingComma) -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...lds/issue/key-3325937/web/modules/custom/key-3325937/src/KeyRepository.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 6 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is Drupal\Component\Plugin\PluginManagerInterface. | | (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses) -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...y-3325937/web/modules/custom/key-3325937/src/Plugin/KeyPluginInterface.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 8 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is | | Drupal\Component\Plugin\PluginInspectionInterface. | | (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses) -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...ue/key-3325937/web/modules/custom/key-3325937/src/Plugin/KeyPluginBase.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 6 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is Drupal\Component\Utility\NestedArray. | | (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses) -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...37/web/modules/custom/key-3325937/src/Plugin/KeyType/EncryptionKeyType.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 7 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is Drupal\key\Plugin\KeyPluginFormInterface. | | (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses) -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: .../web/modules/custom/key-3325937/src/Plugin/KeyProvider/FileKeyProvider.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 7 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is Drupal\key\Plugin\KeyPluginFormInterface. | | (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses) -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...7/web/modules/custom/key-3325937/src/Plugin/KeyProvider/EnvKeyProvider.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 7 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is Drupal\key\Plugin\KeyPluginFormInterface. | | (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses) -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...eb/modules/custom/key-3325937/src/Plugin/KeyProvider/ConfigKeyProvider.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 8 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is Drupal\key\Plugin\KeyPluginFormInterface. | | (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses) -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: .../issue/key-3325937/web/modules/custom/key-3325937/src/Form/KeyFormBase.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 6 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is | | Drupal\Core\Config\Entity\ConfigEntityStorageInterface. | | (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses) -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...y-3325937/web/modules/custom/key-3325937/src/Controller/KeyListBuilder.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 8 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is Drupal\Core\Entity\EntityInterface. | | (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses) -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...modules/custom/key-3325937/src/Controller/KeyConfigOverrideListBuilder.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 9 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is Drupal\Core\Entity\EntityInterface. | | (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses) -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...ue/key-3325937/web/modules/custom/key-3325937/src/Commands/KeyCommands.php -------------------------------------------------------------------------------- FOUND 8 ERRORS AFFECTING 6 LINES -------------------------------------------------------------------------------- 55 | ERROR | [x] Multi-line function declarations must have a trailing comma | | after the last parameter | | (Drupal.Functions.MultiLineFunctionDeclaration.MissingTrailingComma) 103 | ERROR | [x] Multi-line function declarations must have a trailing comma | | after the last parameter | | (Drupal.Functions.MultiLineFunctionDeclaration.MissingTrailingComma) 234 | ERROR | [x] The first parameter of a multi-line function declaration | | must be on the line after the opening bracket | | (Drupal.Functions.MultiLineFunctionDeclaration.FirstParamSpacing) 237 | ERROR | [x] Multi-line function declarations must have a trailing comma | | after the last parameter | | (Drupal.Functions.MultiLineFunctionDeclaration.MissingTrailingComma) 237 | ERROR | [x] The closing parenthesis of a multi-line function declaration | | must be on a new line | | (Drupal.Functions.MultiLineFunctionDeclaration.CloseBracketLine) 311 | ERROR | [x] The first parameter of a multi-line function declaration | | must be on the line after the opening bracket | | (Drupal.Functions.MultiLineFunctionDeclaration.FirstParamSpacing) 314 | ERROR | [x] Multi-line function declarations must have a trailing comma | | after the last parameter | | (Drupal.Functions.MultiLineFunctionDeclaration.MissingTrailingComma) 314 | ERROR | [x] The closing parenthesis of a multi-line function declaration | | must be on a new line | | (Drupal.Functions.MultiLineFunctionDeclaration.CloseBracketLine) -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- Time: 604ms; Memory: 8MB PHP CODE SNIFFER REPORT SUMMARY -------------------------------------------------------------------------------- FILE ERRORS WARNINGS -------------------------------------------------------------------------------- ...325937/web/modules/custom/key-3325937/src/KeyRepository.php 1 0 ...web/modules/custom/key-3325937/src/Commands/KeyCommands.php 8 0 ...key-3325937/src/Controller/KeyConfigOverrideListBuilder.php 1 0 ...odules/custom/key-3325937/src/Controller/KeyListBuilder.php 1 0 ...937/web/modules/custom/key-3325937/src/Form/KeyFormBase.php 1 0 ...web/modules/custom/key-3325937/src/Plugin/KeyPluginBase.php 1 0 ...odules/custom/key-3325937/src/Plugin/KeyPluginInterface.php 1 0 ...om/key-3325937/src/Plugin/KeyProvider/ConfigKeyProvider.php 1 0 ...ustom/key-3325937/src/Plugin/KeyProvider/EnvKeyProvider.php 1 0 ...stom/key-3325937/src/Plugin/KeyProvider/FileKeyProvider.php 1 0 ...custom/key-3325937/src/Plugin/KeyType/EncryptionKeyType.php 1 0 ...modules/key_test/src/Plugin/KeyInput/MutliValueKeyInput.php 1 0 ...es/key_test/src/Plugin/KeyProvider/DeprecatedDefinition.php 2 0 ...937/tests/modules/key_test/src/Plugin/KeyProvider/State.php 1 0 ...s/modules/key_test/src/Plugin/KeyType/MultiValueKeyType.php 1 0 ...es/custom/key-3325937/tests/src/Functional/KeyAdminTest.php 1 0 ...y-3325937/tests/src/Functional/KeyRepositoryServiceTest.php 1 0 .../custom/key-3325937/tests/src/Kernel/KeyDeprecationTest.php 2 0 .../custom/key-3325937/tests/src/Unit/Entity/KeyEntityTest.php 1 0 -------------------------------------------------------------------------------- A TOTAL OF 28 ERRORS AND 0 WARNINGS WERE FOUND IN 67 FILES -------------------------------------------------------------------------------- PHPCBF CAN FIX 27 OF THESE SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- PHP CODE SNIFFER VIOLATION SOURCE SUMMARY -------------------------------------------------------------------------------- SOURCE COUNT -------------------------------------------------------------------------------- [x] SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.Incorrectl 13 [x] Drupal.Functions.MultiLineFunctionDeclaration.MissingTrailingComma 7 [x] Drupal.Functions.MultiLineFunctionDeclaration.CloseBracketLine 2 [x] Drupal.Functions.MultiLineFunctionDeclaration.FirstParamSpacing 2 [x] Drupal.Classes.FullyQualifiedNamespace.UseStatementMissing 1 [x] Drupal.Commenting.DocComment.InheritDocWithoutBraces 1 [ ] Drupal.Commenting.VariableComment.MissingVar 1 [x] PSR2.Namespaces.UseDeclaration.SpaceAfterLastUse 1 -------------------------------------------------------------------------------- A TOTAL OF 28 SNIFF VIOLATIONS WERE FOUND IN 8 SOURCES --------------------------------------------------------------------------------
I think most of these are the result of coding standard changes made since this issue was opened.
I have applied the automated fixes to the MR.
- Status changed to Needs work
5 months ago 4:19am 29 June 2024 - ๐ฏ๐ตJapan ptmkenny
GitLab CI is passing now but this is still not ready. First, there are incorrect coding standards changes in the MR: Class comments need to describe what the class does, not just add "The".
More importantly, @apaderno's comment
This is not a backward-compatible change.
regarding DI has not been addressed.
Actually, I think the DI should be removed from this MR, as GitLab CI treats DI as a phpstan issue, not a coding standards issue. But in any case, this cannot be committed as is.