Problem/Motivation
This is a child issue of #3376057: [META] Add declare(strict_types=1) to all tests. After adding enabling strict types to all tests there were around 3000 errors. Fixing them all in one issue will lead to an enormous merge request that's difficult to review, as per the issue scope guidelines.
Steps to reproduce
See #3399746: Add declare(strict_types=1) to all Functional tests
Run the test suite:
./vendor/bin/phpunit -c core/phpunit.xml.dist --bootstrap=core/tests/bootstrap.php --testsuite=functional
Proposed resolution
Remaining tasks
- #3421258: Fix strict type errors in WebAssert calls
- #3404273: Fix strict type errors: Convert FormattableMarkup to strings (simple replacement) in core Functional tests
- #3412464: Fix strict type errors: Convert FormattableMarkup to strings (complex replacement) in core Functional tests
- #3404508: Fix strict type errors in Functional tests: Add casts and fix types where needed
- #3418236: Fix strict type errors: Convert remaining usages of FormattableMarkup to strings in core Functional tests
- #3417935: Remove calls to clearstatcache in \Drupal\Tests\file\Functional\FileFieldRevisionTest::testRevisions
- #3399746: Add declare(strict_types=1) to all Functional tests
User interface changes
API changes
Data model changes
Release notes snippet
Issue fork drupal-3399413
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:
- 3399413-strict-types-functional
changes, plain diff MR !5255
Comments
Comment #3
mstrelan commentedNeeds work for self review comments. Ended up writing a custom rector rule that did a lot of the sprintf conversions, but it was not perfect.
Comment #4
mstrelan commentedComment #5
mstrelan commentedComment #6
mstrelan commentedConverting to a meta as per #3397905: [meta] Fix strict type errors in kernel tests
Comment #7
mstrelan commentedComment #8
mstrelan commentedComment #9
mstrelan commentedComment #11
mstrelan commentedComment #12
mstrelan commentedComment #14
mstrelan commentedComment #15
quietone commentedAdd the latest child issue to the Issue Summary
Comment #16
longwave#3399746: Add declare(strict_types=1) to all Functional tests landed and all child issues are completed, I think we are done here - thanks!