removed obsolete code

This commit is contained in:
Fabien Potencier
2016-10-17 15:13:54 -07:00
parent a7f0b26777
commit c5259552e1
4 changed files with 0 additions and 32 deletions
-6
View File
@@ -51,12 +51,6 @@ class Twig_Extension_Escaper extends Twig_Extension
*/
public function setDefaultStrategy($defaultStrategy)
{
if ('filename' === $defaultStrategy) {
@trigger_error('Using "filename" as the default strategy is deprecated since version 1.27. Use "name" instead.', E_USER_DEPRECATED);
$defaultStrategy = 'name';
}
if ('name' === $defaultStrategy) {
$defaultStrategy = array('Twig_FileExtensionEscapingStrategy', 'guess');
}
-20
View File
@@ -213,24 +213,4 @@ class Twig_Node implements Countable, IteratorAggregate
{
return $this->name;
}
/**
* @deprecated since 1.27 (to be removed in 2.0)
*/
public function setFilename($name)
{
@trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use setName() instead.', E_USER_DEPRECATED);
$this->setName($name);
}
/**
* @deprecated since 1.27 (to be removed in 2.0)
*/
public function getFilename()
{
@trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getName() instead.', E_USER_DEPRECATED);
return $this->name;
}
}
-2
View File
@@ -22,8 +22,6 @@ class Twig_Node_Embed extends Twig_Node_Include
parent::__construct(new Twig_Node_Expression_Constant('not_used', $lineno), $variables, $only, $ignoreMissing, $lineno, $tag);
$this->setAttribute('name', $name);
// to be removed in 2.0, used name instead
$this->setAttribute('filename', $name);
$this->setAttribute('index', $index);
}
-4
View File
@@ -44,10 +44,6 @@ class Twig_Node_Module extends Twig_Node
// embedded templates are set as attributes so that they are only visited once by the visitors
parent::__construct($nodes, array(
// source to be remove in 2.0
'source' => $this->source->getCode(),
// filename to be remove in 2.0 (use getName() instead)
'filename' => $this->source->getName(),
'index' => null,
'embedded_templates' => $embeddedTemplates,
), 1);