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 support #84

Merged
merged 4 commits into from
Sep 4, 2024
Merged

PHP 8.4 support #84

merged 4 commits into from
Sep 4, 2024

Conversation

Jubeki
Copy link
Contributor

@Jubeki Jubeki commented Sep 4, 2024

As of PHP 8.4 parameters marked as implicit nullable will throw a deprecation warning. Explicitly Declaring is Supported as of PHP 7.1 (See https://www.php.net/manual/en/migration71.new-features.php). This package requires PHP >=7.2.5 so no lower bounds need to be updated.

This PR adds the question mark or null to the parameter types to to avoid the deprecation warning in PHP 8.4.

This was done with the help of laravel/pint and the following configuration in the pint.json:

{
    "preset": "empty",
    "rules": {
        "nullable_type_declaration_for_default_null_value": true
    }
}

@GrahamCampbell GrahamCampbell changed the title Mark parameters explicit nullable PHP 8.4 support Sep 4, 2024
@GrahamCampbell GrahamCampbell merged commit d658c37 into jmespath:master Sep 4, 2024
16 checks passed
@Jubeki
Copy link
Contributor Author

Jubeki commented Sep 4, 2024

Thanks!

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 this pull request may close these issues.

2 participants