-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHPCS: nullable types PHP 8.4 #630
Conversation
9bae5c4
to
dcc5a93
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
.github/workflows/build.yml
Outdated
@@ -14,7 +14,7 @@ jobs: | |||
strategy: | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed the change, supposed to try run pipelines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I opened #631 to add new CI jobs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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