Drupal coding standards

Created on 16 April 2020, over 4 years ago
Updated 24 January 2023, almost 2 years ago
๐Ÿ› Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia suresh prabhu parkala Bangalore

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany sleitner

    Reroll for current branch with hal as dependency

  • Status changed to Needs work over 1 year ago
  • ๐Ÿ‡ต๐Ÿ‡ญPhilippines roberttabigue

    Hi,

    I reviewed the changes and confirmed the Patch was applied cleanly.

    Checking patch composer.json...
    Checking patch entity_reference_revisions.info.yml...
    Checking patch entity_reference_revisions.views.inc...
    Checking patch src/Commands/EntityReferenceRevisionsCommands.php...
    Checking patch src/EntityNeedsSaveInterface.php...
    Checking patch src/EntityNeedsSaveTrait.php...
    Checking patch src/EntityReferenceRevisionsFieldItemList.php...
    Checking patch src/EntityReferenceRevisionsOrphanPurger.php...
    Checking patch src/EntityReferenceRevisionsServiceProvider.php...
    Checking patch src/Form/OrphanedCompositeEntitiesDeleteForm.php...
    Checking patch src/Normalizer/EntityReferenceRevisionItemNormalizer.php...
    Checking patch src/Plugin/DataType/EntityReferenceRevisions.php...
    Checking patch src/Plugin/Derivative/MigrateEntityReferenceRevisions.php...
    Checking patch src/Plugin/Field/FieldFormatter/EntityReferenceRevisionsEntityFormatter.php...
    Checking patch src/Plugin/Field/FieldType/EntityReferenceRevisionsItem.php...
    Checking patch src/Plugin/Field/FieldWidget/EntityReferenceRevisionsAutocompleteWidget.php...
    Checking patch src/Plugin/diff/Field/EntityReferenceRevisionsFieldDiffBuilder.php...
    Checking patch src/Plugin/migrate/destination/EntityReferenceRevisions.php...
    Checking patch src/Plugin/views/display/EntityReferenceRevisions.php...
    Checking patch src/Plugin/views/row/EntityReferenceRevisions.php...
    Checking patch src/Plugin/views/style/EntityReferenceRevisions.php...
    Checking patch src/TypedData/EntityRevisionDataDefinition.php...
    Checking patch tests/modules/entity_host_relationship_test/src/Entity/EntityTestHostRelationship.php...
    Checking patch tests/src/Functional/EntityReferenceRevisionsAdminTest.php...
    Checking patch tests/src/Functional/EntityReferenceRevisionsAutocompleteTest.php...
    Checking patch tests/src/Functional/EntityReferenceRevisionsNormalizerTest.php...
    Checking patch tests/src/Functional/EntityReferenceRevisionsOrphanRemovalTest.php...
    Checking patch tests/src/Kernel/EntityReferenceRevisionsCompositeTest.php...
    Checking patch tests/src/Kernel/EntityReferenceRevisionsCompositeTranslatableFieldTest.php...
    Checking patch tests/src/Kernel/EntityReferenceRevisionsCompositeTranslationTest.php...
    Checking patch tests/src/Kernel/EntityReferenceRevisionsFormatterTest.php...
    Checking patch tests/src/Kernel/EntityReferenceRevisionsSaveTest.php...
    Checking patch tests/src/Kernel/Plugin/Derivative/EntityReferenceRevisionsDeriverTest.php...
    Checking patch tests/src/Kernel/Plugin/migrate/destination/EntityReferenceRevisionsDestinationTest.php...
    Applied patch composer.json cleanly.
    Applied patch entity_reference_revisions.info.yml cleanly.
    Applied patch entity_reference_revisions.views.inc cleanly.
    Applied patch src/Commands/EntityReferenceRevisionsCommands.php cleanly.
    Applied patch src/EntityNeedsSaveInterface.php cleanly.
    Applied patch src/EntityNeedsSaveTrait.php cleanly.
    Applied patch src/EntityReferenceRevisionsFieldItemList.php cleanly.
    Applied patch src/EntityReferenceRevisionsOrphanPurger.php cleanly.
    Applied patch src/EntityReferenceRevisionsServiceProvider.php cleanly.
    Applied patch src/Form/OrphanedCompositeEntitiesDeleteForm.php cleanly.
    Applied patch src/Normalizer/EntityReferenceRevisionItemNormalizer.php cleanly.
    Applied patch src/Plugin/DataType/EntityReferenceRevisions.php cleanly.
    Applied patch src/Plugin/Derivative/MigrateEntityReferenceRevisions.php cleanly.
    Applied patch src/Plugin/Field/FieldFormatter/EntityReferenceRevisionsEntityFormatter.php cleanly.
    Applied patch src/Plugin/Field/FieldType/EntityReferenceRevisionsItem.php cleanly.
    Applied patch src/Plugin/Field/FieldWidget/EntityReferenceRevisionsAutocompleteWidget.php cleanly.
    Applied patch src/Plugin/diff/Field/EntityReferenceRevisionsFieldDiffBuilder.php cleanly.
    Applied patch src/Plugin/migrate/destination/EntityReferenceRevisions.php cleanly.
    Applied patch src/Plugin/views/display/EntityReferenceRevisions.php cleanly.
    Applied patch src/Plugin/views/row/EntityReferenceRevisions.php cleanly.
    Applied patch src/Plugin/views/style/EntityReferenceRevisions.php cleanly.
    Applied patch src/TypedData/EntityRevisionDataDefinition.php cleanly.
    Applied patch tests/modules/entity_host_relationship_test/src/Entity/EntityTestHostRelationship.php cleanly.
    Applied patch tests/src/Functional/EntityReferenceRevisionsAdminTest.php cleanly.
    Applied patch tests/src/Functional/EntityReferenceRevisionsAutocompleteTest.php cleanly.
    Applied patch tests/src/Functional/EntityReferenceRevisionsNormalizerTest.php cleanly.
    Applied patch tests/src/Functional/EntityReferenceRevisionsOrphanRemovalTest.php cleanly.
    Applied patch tests/src/Kernel/EntityReferenceRevisionsCompositeTest.php cleanly.
    Applied patch tests/src/Kernel/EntityReferenceRevisionsCompositeTranslatableFieldTest.php cleanly.
    Applied patch tests/src/Kernel/EntityReferenceRevisionsCompositeTranslationTest.php cleanly.
    Applied patch tests/src/Kernel/EntityReferenceRevisionsFormatterTest.php cleanly.
    Applied patch tests/src/Kernel/EntityReferenceRevisionsSaveTest.php cleanly.
    Applied patch tests/src/Kernel/Plugin/Derivative/EntityReferenceRevisionsDeriverTest.php cleanly.
    Applied patch tests/src/Kernel/Plugin/migrate/destination/EntityReferenceRevisionsDestinationTest.php cleanly.

    However, I'm still seeing PHPCS errors.

    I ran this command:
    phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig entity_reference_revisions/

    Applied to Entity Reference Revisions module with 8.x-1.x-dev version (Branch: (8.x-1.x)) and with the Drupal core version of 9.5.x.

    Please see the attached file "phpcsafterthepatch.png" for your reference.

    I'm moving this to Needs work.

    Thank you!

  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7
    last update over 1 year ago
    Patch Failed to Apply
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia sakthi_dev

    Please review.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia sakthi_dev

    Please fix remaining issues.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia nitin_lama India

    Neither Patch #8 nor patch #11 applies to 8.x-1.x.

  • ๐Ÿ‡ท๐Ÿ‡บRussia zniki.ru

    Nikolay Shapovalov โ†’ made their first commit to this issueโ€™s fork.

  • Assigned to zniki.ru
  • ๐Ÿ‡ท๐Ÿ‡บRussia zniki.ru
  • ๐Ÿ‡ท๐Ÿ‡บRussia zniki.ru
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7
    last update 12 months ago
    38 pass, 2 fail
  • Issue was unassigned.
  • ๐Ÿ‡ท๐Ÿ‡บRussia zniki.ru

    I create MR from patch #8, add some changes from my side.
    Some issues still need to be fixed.

  • ๐Ÿ‡ท๐Ÿ‡บRussia zniki.ru
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7
    last update 12 months ago
    39 pass
  • ๐Ÿ‡ท๐Ÿ‡บRussia zniki.ru
  • Assigned to nitin_lama
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia nitin_lama India
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7
    last update 12 months ago
    PHPLint Failed
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia nitin_lama India

    Updating IS for the remaining issues.

  • Issue was unassigned.
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia nitin_lama India
  • Pipeline finished with Failed
    12 months ago
    Total: 161s
    #68339
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7
    last update 12 months ago
    39 pass
  • Pipeline finished with Success
    12 months ago
    #68603
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7
    last update 12 months ago
    39 pass
  • Pipeline finished with Success
    12 months ago
    Total: 239s
    #68978
  • Status changed to Needs review 12 months ago
  • ๐Ÿ‡ท๐Ÿ‡บRussia zniki.ru

    Ready for review.

  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7
    last update 12 months ago
    39 pass
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7
    last update 12 months ago
    39 pass
  • Pipeline finished with Canceled
    12 months ago
    Total: 2s
    #69125
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7
    last update 12 months ago
    39 pass
  • Pipeline finished with Canceled
    12 months ago
    Total: 182s
    #69126
  • Pipeline finished with Success
    12 months ago
    Total: 195s
    #69127
  • First commit to issue fork.
  • Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7
    last update 11 months ago
    Not currently mergeable.
  • Pipeline finished with Success
    11 months ago
    Total: 309s
    #78090
  • ๐Ÿ‡ท๐Ÿ‡บRussia zniki.ru

    @Yashaswi18 thanks for you commit, but changes you suggested is not been reported by phpcs.
    You can see list of violations in the Issue Summary.
    I am going to revert commit 918f306df.

  • Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7
    last update 11 months ago
    Not currently mergeable.
  • Pipeline finished with Success
    11 months ago
    Total: 207s
    #78555
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7
    last update 11 months ago
    40 pass
  • ๐Ÿ‡ท๐Ÿ‡บRussia zniki.ru

    Update IS on latest 8.x-1.x branch.
    Update MR.

  • Pipeline finished with Failed
    11 months ago
    Total: 202s
    #78563
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7
    last update 11 months ago
    40 pass
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7
    last update 11 months ago
    40 pass
  • Pipeline finished with Canceled
    11 months ago
    Total: 215s
    #78573
  • Pipeline finished with Success
    11 months ago
    Total: 204s
    #78577
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7
    last update 11 months ago
    40 pass
  • Pipeline finished with Success
    11 months ago
    Total: 153s
    #78591
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7
    last update 11 months ago
    40 pass
  • Pipeline finished with Success
    11 months ago
    Total: 152s
    #78598
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7
    last update 11 months ago
    40 pass
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7
    last update 11 months ago
    40 pass
  • Pipeline finished with Canceled
    11 months ago
    Total: 96s
    #78601
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7
    last update 11 months ago
    40 pass
  • Pipeline finished with Canceled
    11 months ago
    Total: 48s
    #78602
  • ๐Ÿ‡ท๐Ÿ‡บRussia zniki.ru

    I removed from MR changes that is not related to provided IS violations list.
    Hope nothing left.
    MR is pretty big, but changes is not difficult.

  • Pipeline finished with Success
    11 months ago
    Total: 179s
    #78603
  • ๐Ÿ‡ซ๐Ÿ‡ทFrance dydave

    The changes from MR!36 seem to be fixing all phpcs issues and getting the job to pass โœ…

    Could this be reviewed and merged by a maintainer please?

    Feel free to let us know if you would see anything else missing or any other task to be done in this ticket, we would be very happy to help.

    Thanks in advance!

  • ๐Ÿ‡ต๐Ÿ‡ญPhilippines roberttabigue

    Hi @Dydave,

    I have applied the latest MR !36 to the Entity Reference Revisions module against 8.x-1.x-dev on Drupal 10 and confirmed that all PHPCS errors have been fixed.

    I ran this command on the module:
    phpcs --standard=Drupal,DrupalPractice --extensions=php,inc,module,install,info,test,profile,theme entity_reference_revisions

    Please see the attached files for reference.

    I'm moving this now to RTBC.

    Thank you!

  • Status changed to RTBC 7 months ago
  • ๐Ÿ‡ต๐Ÿ‡ญPhilippines roberttabigue
  • Status changed to Needs work 5 months ago
  • ๐Ÿ‡จ๐Ÿ‡ญSwitzerland berdir Switzerland

    long indeed but just about reviewable I think. Needs a rebase and a few things to improve.

    I'm starting to to depend only on the phpcs rules that core uses, see https://www.drupal.org/project/redirect/issues/2957751 ๐Ÿ“Œ Maintaining drupal coding standards Needs review , looks like there aren't too many of the usualy awkwardly formatted function arguments, if conditions and so on that I often see. might help to avoid some of the phpcs:ignore lines though?

  • Assigned to zniki.ru
  • ๐Ÿ‡ท๐Ÿ‡บRussia zniki.ru
  • Pipeline finished with Failed
    18 days ago
    Total: 425s
    #355212
  • ๐Ÿ‡ท๐Ÿ‡บRussia zniki.ru

    @Sascha, Thanks a lot for review.
    I updated MR.

    IS updated: updated list of violations.

  • Pipeline finished with Failed
    18 days ago
    Total: 144s
    #355225
  • Pipeline finished with Success
    18 days ago
    Total: 340s
    #355228
  • ๐Ÿ‡ท๐Ÿ‡บRussia zniki.ru

    IS updated using core phpcs rules.

  • Pipeline finished with Failed
    18 days ago
    Total: 256s
    #355236
  • Pipeline finished with Failed
    18 days ago
    Total: 339s
    #355241
  • Pipeline finished with Success
    18 days ago
    Total: 339s
    #355243
  • ๐Ÿ‡ท๐Ÿ‡บRussia zniki.ru

    I left only changes that fix violations rules from Drupal core, as was requested in #33.
    Most of changes made right now are from phpcbf.

    Should we keep yml fixes in this issue, or it's better to create separate one?
    Should we set "allow_failure: false" for phpcs, eslint?

    MR is ready for review.

  • ๐Ÿ‡ท๐Ÿ‡บRussia zniki.ru
Production build 0.71.5 2024