You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will not work in the most recent Symfony versions however, since some of these services are not public. It will lead to the following error for example:
[Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException]
The "file_locator" service or alias has been removed or inlined when the container was compiled. You should either make it public, or stop using the container directly and use dependency injection instead.
Exception trace:
() at …\c47dev\vendor\symfony\dependency-injection\Container.php:263
Symfony\Component\DependencyInjection\Container->make() at …\c47dev\vendor\symfony\dependency-injection\Container.php:225
Symfony\Component\DependencyInjection\Container->get() at …\c47dev\vendor\heimrichhannot\contao-utils-bundle\src\Container\ContainerUtil.php:39
HeimrichHannot\UtilsBundle\Container\ContainerUtil->__construct() at …\c47dev\var\cache\prod\ContainerXM42E9V\getHuh_Utils_ContainerService.php:11
Instead of getting the services from the container, you need to use dependency injection.
The text was updated successfully, but these errors were encountered:
In the constructor of the
ContainerUtil
you are retrieving a lot of services from the Symfony Container:contao-utils-bundle/src/Container/ContainerUtil.php
Lines 36 to 42 in 153bf15
This will not work in the most recent Symfony versions however, since some of these services are not
public
. It will lead to the following error for example:Instead of getting the services from the container, you need to use dependency injection.
The text was updated successfully, but these errors were encountered: