- Issue created by @mstrelan
- Status changed to Postponed
about 1 year ago 12:43am 6 November 2023 - Status changed to Needs review
about 1 year ago 2:16am 16 November 2023 - Status changed to Needs work
about 1 year ago 7:02pm 16 November 2023 - 🇺🇸United States smustgrave
Seems to have test failures but not sure if this is also postponed on the trait issue landing with the rule.
- Status changed to Postponed
about 1 year ago 6:21pm 17 November 2023 - 🇺🇸United States dww
In practice, probably blocked on the Traits one, but not formally. Either of these issues could land first to add the (restricted) phpcs rule, and then the other would expand the rule to cover more kinds of files.
However, definitely blocked on #3303206: Define a standard for adding declare(strict_types=1) → , since we need to decide the standard for how we want to add this declaration.
- Status changed to Needs review
12 months ago 11:50pm 22 November 2023 - 🇦🇺Australia mstrelan
Simplified the steps to not require rector. No longer postponed.
- Status changed to Needs work
12 months ago 3:54pm 23 November 2023 - 🇺🇸United States smustgrave
So when I ran locally I got 854 not 896 (minus one for phpcs.xml file). Is this mixing two tickets by chance?
- Status changed to Postponed
12 months ago 5:55pm 23 November 2023 - 🇺🇸United States dww
The process for the coding standards change still needs to run its course with a formal blog announcement and a 2 week period for community comments. Still postponed for now.
- Status changed to RTBC
12 months ago 5:02pm 8 December 2023 - 🇺🇸United States xjm
The coding standards issue is settled.
There are comments above about test failures, but I don't see any. Setting RTBC and requeuing.
- 🇺🇸United States xjm
Similar merge conflict to the other:
++<<<<<<< HEAD + <!-- @todo broaden this in https://www.drupal.org/project/drupal/issues/3400434 --> + <!-- <include-pattern>*/tests/*</include-pattern> --> + <include-pattern>*/tests/src/Unit/*</include-pattern> + <include-pattern>./tests/Drupal/Tests/*/*.php</include-pattern> + <exclude-pattern>./tests/Drupal/Tests/Listeners/*</exclude-pattern> + <exclude-pattern>./tests/Drupal/Tests/*/Fixture/*</exclude-pattern> + <exclude-pattern>./tests/Drupal/Tests/*/fixtures/*</exclude-pattern> + <!-- @todo remove once https://www.drupal.org/project/drupal/issues/3401994 is in --> + <exclude-pattern>./tests/Drupal/Tests/Traits/*</exclude-pattern> + <exclude-pattern>./tests/Drupal/Tests/*Trait.php</exclude-pattern> ++======= + <include-pattern>./tests/Drupal/BuildTests/*</include-pattern> ++>>>>>>> 11.x
...why I again just resolved by alphabetizing. It'll need to be updated again since I think the traits issue will likely go in first; I just want to re-run the check to make sure we're not missing any tests.
- Status changed to Needs review
12 months ago 5:13pm 8 December 2023 - Status changed to Needs work
12 months ago 5:26pm 8 December 2023 - 🇺🇸United States xjm
Several more to fix:
---------------------------------------------------------------------- Time: 12.05 secs; Memory: 6MB PHP CODE SNIFFER REPORT SUMMARY ---------------------------------------------------------------------- FILE ERRORS WARNINGS ---------------------------------------------------------------------- .../modules/update/tests/src/Unit/UpdateMailTest.php 1 0 .../Tests/Core/Session/AccessPolicyProcessorTest.php 1 0 ...ts/Core/Session/CalculatedPermissionsItemTest.php 1 0 .../Tests/Core/Session/CalculatedPermissionsTest.php 1 0 ...re/Session/RefinableCalculatedPermissionsTest.php 1 0 ---------------------------------------------------------------------- A TOTAL OF 5 ERRORS AND 0 WARNINGS WERE FOUND IN 5 FILES ---------------------------------------------------------------------- PHPCBF CAN FIX 5 OF THESE SNIFF VIOLATIONS AUTOMATICALLY ----------------------------------------------------------------------
Since this issue might be a bit like bailing water, I think it might be best to postpone until the shorter related issues land, but up to contributors.
- Status changed to Needs review
12 months ago 11:32pm 12 December 2023 - Status changed to RTBC
11 months ago 1:46pm 13 December 2023 - 🇺🇸United States smustgrave
Even though this one is easy to read still a very large patch with lost of changes. Think it would be best to land now and if any stragglers they could be handled in a final ticket for the meta?
- Status changed to Needs work
11 months ago 4:00am 29 December 2023 - Status changed to Needs review
11 months ago 4:13am 29 December 2023 - Status changed to RTBC
11 months ago 5:27pm 29 December 2023 - Status changed to Needs work
11 months ago 2:34pm 2 January 2024 - 🇬🇧United Kingdom longwave UK
FILE: core/tests/Drupal/Tests/Core/EventSubscriber/FinishResponserSubscriberTest.php ---------------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------------------------------------------------------------------- 1 | ERROR | [x] Missing declare(strict_types=1). | | (SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing)
- 🇬🇧United Kingdom longwave UK
🐛 Regression from #3295790 content-length header set earlier than expected Fixed will also rename that test so maybe worth holding off until that lands?
- Status changed to RTBC
11 months ago 8:25pm 2 January 2024 - 🇦🇺Australia mstrelan
Updated issue summary to better reflect exclude patterns, since other related issues are in. Merged in 11.x just to be sure.
-
larowlan →
committed 9add7f71 on 11.x
Issue #3399373 by mstrelan, xjm, longwave, quietone: Add declare(...
-
larowlan →
committed 9add7f71 on 11.x
- 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10
Committed to 11.x as we're constantly bailing water here.
Doesn't apply to 10.2
deleted by us: core/modules/file/tests/src/Unit/Upload/ContentDispositionFilenameParserTest.php deleted by us: core/tests/Drupal/Tests/Core/Session/AccessPolicyProcessorTest.php deleted by us: core/tests/Drupal/Tests/Core/Session/CalculatedPermissionsItemTest.php deleted by us: core/tests/Drupal/Tests/Core/Session/CalculatedPermissionsTest.php deleted by us: core/tests/Drupal/Tests/Core/Session/RefinableCalculatedPermissionsTest.php
I think at this point we can probably not worry about 10.2
Thanks for the monster effort here @mstrelan
- Status changed to Fixed
11 months ago 5:31am 3 January 2024 - Status changed to Downport
11 months ago 7:58am 3 January 2024 - 🇬🇧United Kingdom longwave UK
Discussed this with @catch yesterday and we thought this might be a good idea to backport (minus the change to phpcs.xml.diat) to make cherry picks easier; otherwise bug fixes with any unit test changes may need to be rerolled? As strict types only affects the file it is used in there are no side effects that I could think of.
- 🇦🇺Australia mstrelan
Happy to back port, but also since it's isolated to the top of each file it's fairly unlikely to cause a conflict.
- Merge request !6031Issue #3399373: Add declare(strict_types=1) to all Unit tests → (Open) created by mstrelan
- Status changed to Needs review
11 months ago 10:31pm 4 January 2024 - 🇦🇺Australia mstrelan
New MR against 10.2.x. I didn't try to apply the 11.x patch, just reapplied the phpcs rules and ran phpcbf.
- Status changed to RTBC
11 months ago 1:00am 5 January 2024 - 🇬🇧United Kingdom longwave UK
Thanks for backporting. Agree that this is not too likely to cause a conflict now I think about it more but also as this is tests-only I see no harm and if it prevents a reroll later so much the better.
Committed without the change to phpcs.xml.dist as we can't change coding standards rules in a patch release.
Committed b612db8 and pushed to 10.2.x. Thanks!
- Status changed to Fixed
11 months ago 9:16am 5 January 2024 -
longwave →
committed b612db8a on 10.2.x
Issue #3399373 by mstrelan, xjm, longwave, larowlan, quietone: Add...
-
longwave →
committed b612db8a on 10.2.x
Automatically closed - issue fixed for 2 weeks with no activity.