Skip to content
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 : Deprecated implicit nullable #61

Closed
marcimat opened this issue Nov 21, 2024 · 4 comments · Fixed by #62
Closed

PHP 8.4 : Deprecated implicit nullable #61

marcimat opened this issue Nov 21, 2024 · 4 comments · Fixed by #62
Milestone

Comments

@marcimat
Copy link
Contributor

marcimat commented Nov 21, 2024

Hello,

PHP 8.4 shows at least one deprecated :

Deprecated: Zumba\JsonSerializer\JsonSerializer::__construct(): Implicitly marking parameter $closureSerializer as nullable is deprecated, the explicit nullable type must be used instead in ~/src/JsonSerializer/JsonSerializer.php on line 78

This is a small correction

    public function __construct(
-       ClosureSerializerInterface $closureSerializer = null,
+      ?ClosureSerializerInterface $closureSerializer = null,
        $customObjectSerializerMap = []
    ) {

But it seems to be a problem as this syntax comes with PHP 7.1 https://www.php.net/manual/en/migration71.new-features.php
and this lib accepts PHP >= 7.0 at this time.

@williamdes
Copy link
Contributor

This will hit me soon in Debian: https://salsa.debian.org/phpmyadmin-team/sql-parser/-/jobs/6734113#L590

@jrbasso should we drop old PHP versions ?

@jrbasso
Copy link
Member

jrbasso commented Dec 11, 2024

I think it's time to drop PHP 7 support. It is still being used by 15% of the installs (https://packagist.org/packages/zumba/json-serializer/php-stats#3), but PHP 7 EOL is over 2 years.

Do you want to create a PR? I can create a new major version after the merge.

@williamdes
Copy link
Contributor

williamdes commented Dec 11, 2024

Awesome, thank you for the fast reply !

I did drop only until PHP 7.2 for now, you can then release it as a minor version

Here you go: #62

@jrbasso
Copy link
Member

jrbasso commented Dec 11, 2024

It's now live on the version 3.2.2.

Thank you!

@jrbasso jrbasso added this to the 3.2 milestone Dec 11, 2024
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