deprecated Parser::isReservedMacroName()

This commit is contained in:
Fabien Potencier
2019-02-15 03:37:30 +01:00
parent 185a11d243
commit 85972a040e
5 changed files with 19 additions and 7 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
* 2.6.3 (2019-XX-XX)
* 2.7.0 (2019-XX-XX)
* n/a
* deprecated Twig_Parser::isReservedMacroName()
* 2.6.2 (2019-01-14)
+1 -1
View File
@@ -51,7 +51,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "2.6-dev"
"dev-master": "2.7-dev"
}
}
}
+7
View File
@@ -38,3 +38,10 @@ The following classes are marked as ``@final`` in Twig 2 and will be final in
* ``Twig\TwigFunction``
* ``Twig\TwigTest``
* ``Twig\Profiler\Profile``
Parser
------
* As of Twig 2.7, the ``Twig_Parser::isReservedMacroName()`` / ``Twig\Parser``
function is deprecated and will be removed in Twig 3.0. It always returns
``false`` anyway as Twig 2 does not have any reserved macro names.
+4 -4
View File
@@ -16,11 +16,11 @@
*/
class Twig_Environment
{
const VERSION = '2.6.3-DEV';
const VERSION_ID = 20603;
const VERSION = '2.7.0-DEV';
const VERSION_ID = 20700;
const MAJOR_VERSION = 2;
const MINOR_VERSION = 6;
const RELEASE_VERSION = 3;
const MINOR_VERSION = 7;
const RELEASE_VERSION = 0;
const EXTRA_VERSION = 'DEV';
private $charset;
+5
View File
@@ -228,8 +228,13 @@ class Twig_Parser
$this->macros[$name] = $node;
}
/**
* @deprecated since 2.7 as there are no reserved macro names anymore, will be removed in 3.0.
*/
public function isReservedMacroName($name)
{
@trigger_error(sprintf('The "%s" method is deprecated since Twig 2.7 and will be removed in 3.0.', __METHOD__), E_USER_DEPRECATED);
return false;
}