How NOT to pass The Symfony Dependency Injection Container as an argument

This is the (almost undocumented) best practice for using the dependency injection container in Symfony, so Sensiolabs Insights won’t return an error that states “The Symfony Dependency Injection Container should not be passed as an argument“. Any class that needs to use the container service should implement the ContainerAwareInterface interface and in addition use the […]