Skip to content

Commit

Permalink
deprecated Node::toXml()
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Oct 1, 2014
1 parent fcdb948 commit 0b2f373
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions doc/deprecated.rst
Expand Up @@ -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
----------

Expand Down
3 changes: 3 additions & 0 deletions lib/Twig/Node.php
Expand Up @@ -69,6 +69,9 @@ public function __toString()
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');
Expand Down

0 comments on commit 0b2f373

Please sign in to comment.