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:
Nicolas Grekas 2017-06-04 10:32:12 +02:00
commit 7140b52de7

View File

@ -41,7 +41,7 @@ class TemplateCacheWarmer implements CacheWarmerInterface, ServiceSubscriberInte
$this->container = $container;
} elseif ($container instanceof Environment) {
$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 {
throw new \InvalidArgumentException(sprintf('%s only accepts instance of Psr\Container\ContainerInterface as first argument.', __CLASS__));
}