From 0b2f373fc46664251d6ea1c4d430b507f1b3c1b6 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Wed, 1 Oct 2014 13:19:23 +0200 Subject: [PATCH] deprecated Node::toXml() --- doc/deprecated.rst | 6 ++++++ lib/Twig/Node.php | 3 +++ 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/doc/deprecated.rst b/doc/deprecated.rst index b5155ab..30aaac1 100644 --- a/doc/deprecated.rst +++ b/doc/deprecated.rst @@ -80,6 +80,12 @@ Tests * The ``sameas`` and ``divisibleby`` tests are deprecated in favor of ``same as`` and ``divisible by`` respectively. +Nodes +----- + +* As of Twig 1.x, ``Node::toXml()`` is deprecated and will be removed in Twig + 2.0. + Interfaces ---------- diff --git a/lib/Twig/Node.php b/lib/Twig/Node.php index 978e766..085b4d2 100644 --- a/lib/Twig/Node.php +++ b/lib/Twig/Node.php @@ -69,6 +69,9 @@ class Twig_Node implements Twig_NodeInterface return implode("\n", $repr); } + /** + * @deprecated since 1.16.1 (to be removed in 3.0) + */ public function toXml($asDom = false) { $dom = new DOMDocument('1.0', 'UTF-8'); -- 1.7.2.5