The upgrade from 2.x to 3.x renames most of the trait methods and changes the behaviour of some of them.
Doing this by hand is tedious and error-prone in larger test suites.
We should add a migrate.php script to the package root that follows docs/Migration.md.
The script should:
- renames calls of the old methods to the new
assert* methods (testDataValidation* → assertValidation*)
- replaces the removed
testRules() with assertRules() and lists those calls for manual review, since the behaviour differs
- lists calls of rule-dedicated methods, which now only check their own rule
- lists old method names it couldn't replace safely (strings, callables, etc.)
- optionally updates the package's version constraint in
composer.json
The upgrade from 2.x to 3.x renames most of the trait methods and changes the behaviour of some of them.
Doing this by hand is tedious and error-prone in larger test suites.
We should add a
migrate.phpscript to the package root that follows docs/Migration.md.The script should:
assert*methods (testDataValidation*→assertValidation*)testRules()withassertRules()and lists those calls for manual review, since the behaviour differscomposer.json