PHPCS: nullable types PHP 8.4#630
Conversation
9bae5c4 to
dcc5a93
Compare
stof
left a comment
There was a problem hiding this comment.
This PR should also fix the new deprecations reported by a optional argument before required ones (which was skipped when the default value was making the type nullable implicitly).
Note that PHP-CS-Fixer has a (risky) rule no_unreachable_default_argument_value for that as well
| fail-fast: false | ||
| matrix: | ||
| php: ["7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"] | ||
| php: ["7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"] |
There was a problem hiding this comment.
This should not be done in this PR applying a CS change (especially as it does not work as is). Keep this PR focused only on the CS change.
There was a problem hiding this comment.
removed the change, supposed to try run pipelines
There was a problem hiding this comment.
Rebased on top of it
dcc5a93 to
ef8c8a5
Compare
php-cs-fixer fix . --rules nullable_type_declaration_for_default_null_value,no_unreachable_default_argument_value --allow-risky=yes
ef8c8a5 to
23d5905
Compare
I scanned this branch with PHPCompatibility, which can check for both deprecations and this branch is clean of both of those issues. Edit: at least it is at this time (when I scanned it). |
It was not the case when I asked for that change, as shown by the static analysis CI job at that time: https://github.com/phpspec/prophecy/actions/runs/10492742258/job/29065879468 |
First part for #624