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

PHP8 adaptations #59

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

PHP8 adaptations #59

wants to merge 1 commit into from

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