- Issue created by @mark_fullmer
Per https://www.drupal.org/project/drupal/releases/10.2.0: β
Drupal core automated tests and test APIs are being converted to require strict typing in all cases. So far, Drupal core test traits, build tests, and functional JavaScript tests all require strict typing. Going forward, all Drupal core tests will require strict typing. It is recommended that contributed and custom projects use the Drupal standard for strict type declaration.
1. Add strict type checking following the coding standard defined in
https://www.drupal.org/node/3402544 β
to all PHPUnit test files.
2. Run the tests. If any fail due to this new martinet, rework the code in the module to properly provide strict typing. This usually will mean that variables in PHP classes need to have type hints. A multitude of examples of these types of fixes can be found by reviewing the code changes in issues linked to from
π
Add declare(strict_types=1) to all tests
Needs work
Active
2.0
Code