Skip to content

Conversation

@kerunaru
Copy link

Depending of which PHP version is running, a slightly different code is executed in order to adapt the code to the deprecations of ReflectionParameter::isArray() and ReflecionParameter::getClass().

I've based the modifications on the suggestions in this article on PHP.Watch

I've modified the is7 key because I need it to refer to PHP 7 only. The way it was implemented before, although I'm on PHP 8, it keeps returning 1. So now it checks if the current version is higher than 7 but lower than 8. I've also created an is8 key just to check if the current version is equals or higher than 8. The resulting code should be retrocompatible.

P.S.: Sorry for the trailing whitespaces deletions 😅

Changes calls to isArray() and getClass() methods from
ReflectionParameter in order to avoid deprecation warnings.
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.

1 participant