-
-
Notifications
You must be signed in to change notification settings - Fork 188
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
Prepare for php 8.4's deprecation of implicit nullable types #3411
Comments
I've done that for Flow right now on the 8.4 branch. As this might be breaking (classes using the interfaces might have to be changed), I didn't use 8.3 yet. Or do we only want to target Neos 9.0, as it is only a deprecation warning and Flow/Neos 8.x will only support php until 8.4? See my commit for the 142 affected files in flow: |
Wow thanks for your help!!! I think 8.4 is perfect. Neos 8.4 will also contain the updated proxy-building which works better for newer php version https://discuss.neos.io/t/funding-request-proxy-class-building-and-php-8-2-support-for-flow-9-0/6287 I think its acceptable that Neos & Flow 8.3 will not run with deprecations on php 8.4? But contradicting to what we thought, changing interfaces is NOT breaking because extended classes are allowed to narrow types in interfaces: Meaning we can make
So Flow 8.4 could technically be considered as well as target if we like. It would be great if you can open a pr we still can change the base later! |
+1 for PHP 8.4 support in Neos/Flow 8.4 |
christian wrote on slack
so lets try that as well? |
I created a PR against 8.3 here: #3427 |
with php 8.4 implicit nullable types are deprecated: https://stitcher.io/blog/new-in-php-84#implicit-nullable-types-deprecation
These are a few usages that i found just in the interfaces:
flow-development-collection/Neos.Cache/Classes/Frontend/FrontendInterface.php
Line 59 in ea98fd3
flow-development-collection/Neos.Flow/Classes/Property/TypeConverterInterface.php
Line 113 in cf6165b
... and also in neos - https://github.com/neos/neos-development-collection/blob/ee36cc29460aa2005a22b577080a85ba505a6d1f/Neos.Neos/Classes/Service/DataSource/DataSourceInterface.php#L44
As i tested it should be non breaking to adjust
PropertyMappingConfigurationInterface $configuration = null
to bePropertyMappingConfigurationInterface|null $configuration = null
event if someone implemented it and doesnt use|null
yet. That seems to be possible because the implementation narrows the type which seams legal in php. Meaning we can actually adjust that at any time so Flow 9.0 would be php8.4 compatible in that aspect at some point.The text was updated successfully, but these errors were encountered: