- Issue created by @mstrelan
- Status changed to Active
over 1 year ago 10:34pm 15 November 2023 - Merge request !5421Add declare(strict_types=1) to all functional javascript tests → (Closed) created by mstrelan
- Status changed to Needs review
over 1 year ago 10:40pm 15 November 2023 - Status changed to RTBC
over 1 year ago 11:39pm 15 November 2023 - 🇺🇸United States dww
Blocker is in. I reviewed the MR changes. Although it's a huge diff, it's very scannable, since it's all the identical change. I didn't spot any other changes. Bot is happy. Title and summary are accurate. Nothing else to complain about.
I think the more condensed version used in the MR (
declare(strict_types=1);
) is fine.Thanks!
-Derek - 🇺🇸United States xjm
As per #3401994-7: Add declare(strict_types=1) to all test traits → .
I agree that in this instance the large scope is acceptable; it's an example of a totally scannable change that doesn't require any extra decisions or context.
- Status changed to Needs review
over 1 year ago 12:50am 16 November 2023 - 🇺🇸United States xjm
Oops, forgot to change the status and finish my sentence. I meant that as per my comment on the other issue, we should try to add a coding standards check to ensure that any new JS tests folks add get strict typing enabled, so that this work does not regress.
- 🇺🇸United States smustgrave
So should this be postponed till the rule gets merged?
- Status changed to Postponed
over 1 year ago 6:02pm 16 November 2023 - 🇺🇸United States xjm
Yep, I think it makes sense to postpone it on the trait issue. That one is nice and short, so a good place to work out the exact specifics.
- 🇺🇸United States nicxvan
I'm just calling out that this issue and the seemingly related https://www.drupal.org/project/drupal/issues/3401994 📌 Add declare(strict_types=1) to all test traits RTBC are making opposite decisions on spaces and enforcement.
The trait issue has this rule:
And put all declarations like this: declare(strict_types = 1);But this JS issue has this rule:
And put all declarations like this: declare(strict_types=1); - 🇺🇸United States nicxvan
No spaces seems to be the decision made: see https://www.drupal.org/project/drupal/issues/3401994#comment-15330621 📌 Add declare(strict_types=1) to all test traits RTBC for references.
- Status changed to Needs review
over 1 year ago 5:22pm 8 December 2023 - 🇺🇸United States xjm
Unpostponing while we resolve merge conflicts and make sure no additional ones have crept back in.
- 🇺🇸United States xjm
Merged the rules section again.
In the case of this issue, there was also a test removed since it was created:
core/profiles/standard/tests/src/FunctionalJavascript/NoJavaScriptAnonymousTest.php
I removed that in our version too.
- Status changed to Needs work
over 1 year ago 5:45pm 8 December 2023 - 🇺🇸United States xjm
Three new tests missing it here as well:
Time: 10.25 secs; Memory: 6MB PHP CODE SNIFFER REPORT SUMMARY ---------------------------------------------------------------------- FILE ERRORS WARNINGS ---------------------------------------------------------------------- ...c/FunctionalJavascript/DefaultValueWidgetTest.php 1 0 .../FunctionalJavascript/StandardPerformanceTest.php 1 0 ...Drupal/FunctionalJavascriptTests/AjaxWaitTest.php 1 0 ---------------------------------------------------------------------- A TOTAL OF 3 ERRORS AND 0 WARNINGS WERE FOUND IN 3 FILES ---------------------------------------------------------------------- PHPCBF CAN FIX 3 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
Again, this can either be postponed on the traits issue or fixed concurrently. Thanks!
- Status changed to Needs review
over 1 year ago 4:59am 9 December 2023 - Status changed to RTBC
over 1 year ago 6:30am 9 December 2023 - 🇧🇪Belgium borisson_ Mechelen, 🇧🇪
The phpcs rule will probably conflict with the one in 📌 Add declare(strict_types=1) to all test traits RTBC , but otherwise this issue looks good to go to me.
- Status changed to Postponed
over 1 year ago 2:07pm 9 December 2023 - 🇺🇸United States xjm
Postponing on the traits issue since the ruleset will need another change after it lands.
- Status changed to Needs work
over 1 year ago 3:02pm 9 December 2023 - Status changed to Needs review
over 1 year ago 1:58am 10 December 2023 - Status changed to RTBC
over 1 year ago 7:33am 10 December 2023 - 🇧🇪Belgium borisson_ Mechelen, 🇧🇪
Looks great, the phpcs file is updated to include the traits as well as this and phpcs passes successfully, back to rtbc.
-
larowlan →
committed 5247e642 on 11.x
Issue #3400018 by mstrelan, xjm: Add declare(strict_types=1) to all...
-
larowlan →
committed 5247e642 on 11.x
- 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10
Committed to 11.x
Asking release managers if its ok to backport this to 10.2 during the 10.2.0 window or if it needs to wait until after.
-
larowlan →
committed ddc25ea1 on 10.2.x
Issue #3400018 by mstrelan, xjm: Add declare(strict_types=1) to all...
-
larowlan →
committed ddc25ea1 on 10.2.x
- Status changed to Fixed
over 1 year ago 10:52pm 12 December 2023 - 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10
@longwave confirmed this was fine to backport to 10.2.x
It doesn't apply to 10.1.x so marking as fixed as that branch is security only.
Automatically closed - issue fixed for 2 weeks with no activity.