Twig icon indicating copy to clipboard operation
Twig copied to clipboard

Allow inherited magic method to still run with calling class

Open nicolas-grekas opened this issue 1 year ago • 0 comments

This is #3719 ported to 2.x and improved a bit.

I also reported https://github.com/php/php-src/issues/8932 because the underlying behavior of PHP is broken to me.

If a static method cannot be resolved to the calling class, but the calling class has, or inherits, a __callStatic handler, this allows the __callStatic handler to be used with the calling class, and not the inherited class as would occur with reflection. This allows systems such as Laravel facades to still work.

Fixes https://github.com/twigphp/Twig/issues/3716

nicolas-grekas avatar Jul 06 '22 08:07 nicolas-grekas