mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-14 11:27:00 +00:00
tweaked some deprecation messages
This commit is contained in:
@@ -450,7 +450,7 @@ class Twig_Environment
|
||||
*/
|
||||
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();
|
||||
}
|
||||
@@ -715,7 +715,7 @@ class Twig_Environment
|
||||
*/
|
||||
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) {
|
||||
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;
|
||||
$name = $filter->getName();
|
||||
} 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) {
|
||||
@@ -928,7 +928,7 @@ class Twig_Environment
|
||||
$test = $name;
|
||||
$name = $test->getName();
|
||||
} 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) {
|
||||
@@ -988,7 +988,7 @@ class Twig_Environment
|
||||
$function = $name;
|
||||
$name = $function->getName();
|
||||
} 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) {
|
||||
|
||||
Reference in New Issue
Block a user