Skip to content
This repository has been archived by the owner on Apr 20, 2021. It is now read-only.

Prefer reflection method getType as getClass deprected as of PHP 8.0 #297

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

Conversation

webdevel
Copy link

@webdevel webdevel commented Mar 3, 2021

Please consider releasing this quick patch supporting PHP upgrade. Thank you.

ReflectionParameter::getClass

Warning This function has been DEPRECATED as of PHP 8.0.0. Relying on this function is highly discouraged.

https://www.php.net/manual/en/reflectionparameter.getclass.php
https://www.php.net/manual/en/reflectionparameter.gettype.php

@silverbackdan
Copy link

Thanks for this, unfortunately your fork still results in my tests failing. I may try a PR as well to resolve this.

@silverbackdan
Copy link

Just created a new PR @webdevel - hopefully it would also work for you, but I imagine this fix already did the job for you. At least in my tests it has stopped the getClass method from ever being called if getType is available and has extracted this logic into a new method. #298

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants