contexts
contexts copied to clipboard
Prefer reflection method getType as getClass deprected as of PHP 8.0
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
Thanks for this, unfortunately your fork still results in my tests failing. I may try a PR as well to resolve this.
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. https://github.com/Behatch/contexts/pull/298