Skip to content

Commit 5420a5e

Browse files
Add the aliases
1 parent 71af32b commit 5420a5e

File tree

331 files changed

+2151
-169
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

331 files changed

+2151
-169
lines changed

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
* 1.34.0 (2017-XX-XX)
22

3+
* added namespaced aliases for all (non-deprecated) classes and interfaces
34
* dropped HHVM support
45
* dropped PHP 5.2 support
56

lib/Twig/BaseNodeVisitor.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,5 @@ abstract protected function doEnterNode(Twig_Node $node, Twig_Environment $env);
4848
*/
4949
abstract protected function doLeaveNode(Twig_Node $node, Twig_Environment $env);
5050
}
51+
52+
class_alias('Twig_BaseNodeVisitor', 'Twig\NodeVisitor\AbstractNodeVisitor', false);

lib/Twig/Cache/Filesystem.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,5 @@ public function getTimestamp($key)
8989
return (int) @filemtime($key);
9090
}
9191
}
92+
93+
class_alias('Twig_Cache_Filesystem', 'Twig\Cache\FilesystemCache', false);

lib/Twig/Cache/Null.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,5 @@ public function getTimestamp($key)
3636
return 0;
3737
}
3838
}
39+
40+
class_alias('Twig_Cache_Null', 'Twig\Cache\NullCache', false);

lib/Twig/CacheInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,5 @@ public function load($key);
5454
*/
5555
public function getTimestamp($key);
5656
}
57+
58+
class_alias('Twig_CacheInterface', 'Twig\Cache\CacheInterface', false);

lib/Twig/Compiler.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,3 +279,5 @@ public function getVarName()
279279
return sprintf('__internal_%s', hash('sha256', uniqid(mt_rand(), true), false));
280280
}
281281
}
282+
283+
class_alias('Twig_Compiler', 'Twig\Compiler', false);

lib/Twig/ContainerRuntimeLoader.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,5 @@ public function load($class)
3535
}
3636
}
3737
}
38+
39+
class_alias('Twig_ContainerRuntimeLoader', 'Twig\RuntimeLoader\ContainerRuntimeLoader', false);

lib/Twig/Environment.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1559,3 +1559,5 @@ private function updateOptionsHash()
15591559
$this->optionsHash = implode(':', $hashParts);
15601560
}
15611561
}
1562+
1563+
class_alias('Twig_Environment', 'Twig\Environment', false);

lib/Twig/Error.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,3 +358,5 @@ protected function guessTemplateInfo()
358358
}
359359
}
360360
}
361+
362+
class_alias('Twig_Error', 'Twig\Error\Error', false);

lib/Twig/Error/Loader.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,5 @@ public function __construct($message, $lineno = -1, $source = null, Exception $p
3636
$this->setTemplateLine(false);
3737
}
3838
}
39+
40+
class_alias('Twig_Error_Loader', 'Twig\Error\LoaderError', false);

0 commit comments

Comments
 (0)