-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[PHP 8.4] Fixes for implicit nullability deprecation #868
Conversation
Fixes all issues that emit deprecation notices on PHP 8.4 for implicit nullable parameter type declarations. See: - [RFC](https://wiki.php.net/rfc/deprecate-implicitly-nullable-types) - [PHP 8.4: Implicitly nullable parameter declarations deprecated](https://php.watch/versions/8.4/implicitly-marking-parameter-type-nullable-deprecated)
@erusev Could you please take a look at this? This would help us make the CI for Twig green (see https://github.com/twigphp/Twig/actions/runs/9804849131/job/27073403194#step:10:25). |
Looks like in order to make a new, Can someone help w/ that? |
Thanks! Were you able to run the tests? They don't seem to run on my machine — looks like it's bc the |
I opened a PR to use GitHub actions. While doing so I changed the constraint for PHPUnit to allow compatible versions for all PHP versions supported by this package. I also noticed that we need to revert this PR for 1.7.x as PHP 5.3 does not allow the explicit nullable argument syntax (this requires PHP 7.1+). |
Nice!
What would be the right way to release the nullable argument fix? A new minor release? |
I think a minor release would be fine, because it's merely a bug fix + requirement bump, but no fundamental API changes. |
IMO the |
The problem is, I'm not very familiar with What's the problem w/ releasing it as a patch in |
First, dropping support for a PHP version does not really feel right to me. It’s not a BC break as Composer will prevent people from updating that are using legacy PHP versions. However, you will never be able to publish any future bugfix containing support for legacy PHP versions. |
How about |
That won’t help much as according to semver 1.9 must contain all the features that are part of 1.8. From the Symfony/Twig point of view merging the changes into 1.8 without doing any release is totally fine. And since PHP 8.4 hasn’t been released yet drafting a 1.8 release isn’t that urgent IMO. |
We could rename the 1.8 branch to 1.9, and release the 1.7+fixes+PHP bump as 1.8. However, it looks like there are non-zero installations reported on Composer for Parsedown 1.8 series. |
Ok, let's do that. Do you mind creating a PR? |
You mean #872? |
My reasoning was that the |
Yes pls, would be nice to be able to run the tests on #872. |
Is your plan to keep support for legacy PHP versions in 1.8? |
The explicit nullable argument syntax requires PHP 7.1+, right? If we want it in 1.8, looks like we should drop support for earlier versions. |
see #874 |
Merged, thanks! p.s. Do you know why run fails: |
Re: CI failures, I think it's because the So for example, instead of: matrix:
include:
- '7.1'
- '7.2'
- '7.3'
- '7.4'
- '8.0'
- '8.1'
- '8.2'
- '8.3'
- '8.4' we need something like: matrix:
php: [ '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ] I see that @xabbuh made those changes not too long ago. I think he will follow-up with improvements to there. |
see #875 |
Thanks, also merged #872 |
Fixes all issues that emit deprecation notices on PHP 8.4 for implicit nullable parameter type declarations.
See: