Deprecate TwigRendererEngine::setEnvironment()
This commit is contained in:
parent
d29fc2ca9e
commit
aabb73cab8
@ -38,3 +38,9 @@ SecurityBundle
|
||||
|
||||
* The `FirewallContext::getContext()` method has been deprecated and will be removed in 4.0.
|
||||
Use the `getListeners()` method instead.
|
||||
|
||||
TwigBridge
|
||||
----------
|
||||
|
||||
* The `TwigRendererEngine::setEnvironment()` method has been deprecated and will be removed
|
||||
in 4.0. Pass the Twig Environment as second argument of the constructor instead.
|
||||
|
@ -217,6 +217,9 @@ TwigBridge
|
||||
* The possibility to inject the Form Twig Renderer into the form extension
|
||||
has been removed. Inject it into the `TwigRendererEngine` instead.
|
||||
|
||||
* The `TwigRendererEngine::setEnvironment()` method has been removed.
|
||||
Pass the Twig Environment as second argument of the constructor instead.
|
||||
|
||||
Validator
|
||||
---------
|
||||
|
||||
|
@ -41,9 +41,15 @@ class TwigRendererEngine extends AbstractRendererEngine implements TwigRendererE
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @deprecated since version 3.3, to be removed in 4.0
|
||||
*/
|
||||
public function setEnvironment(\Twig_Environment $environment)
|
||||
{
|
||||
if ($this->environment) {
|
||||
@trigger_error(sprintf('The "%s()" method is deprecated since version 3.3 and will be removed in 4.0. Pass the Twig Environment as second argument of the constructor instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
$this->environment = $environment;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user