minor #23058 [TwigBundle] fix used class name in deprecation message (xabbuh)
This PR was merged into the 3.4 branch.
Discussion
----------
[TwigBundle] fix used class name in deprecation message
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
a4caa16
fix used class name in deprecation message
This commit is contained in:
commit
7140b52de7
@ -41,7 +41,7 @@ class TemplateCacheWarmer implements CacheWarmerInterface, ServiceSubscriberInte
|
|||||||
$this->container = $container;
|
$this->container = $container;
|
||||||
} elseif ($container instanceof Environment) {
|
} elseif ($container instanceof Environment) {
|
||||||
$this->twig = $container;
|
$this->twig = $container;
|
||||||
@trigger_error(sprintf('Using a "%s" as first argument of %s is deprecated since version 3.4 and will be unsupported in version 4.0. Use a %s instead.', Environment::class, __CLASS__, Container::class), E_USER_DEPRECATED);
|
@trigger_error(sprintf('Using a "%s" as first argument of %s is deprecated since version 3.4 and will be unsupported in version 4.0. Use a %s instead.', Environment::class, __CLASS__, ContainerInterface::class), E_USER_DEPRECATED);
|
||||||
} else {
|
} else {
|
||||||
throw new \InvalidArgumentException(sprintf('%s only accepts instance of Psr\Container\ContainerInterface as first argument.', __CLASS__));
|
throw new \InvalidArgumentException(sprintf('%s only accepts instance of Psr\Container\ContainerInterface as first argument.', __CLASS__));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user