deprecated the spaceless tag

This commit is contained in:
Fabien Potencier
2019-03-07 10:58:10 +01:00
parent 65ea4c5296
commit 64f7c02431
4 changed files with 10 additions and 0 deletions
+2
View File
@@ -1,5 +1,7 @@
* 2.7.0 (2019-XX-XX)
* deprecated the spaceless tag
* added a spaceless filter
* added max value to the "random" function
* deprecated Twig\Extension\InitRuntimeInterface
* deprecated Twig\Loader\ExistsLoaderInterface
+4
View File
@@ -28,6 +28,10 @@ Errors
Tags
----
* The ``spaceless`` tag is deprecated in Twig 2.7. Use the ``spaceless`` filter
instead or ``{% filter spaceless %}`` (the ``Twig\Node\SpacelessNode`` and
``Twig\TokenParser\SpacelessTokenParser`` classes are also deprecated).
* Using the ``spaceless`` tag at the root level of a child template is
deprecated in Twig 2.5.0. This does not work as one would expect it to work
anyway. In Twig 3.0, it will throw a ``Twig\Error\SyntaxError`` exception.
+2
View File
@@ -18,6 +18,8 @@ use Twig\Compiler;
*
* It removes spaces between HTML tags.
*
* @deprecated since Twig 2.7, to be removed in 3.0
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class SpacelessNode extends Node implements NodeOutputInterface
+2
View File
@@ -23,6 +23,8 @@ use Twig\Token;
* </div>
* {% endspaceless %}
* {# output will be <div><strong>foo</strong></div> #}
*
* @deprecated since Twig 2.7, to be removed in 3.0 (use the spaceless filter instead)
*/
final class SpacelessTokenParser extends AbstractTokenParser
{