Skip to content

Commit

Permalink
[Bridge\Twig] Trigger deprecation when using FormExtension::$renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Dec 5, 2016
1 parent 456e68b commit ac478c2
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions src/Symfony/Bridge/Twig/Extension/FormExtension.php
Expand Up @@ -94,6 +94,54 @@ public function getTests()
);
}

/**
* @internal
*/
public function __get($name)
{
if ('renderer' === $name) {
@trigger_error(sprintf('Using the "%s::$renderer" property is deprecated since version 3.2 as it will be made private in 4.0.', __CLASS__), E_USER_DEPRECATED);
}

return $this->$name;
}

/**
* @internal
*/
public function __set($name, $value)
{
if ('renderer' === $name) {
@trigger_error(sprintf('Using the "%s::$renderer" property is deprecated since version 3.2 as it will be made private in 4.0.', __CLASS__), E_USER_DEPRECATED);
}

$this->$name = $value;
}

/**
* @internal
*/
public function __isset($name)
{
if ('renderer' === $name) {
@trigger_error(sprintf('Using the "%s::$renderer" property is deprecated since version 3.2 as it will be made private in 4.0.', __CLASS__), E_USER_DEPRECATED);
}

return isset($this->$name);
}

/**
* @internal
*/
public function __unset($name)
{
if ('renderer' === $name) {
@trigger_error(sprintf('Using the "%s::$renderer" property is deprecated since version 3.2 as it will be made private in 4.0.', __CLASS__), E_USER_DEPRECATED);
}

unset($this->$name);
}

/**
* {@inheritdoc}
*/
Expand Down

0 comments on commit ac478c2

Please sign in to comment.