mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-14 11:27:00 +00:00
added deprecation notices for @final classes
This commit is contained in:
@@ -34,6 +34,10 @@ class Twig_Filter
|
||||
*/
|
||||
public function __construct(string $name, $callable = null, array $options = array())
|
||||
{
|
||||
if (__CLASS__ !== get_class($this)) {
|
||||
@trigger_error('Overriding '.__CLASS__.' is deprecated since version 2.4.0 and the class will be final in 3.0.', E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
$this->name = $name;
|
||||
$this->callable = $callable;
|
||||
$this->options = array_merge(array(
|
||||
|
||||
@@ -30,6 +30,10 @@ class Twig_Profiler_Profile implements IteratorAggregate, Serializable
|
||||
|
||||
public function __construct($template = 'main', $type = self::ROOT, $name = 'main')
|
||||
{
|
||||
if (__CLASS__ !== get_class($this)) {
|
||||
@trigger_error('Overriding '.__CLASS__.' is deprecated since version 2.4.0 and the class will be final in 3.0.', E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
$this->template = $template;
|
||||
$this->type = $type;
|
||||
$this->name = 0 === strpos($name, '__internal_') ? 'INTERNAL' : $name;
|
||||
|
||||
@@ -33,6 +33,10 @@ class Twig_Test
|
||||
*/
|
||||
public function __construct(string $name, $callable = null, array $options = array())
|
||||
{
|
||||
if (__CLASS__ !== get_class($this)) {
|
||||
@trigger_error('Overriding '.__CLASS__.' is deprecated since version 2.4.0 and the class will be final in 3.0.', E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
$this->name = $name;
|
||||
$this->callable = $callable;
|
||||
$this->options = array_merge(array(
|
||||
|
||||
Reference in New Issue
Block a user