diff --git a/src/Extension/CoreExtension.php b/src/Extension/CoreExtension.php index accad4ebc55..62ce17012b1 100644 --- a/src/Extension/CoreExtension.php +++ b/src/Extension/CoreExtension.php @@ -1499,7 +1499,7 @@ function twig_array_batch($items, $size, $fill = null) * @param mixed $object The object or array from where to get the item * @param mixed $item The item to get from the array or object * @param array $arguments An array of arguments to pass if the item is an object method - * @param string $type The type of attribute (@see \Twig_Template constants) + * @param string $type The type of attribute (@see \Twig\Template constants) * @param bool $isDefinedTest Whether this is only a defined check * @param bool $ignoreStrictCheck Whether to ignore the strict attribute check or not * @@ -1581,7 +1581,7 @@ function twig_get_attribute(Environment $env, Source $source, $object, $item, ar } if ($object instanceof Template) { - throw new RuntimeError('Accessing \Twig_Template attributes is forbidden.'); + throw new RuntimeError('Accessing \Twig\Template attributes is forbidden.'); } // object property diff --git a/src/ExtensionSet.php b/src/ExtensionSet.php index 3fd7ba2f833..63d360f3208 100644 --- a/src/ExtensionSet.php +++ b/src/ExtensionSet.php @@ -90,7 +90,7 @@ public function hasExtension($class) * * @param string $class The extension class name * - * @return ExtensionInterface A \Twig_ExtensionInterface instance + * @return ExtensionInterface */ public function getExtension($class) { @@ -195,7 +195,7 @@ public function getFunctions() * * @param string $name function name * - * @return TwigFunction|false A \Twig_Function instance or false if the function does not exist + * @return TwigFunction|false */ public function getFunction($name) { @@ -258,7 +258,7 @@ public function getFilters() * * @param string $name The filter name * - * @return TwigFilter|false A \Twig_Filter instance or false if the filter does not exist + * @return TwigFilter|false */ public function getFilter($name) { @@ -381,7 +381,7 @@ public function getTests() * * @param string $name The test name * - * @return TwigTest|false A \Twig_Test instance or false if the test does not exist + * @return TwigTest|false */ public function getTest($name) { @@ -475,7 +475,7 @@ private function initExtension(ExtensionInterface $extension) // token parsers foreach ($extension->getTokenParsers() as $parser) { if (!$parser instanceof TokenParserInterface) { - throw new \LogicException('getTokenParsers() must return an array of \Twig_TokenParserInterface.'); + throw new \LogicException('getTokenParsers() must return an array of \Twig\TokenParser\TokenParserInterface.'); } $this->parsers[] = $parser; diff --git a/src/Node/Expression/CallExpression.php b/src/Node/Expression/CallExpression.php index a32e37b09ca..de1738fb22a 100644 --- a/src/Node/Expression/CallExpression.php +++ b/src/Node/Expression/CallExpression.php @@ -40,7 +40,7 @@ protected function compileCallable(Compiler $compiler) // For BC/FC with namespaced aliases $class = (new \ReflectionClass(\get_class($callable[0])))->name; if (!$compiler->getEnvironment()->hasExtension($class)) { - // Compile a non-optimized call to trigger a \Twig_Error_Runtime, which cannot be a compile-time error + // 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)); } else { $compiler->raw(sprintf('$this->extensions[\'%s\']', ltrim($class, '\\'))); diff --git a/src/Node/Node.php b/src/Node/Node.php index 5f22425dfb0..ff9ced0c0ad 100644 --- a/src/Node/Node.php +++ b/src/Node/Node.php @@ -43,7 +43,7 @@ public function __construct(array $nodes = [], array $attributes = [], $lineno = { foreach ($nodes as $name => $node) { if (!$node instanceof self) { - throw new \InvalidArgumentException(sprintf('Using "%s" for the value of node "%s" of "%s" is not supported. You must pass a \Twig_Node instance.', \is_object($node) ? \get_class($node) : null === $node ? 'null' : \gettype($node), $name, \get_class($this))); + throw new \InvalidArgumentException(sprintf('Using "%s" for the value of node "%s" of "%s" is not supported. You must pass a \Twig\Node\Node instance.', \is_object($node) ? \get_class($node) : null === $node ? 'null' : \gettype($node), $name, \get_class($this))); } } $this->nodes = $nodes;