Lines Matching refs:Twig

4 This document lists all deprecated features in Twig. Deprecated features are
6 feature that was deprecated in Twig 1.x is removed in Twig 2.0).
11 As of Twig 1.21, Twig generates deprecation notices when a template uses
17 As of Twig 2.0, macros imported in a file are not available in child templates
24 * As of Twig 1.x, the token parser broker sub-system is deprecated. The
30 * As of Twig 1.27, ``\Twig\Parser::getFilename()`` is deprecated. From a token
33 * As of Twig 1.27, ``\Twig\Parser::getEnvironment()`` is deprecated.
38 * As of Twig 1.x, the ability to remove an extension is deprecated and the
39 ``\Twig\Environment::removeExtension()`` method will be removed in 2.0.
41 * As of Twig 1.23, the ``\Twig\Extension\ExtensionInterface::initRuntime()`` method is
46 ``\Twig\Extension\InitRuntimeInterface`` (not recommended).
48 * As of Twig 1.23, the ``\Twig\Extension\ExtensionInterface::getGlobals()`` method is
49 deprecated. Implement ``\Twig\Extension\GlobalsInterface`` to avoid
52 * As of Twig 1.26, the ``\Twig\Extension\ExtensionInterface::getName()`` method is
58 PEAR support has been discontinued in Twig 1.15.1, and no PEAR packages are
64 * As of Twig 1.x, use ``\Twig\TwigFilter`` to add a filter. The following
74 * As of Twig 2.x, the ``\Twig\TwigFilter`` class is deprecated and will be
75 removed in Twig 3.x (use ``Twig_Filter`` instead). In Twig 2.x,
76 ``\Twig\TwigFilter`` is just an alias for ``Twig_Filter``.
81 * As of Twig 1.x, use ``\Twig\TwigFunction`` to add a function. The following
91 * As of Twig 2.x, the ``\Twig\TwigFunction`` class is deprecated and will be
92 removed in Twig 3.x (use ``Twig_Function`` instead). In Twig 2.x,
93 ``\Twig\TwigFunction`` is just an alias for ``Twig_Function``.
98 * As of Twig 1.x, use ``\Twig\TwigTest`` to add a test. The following classes
108 * As of Twig 2.x, the ``\Twig\TwigTest`` class is deprecated and will be
109 removed in Twig 3.x (use ``Twig_Test`` instead). In Twig 2.x,
110 ``\Twig\TwigTest`` is just an alias for ``Twig_Test``.
118 * As of Twig 1.x, the ``raw`` tag is deprecated. You should use ``verbatim``
124 * As of Twig 1.x, ``Node::toXml()`` is deprecated and will be removed in Twig
127 * As of Twig 1.26, ``Node::$nodes`` should only contains ``\Twig\Node\Node``
129 Twig 2.x.
131 * As of Twig 1.27, the ``filename`` attribute on ``\Twig\Node\ModuleNode`` is
134 * As of Twig 1.27, the ``\Twig\Node\Node::getFilename()/\Twig\Node\Node::getLine()``
136 ``\Twig\Node\Node::getTemplateName()/\Twig\Node\Node::getTemplateLine()`` instead.
141 * As of Twig 2.x, the following interfaces are deprecated and empty (they will
142 be removed in Twig 3.0):
144 * ``Twig_CompilerInterface`` (use ``\Twig\Compiler`` instead)
145 * ``Twig_LexerInterface`` (use ``\Twig\Lexer`` instead)
146 * ``Twig_NodeInterface`` (use ``\Twig\Node\Node`` instead)
147 * ``Twig_ParserInterface`` (use ``\Twig\Parser`` instead)
148 * ``\Twig\Loader\ExistsLoaderInterface`` (merged with ``\Twig\Loader\LoaderInterface``)
149 * ``\Twig\Loader\SourceContextLoaderInterface`` (merged with ``\Twig\Loader\LoaderInterface``)
150 * ``Twig_TemplateInterface`` (use ``\Twig\Template`` instead, and use
151 those constants \Twig\Template::ANY_CALL, \Twig\Template::ARRAY_CALL,
152 \Twig\Template::METHOD_CALL)
157 * As of Twig 1.26, the ``\Twig\Compiler::getFilename()`` has been deprecated.
160 * As of Twig 1.27, the ``\Twig\Compiler::addIndentation()`` has been deprecated.
161 Use ``\Twig\Compiler::write('')`` instead.
166 * As of Twig 1.x, ``Twig_Loader_String`` is deprecated and will be removed in
167 2.0. You can render a string via ``\Twig\Environment::createTemplate()``.
169 * As of Twig 1.27, ``\Twig\Loader\LoaderInterface::getSource()`` is deprecated.
170 Implement ``\Twig\Loader\SourceContextLoaderInterface`` instead and use
177 …``\Twig\NodeVisitor\AbstractNodeVisitor`` instead of implementing ``\Twig\NodeVisitor\NodeVisitorI…
178 directly to make your node visitors compatible with both Twig 1.x and 2.x.
183 * As of Twig 2.x, the ability to register a global variable after the runtime
187 * As of Twig 1.x, using the ``_self`` global variable to get access to the
188 current ``\Twig\Template`` instance is deprecated; most usages only need the
189 current template name, which will continue to work in Twig 2.0. In Twig 2.0,
191 ``\Twig\Template`` instance. If you are using ``{{ _self.templateName }}``,
197 * As of Twig 1.x, ``\Twig\Environment::clearTemplateCache()``,
198 ``\Twig\Environment::writeCacheFile()``,
199 ``\Twig\Environment::clearCacheFiles()``,
200 ``\Twig\Environment::getCacheFilename()``,
201 ``\Twig\Environment::getTemplateClassPrefix()``,
202 ``\Twig\Environment::getLexer()``, ``\Twig\Environment::getParser()``, and
203 ``\Twig\Environment::getCompiler()`` are deprecated and will be removed in 2.0.
205 * As of Twig 1.x, ``\Twig\Template::getEnvironment()`` and
209 * As of Twig 1.21, setting the environment option ``autoescape`` to ``true`` is
212 * As of Twig 1.27, ``\Twig\Error\Error::getTemplateFile()`` and
213 ``\Twig\Error\Error::setTemplateFile()`` are deprecated. Use
214 ``\Twig\Error\Error::getTemplateName()`` and ``\Twig\Error\Error::setTemplateName()``
217 * As of Twig 1.27, ``\Twig\Template::getSource()`` is deprecated. Use
218 ``\Twig\Template::getSourceContext()`` instead.
220 * As of Twig 1.27, ``\Twig\Parser::addHandler()`` and
221 ``\Twig\Parser::addNodeVisitor()`` are deprecated and will be removed in 2.0.
223 * As of Twig 1.29, some classes are marked as being final via the `@final`