mirror of
https://github.com/twigphp/Twig.git
synced 2026-10-25 13:16:31 +00:00
removed remaining code supporting PSR-0 class names
This commit is contained in:
@@ -37,8 +37,7 @@ abstract class CallExpression extends AbstractExpression
|
||||
$compiler->raw(sprintf('$this->env->getRuntime(\'%s\')->%s', $callable[0], $callable[1]));
|
||||
}
|
||||
} elseif ($r instanceof \ReflectionMethod && $callable[0] instanceof ExtensionInterface) {
|
||||
// For BC/FC with namespaced aliases
|
||||
$class = (new \ReflectionClass(\get_class($callable[0])))->name;
|
||||
$class = \get_class($callable[0]);
|
||||
if (!$compiler->getEnvironment()->hasExtension($class)) {
|
||||
// Compile a non-optimized call to trigger a \Twig\Error\RuntimeError, which cannot be a compile-time error
|
||||
$compiler->raw(sprintf('$this->env->getExtension(\'%s\')', $class));
|
||||
|
||||
Reference in New Issue
Block a user