Skip to content

Commit

Permalink
deprecated Twig_Environment::getTemplateClassPrefix
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Sep 12, 2015
1 parent c6ad6fe commit 0157315
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG
@@ -1,7 +1,7 @@
* 1.22.0 (2015-XX-XX)

* deprecated Twig_Environment::clearCacheFiles(), Twig_Environment::getCacheFilename(),
and Twig_Environment::writeCacheFile()
Twig_Environment::writeCacheFile(), and Twig_Environment::getTemplateClassPrefix()
* added a way to override the filesystem template cache system
* added a way to get the original template source from Twig_Template

Expand Down
4 changes: 2 additions & 2 deletions doc/deprecated.rst
Expand Up @@ -141,8 +141,8 @@ Miscellaneous
-------------

* As of Twig 1.x, ``Twig_Environment::clearTemplateCache()``, ``Twig_Environment::writeCacheFile()``,
``Twig_Environment::clearCacheFiles()``, and ``Twig_Environment::getCacheFilename()`` are deprecated and
will be removed in 2.0.
``Twig_Environment::clearCacheFiles()``, ``Twig_Environment::getCacheFilename()``, and
``Twig_Environment::getTemplateClassPrefix()`` are deprecated and will be removed in 2.0.

* As of Twig 1.x, ``Twig_Template::getEnvironment()`` and
``Twig_TemplateInterface::getEnvironment()`` are deprecated and will be
Expand Down
4 changes: 4 additions & 0 deletions lib/Twig/Environment.php
Expand Up @@ -305,9 +305,13 @@ public function getTemplateClass($name, $index = null)
* Gets the template class prefix.
*
* @return string The template class prefix
*
* @deprecated since 1.22 (to be removed in 2.0)
*/
public function getTemplateClassPrefix()
{
@trigger_error(sprintf('The %s method is deprecated and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED);

return $this->templateClassPrefix;
}

Expand Down

0 comments on commit 0157315

Please sign in to comment.