-
Notifications
You must be signed in to change notification settings - Fork 8
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
Properly support PHP 8.4 #49
Conversation
With the latest version we can ensure, that typed properties which also have a default `null` value will also be marked explicitly as nullable. E.g. ```php function foo(string $string = null) {} ``` becomes ```php function foo(?string $string = null) {} ``` This is necessary, as PHP 8.4 will otherwise trigger a deprecation message if the type is not marked properly as nullable. Some unnecessary rules that come with this new version were also deactivated, as they do not make a lot of sense in this project.
thanks! |
|
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.
thanks a lot!
@dbu Are you planning a |
we unfortunately don't use this library actively anymore, so it is a bit on the backburner. for releasing 2.0, there are 2 things in the milestone that would be quite good to do (and should probably not be very difficult): https://github.com/liip/metadata-parser/milestone/1 if you would have time to do those, i can release 2.0.0. or at least the cleanup of deprecations, providing the attribute can be done as a 2.1 version as its not a BC break as long as we keep supporting the annotation. |
PHP 8.4 deprecated types that are implicitly marked as nullable so the following should be changed 👇
To fix this in the current code, I updated
php-cs-fixer
to the latest versionv3.68.1
which also includes the nullable_type_declaration_for_default_null_value rule that takes care of this change.The second commit contains all the changes that were done by executing
composer cs-fixer