mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-17 21:07:18 +00:00
tweaked some deprecation messages
This commit is contained in:
@@ -450,7 +450,7 @@ class Twig_Environment
|
|||||||
*/
|
*/
|
||||||
public function clearTemplateCache()
|
public function clearTemplateCache()
|
||||||
{
|
{
|
||||||
@trigger_error(sprintf('%s is deprecated and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('The %s method is deprecated and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED);
|
||||||
|
|
||||||
$this->loadedTemplates = array();
|
$this->loadedTemplates = array();
|
||||||
}
|
}
|
||||||
@@ -715,7 +715,7 @@ class Twig_Environment
|
|||||||
*/
|
*/
|
||||||
public function removeExtension($name)
|
public function removeExtension($name)
|
||||||
{
|
{
|
||||||
@trigger_error(sprintf('%s is deprecated and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED);
|
@trigger_error(sprintf('The %s method is deprecated and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED);
|
||||||
|
|
||||||
if ($this->extensionInitialized) {
|
if ($this->extensionInitialized) {
|
||||||
throw new LogicException(sprintf('Unable to remove extension "%s" as extensions have already been initialized.', $name));
|
throw new LogicException(sprintf('Unable to remove extension "%s" as extensions have already been initialized.', $name));
|
||||||
@@ -837,7 +837,7 @@ class Twig_Environment
|
|||||||
$filter = $name;
|
$filter = $name;
|
||||||
$name = $filter->getName();
|
$name = $filter->getName();
|
||||||
} else {
|
} else {
|
||||||
@trigger_error(sprintf('Passing a name as a first argument to %s is deprecated. Pass an instance of "Twig_SimpleFilter" instead when defining filter "%s".', __METHOD__, $name), E_USER_DEPRECATED);
|
@trigger_error(sprintf('Passing a name as a first argument to the %s method is deprecated. Pass an instance of "Twig_SimpleFilter" instead when defining filter "%s".', __METHOD__, $name), E_USER_DEPRECATED);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->extensionInitialized) {
|
if ($this->extensionInitialized) {
|
||||||
@@ -928,7 +928,7 @@ class Twig_Environment
|
|||||||
$test = $name;
|
$test = $name;
|
||||||
$name = $test->getName();
|
$name = $test->getName();
|
||||||
} else {
|
} else {
|
||||||
@trigger_error(sprintf('Passing a name as a first argument to %s is deprecated. Pass an instance of "Twig_SimpleTest" instead when defining test "%s".', __METHOD__, $name), E_USER_DEPRECATED);
|
@trigger_error(sprintf('Passing a name as a first argument to the %s method is deprecated. Pass an instance of "Twig_SimpleTest" instead when defining test "%s".', __METHOD__, $name), E_USER_DEPRECATED);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->extensionInitialized) {
|
if ($this->extensionInitialized) {
|
||||||
@@ -988,7 +988,7 @@ class Twig_Environment
|
|||||||
$function = $name;
|
$function = $name;
|
||||||
$name = $function->getName();
|
$name = $function->getName();
|
||||||
} else {
|
} else {
|
||||||
@trigger_error(sprintf('Passing a name as a first argument to %s is deprecated. Pass an instance of "Twig_SimpleFunction" instead when defining function "%s".', __METHOD__, $name), E_USER_DEPRECATED);
|
@trigger_error(sprintf('Passing a name as a first argument to the %s method is deprecated. Pass an instance of "Twig_SimpleFunction" instead when defining function "%s".', __METHOD__, $name), E_USER_DEPRECATED);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->extensionInitialized) {
|
if ($this->extensionInitialized) {
|
||||||
|
|||||||
Reference in New Issue
Block a user