Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@staudenmeir
Copy link
Contributor

@staudenmeir staudenmeir commented Jul 13, 2024

PHP 8.4 deprecates implicitly nullable parameter types:
https://wiki.php.net/rfc/deprecate-implicitly-nullable-types

The CS fixer rule nullable_type_declaration_for_default_null_value can also be removed, as true is its default value.

Tests

I tried adding 8.4 to the list of tested PHP versions in ci.yml, but the package requirements can't be resolved yet:

Bildschirmfoto 2024-07-14 um 00 38 45

@mnapoli
Copy link
Member

mnapoli commented Jul 16, 2024

I liked the ?ObjectDefinition notation, are we able to configure the CS to use that?

Also I'm not sure why the build fails now 😕

@staudenmeir
Copy link
Contributor Author

I liked the ?ObjectDefinition notation, are we able to configure the CS to use that?

How do you mean? What does that look like in comparison to ?ObjectDefinition $definition = null?

Also I'm not sure why the build fails now 😕

The CS fixer still fails because it no longer accepts return types like string|null and wants to replace them with ?string. There must have been a change in the default rules. This also affects other PRs like #886.

For this PR, I originally just ran php-cs-fixer fix and that also changed the return types. I reverted these changes in the second commit because that's a different topic, IMO. I can of course restore the return type changes to fix the CS build.

@mnapoli
Copy link
Member

mnapoli commented Jul 16, 2024

OK let's merge this for now 👍

@mnapoli mnapoli merged commit e9d5a6f into PHP-DI:master Jul 16, 2024
@staudenmeir staudenmeir deleted the php8.4 branch July 16, 2024 19:04
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