Skip to content

v4 branch is incompatible with PHP 8.4 #131

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

Open
hubipe opened this issue Mar 27, 2025 · 2 comments · May be fixed by #129
Open

v4 branch is incompatible with PHP 8.4 #131

hubipe opened this issue Mar 27, 2025 · 2 comments · May be fixed by #129

Comments

@hubipe
Copy link
Contributor

hubipe commented Mar 27, 2025

Hello,
I've just tried to upgrade PHP to 8.4, but the code in the branch v4 which I have been successfully and reliably using on PHP 8.3 does not work with PHP 8.4.

The problem is: Implicitly marking parameter as nullable is deprecated, the explicit nullable type must be used instead.

There are multiple places in the library, which uses typehints with default null value. The typehint in PHP 8.4 needs to be nullable as well.

function test(string $param = NULL)

needs to become

function test(?string $param = NULL)

If you want, I can prepare a fix in a PR - I've done the upgrade myself with Rector...

@hubipe
Copy link
Contributor Author

hubipe commented Mar 28, 2025

Oh, I've just notice, that there already is PR solving this issue #129.
Could you please merge it?

@georged
Copy link
Contributor

georged commented Mar 28, 2025

@hubipe we're doing regression testing and will merge once it's done. You can always pull the files and merge it locally if it's urgent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@hubipe @georged and others