4 This document lists all deprecated features in Twig. Deprecated features are
5 kept for backward compatibility and removed in the next major release (a
6 feature that was deprecated in Twig 1.x is removed in Twig 2.0).
11 * As of Twig 1.x, the token parser broker sub-system is deprecated. The
12 following class and interface will be removed in 2.0:
14 * ``Twig_TokenParserBrokerInterface``
15 * ``Twig_TokenParserBroker``
20 * As of Twig 1.x, the ability to remove an extension is deprecated and the
21 ``Twig_Environment::removeExtension()`` method will be removed in 2.0.
26 PEAR support will be discontinued in Twig 2.0, and no PEAR packages will be
27 provided. Use Composer instead.
32 * As of Twig 1.x, use ``Twig_SimpleFilter`` to add a filter. The following
33 classes and interfaces will be removed in 2.0:
35 * ``Twig_FilterInterface``
36 * ``Twig_FilterCallableInterface``
38 * ``Twig_Filter_Function``
39 * ``Twig_Filter_Method``
40 * ``Twig_Filter_Node``
42 * As of Twig 2.x, the ``Twig_SimpleFilter`` class is deprecated and will be
43 removed in Twig 3.x (use ``Twig_Filter`` instead). In Twig 2.x,
44 ``Twig_SimpleFilter`` is just an alias for ``Twig_Filter``.
49 * As of Twig 1.x, use ``Twig_SimpleFunction`` to add a function. The following
50 classes and interfaces will be removed in 2.0:
52 * ``Twig_FunctionInterface``
53 * ``Twig_FunctionCallableInterface``
55 * ``Twig_Function_Function``
56 * ``Twig_Function_Method``
57 * ``Twig_Function_Node``
59 * As of Twig 2.x, the ``Twig_SimpleFunction`` class is deprecated and will be
60 removed in Twig 3.x (use ``Twig_Function`` instead). In Twig 2.x,
61 ``Twig_SimpleFunction`` is just an alias for ``Twig_Function``.
66 * As of Twig 1.x, use ``Twig_SimpleTest`` to add a test. The following classes
67 and interfaces will be removed in 2.0:
69 * ``Twig_TestInterface``
70 * ``Twig_TestCallableInterface``
72 * ``Twig_Test_Function``
73 * ``Twig_Test_Method``
76 * As of Twig 2.x, the ``Twig_SimpleTest`` class is deprecated and will be
77 removed in Twig 3.x (use ``Twig_Test`` instead). In Twig 2.x,
78 ``Twig_SimpleTest`` is just an alias for ``Twig_Test``.
83 * As of Twig 2.x, the following interfaces are deprecated and empty (they will
84 be removed in Twig 3.0):
86 * ``Twig_CompilerInterface`` (use ``Twig_Compiler`` instead)
87 * ``Twig_LexerInterface`` (use ``Twig_Lexer`` instead)
88 * ``Twig_NodeInterface`` (use ``Twig_Node`` instead)
89 * ``Twig_ParserInterface`` (use ``Twig_Parser`` instead)
90 * ``Twig_ExistsLoaderInterface`` (merged with ``Twig_LoaderInterface``)
91 * ``Twig_TemplateInterface`` (use ``Twig_Template`` instead)
96 * As of Twig 2.x, the ability to register a global variable after the runtime
97 or the extensions have been initialized is not possible anymore (but
98 changing the value of an already registered global is possible).