Skip to content

Conversation

@marcing
Copy link
Collaborator

@marcing marcing commented Apr 11, 2025

PHP 8.4: Implicitly nullable parameter declarations deprecated

https://php.watch/versions/8.4/implicitly-marking-parameter-type-nullable-deprecated

Fixes error:
Implicitly marking parameter ? as nullable is deprecated, the explicit nullable type must be used instead

Fix using Zf1s\Compat\Types

@marcing marcing requested review from falkenhawk and partikus April 11, 2025 15:49
@marcing
Copy link
Collaborator Author

marcing commented Apr 11, 2025

What do you think about name of the Types class?
Should we rename it to something more specific like PHPUnit_Compatibility_Types or add a namespace?
I'm afraid the name of the class is too general and might conflict in future.
@partikus @falkenhawk

@falkenhawk
Copy link
Member

Nice utility class you invented here, please use the PHPUnit_Compatibility_Types name for it. I am only afraid that zf1s will also need a similar thing to run on php 8.4? It might be too heavy to introduce it there...

@marcing
Copy link
Collaborator Author

marcing commented Apr 13, 2025

Nice utility class you invented here, please use the PHPUnit_Compatibility_Types name for it. I am only afraid that zf1s will also need a similar thing to run on php 8.4? It might be too heavy to introduce it there...
@falkenhawk Ideas where to save and how to name the same class in Zend are very welcome, I keep wondering how should we proceed. We will have to implement it in 60 files.

composer.json Outdated
"autoload": {
"psr-4": {
"PHPUnit\\": "PHPUnit"
},
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indent consistency issue: previously space indent was used not tabs, also seems out of place (see it in github browser)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@glensc Thank you!

@falkenhawk
Copy link
Member

Nice utility class you invented here, please use the PHPUnit_Compatibility_Types name for it. I am only afraid that zf1s will also need a similar thing to run on php 8.4? It might be too heavy to introduce it there...

@falkenhawk Ideas where to save and how to name the same class in Zend are very welcome, I keep wondering how should we proceed. We will have to implement it in 60 files.

if it's really also needed for zf1 to make it compatible with 5.3-8.4, then perhaps extract it to a separate package, as a standalone repository in the zf1s org

@marcing marcing force-pushed the php84-nullable-deprecated branch 2 times, most recently from 8952815 to 8fcd0c4 Compare April 16, 2025 14:02
@marcing marcing force-pushed the php84-nullable-deprecated branch from 8fcd0c4 to 0742da9 Compare April 18, 2025 15:37
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.

4 participants