Problem/Motivation
The sniff, Drupal.Array.Array.LongLineDeclaration is not enabled.
Steps to reproduce
Proposed resolution
Enable Drupal.Array.Array.LongLineDeclaration for KernelTests tests.
There are no strict standards for how to split a call to a function across multiple lines. The changes try to be the best fit for readability and the current style used in the file or method.
Remaining tasks
Review
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | 3513561-nr-bot.txt | 91 bytes | needs-review-queue-bot |
Issue fork drupal-3513561
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3513561-fix-longlinedeclaration-in
changes, plain diff MR !11510
Comments
Comment #3
quietone commentedLinting passes, so NR.
Comment #4
smustgrave commentedPretty straight forward
Comment #5
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #6
quietone commentedThere were no conflicts
Comment #7
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #8
quietone commentedA rebase and an additional change.
Comment #9
smustgrave commentedadditional change seems fine.
Comment #10
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #11
quietone commentedRebase and wew fixes in the last commit to review
Comment #12
smustgrave commentedReviewed last commit https://git.drupalcode.org/project/drupal/-/merge_requests/11510/diffs?c... and seem fine
Comment #13
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #14
quietone commentedRebase and change in EntityDefinitionUpdateMultipleTypesTest.php
Comment #15
smustgrave commentedReviewed https://git.drupalcode.org/project/drupal/-/merge_requests/11510/diffs?c... and additional change seems fine.
Comment #16
longwaveWhile this is largely subjective I feel there's definitely some imbalances going on here.. I feel that starting/ending braces etc should be at the same indentation level at least, and there's some cases that can be rearranged to make them easier to read. I added some sample suggestions but there are other similar cases that should also be considered.
Comment #18
oily commentedApplied @longwave's suggestions. All code structural changes look good imo. Not sure we need to get into a debate on which of the many possible structures is the 'ideal'? This seems to represent a concrete improvement certainly in terms of readability.
Comment #19
oily commentedComment #20
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #21
quietone commentedRebased, there was a conflict in \Drupal\KernelTests\Core\Entity\EntityQueryTest::testEntityQuery
Comment #22
smustgrave commentedSeems like a good rebase
Comment #23
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #24
quietone commentedRebased and linting passes. There are new changes that need to be reviewed. These are for the use of "#[TestWith(" and there is no standard yet for that. For readability, it made sense to me to simply add an ignore line to ignore this sniff.
Comment #25
smustgrave commentedWould assume disabling the phpcs check for those should be fine is there another way to confirm though?
Comment #26
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #27
quietone commented@smustgrave, you can review the Coding Standards to confirm that there are not standards for the formatting of the
TestWithattribute.Comment #28
dcam commentedI reviewed the last commit that disabled PHPCS around
TestWithattributes. That seems like a reasonable approach to me until coding standards are developed. Should a follow-up issue be created for it?Comment #29
oily commented@dcam Re #28 Do you mean the addition to the coding standards as a follow up? That might be a more general issue not necessarily related to this particular issue if it would affect potentially all core tests not just the tests involved in this issue.
Comment #30
quietone commented@dcam and @oily, , there is an existing Coding Standards issue for tests, anything for
TestWithwould be a child of that. #2057905: [policy, no patch] Discuss the standards for phpunit based tests. In fact the issue summary on that issue need to be brought up to date.Rebased with a single conflict, in
\Drupal\KernelTests\Core\Menu\MenuLinkTreeTest::testCreateLinksInMenu. I removed the change from this MR and reformatted the new code from HEAD. Since I used the reformat command from PHPStorm, which I use all the time, so I am restoring leaving at RTBC.Comment #31
longwaveHad another pass at this, found some more where I think it's not quite right.
Sometimes I wish we had a super opinionated formatter like prettier or gofmt.
Comment #32
quietone commentedI responded to all of @longwave's comments. And a rebase.
Comment #33
smustgrave commentedRebase seems though not sure how long that will last lol :)
Comment #36
longwaveLet's get this in before it needs another reroll :)
Committed and pushed 83e557e40b1 to 11.x and 30ac7f797d6 to 11.3.x. Thanks!