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 | Fix implicitly nullable parameters (7.x) #1472

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

jrfnl
Copy link
Contributor

@jrfnl jrfnl commented Aug 21, 2024

PHP 8.4 deprecates implicitly nullable parameters, i.e. typed parameter with a null default value, which are not explicitly declared as nullable.

This commit fixes all found instances of that in the PHPSpec codebase.

Includes updating the documentation to match (where relevant, i.e. only existing documentation has been touched).

Ref: https://wiki.php.net/rfc/deprecate-implicitly-nullable-types

PHP 8.4 deprecates implicitly nullable parameters, i.e. typed parameter with a `null` default value, which are not explicitly declared as nullable.

This commit fixes all found instances of that in the PHPSpec codebase.

Includes updating the documentation to match (where relevant, i.e. only existing documentation has been touched).

Ref: https://wiki.php.net/rfc/deprecate-implicitly-nullable-types
@jrfnl jrfnl changed the title PHP 8.4 | Fix implicitly nullable parameters PHP 8.4 | Fix implicitly nullable parameters (7.x) Aug 21, 2024
@jrfnl
Copy link
Contributor Author

jrfnl commented Aug 21, 2024

Note: this PR targets the 7.5 branch. Sister-PR #1473 does the same for the main/8.0 branch.

@stof stof merged commit 0ad9772 into phpspec:7.5 Aug 21, 2024
21 checks passed
@jrfnl jrfnl deleted the 7.x/php-8.4-fix-implicitly-nullable branch August 21, 2024 17:16
@andypost
Copy link

It needs to get rid of E_STRICT and the branch 7.5 could declare compatibility https://wiki.php.net/rfc/deprecations_php_8_4#remove_e_strict_error_level_and_deprecate_e_strict_constant

PHP Deprecated:  Constant E_STRICT is deprecated in /mnt/vendor/phpspec/phpspec/src/PhpSpec/Console/ContainerAssembler.php on line 647

Deprecated: Constant E_STRICT is deprecated in /mnt/vendor/phpspec/phpspec/src/PhpSpec/Console/ContainerAssembler.php on line 647

@andypost
Copy link

Filed #1479

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.

3 participants