Closed (fixed)
Project:
Drupal core
Version:
11.x-dev
Component:
phpunit
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
9 Nov 2023 at 11:59 UTC
Updated:
17 Sep 2024 at 07:29 UTC
Jump to comment: Most recent
Once all other tasks of #3376057: [META] Add declare(strict_types=1) to all tests are done we can enforce strict types in tests.
N/A
Add the following to phpcs.xml.dist
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
<properties>
<property name="spacesCountAroundEqualsSign" value="0" />
</properties>
<include-pattern>*/tests/*</include-pattern>
<exclude-pattern>*/fixtures/*</exclude-pattern>
</rule>
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:
Comments
Comment #3
mstrelan commentedCurrent status (assuming Kernel tests gets in soon):
core/modules/system/tests/themes/That leaves the following that need to be categorised:
testsdir in each module, unless there is some reason they need to live insrc/Testsinstead.filter_test_plugin,menu_link_content_dynamic_routeandnode_access_test_auto_bubblingin #3400334: Add declare(strict_types=1) to all test modules, or move them to atest/modulesdirectory firstComment #4
mstrelan commentedComment #5
mstrelan commentedComment #6
mstrelan commentedComment #7
smustgrave commentedYes! Very happy to see this is going to be mandatory now.
Changes in MR seems fine to me.
Comment #9
catchCommitted/pushed to 11.x, thanks!
Comment #11
quietone commentedSince this issue enabled strict types I moved the CR from the parent to here and published it.
Comment #12
wim leersNice! 😄