Why do I have this error?
Catchable Fatal Error: Argument 1 passed to Application\Sonata\ProductBundle\Controller\ProductAdminController::__construct() must be an instance of ContainerInterface, instance of appDevDebugProjectContainer given
Here is my services.yml:
services:
product_admin_controller:
class: Application\Sonata\ProductBundle\Controller\ProductAdminController
arguments: ["@service_container"]
tags:
- { name: doctrine.event_listener, event: postLoad, connection: default }
And my controller:
class ProductAdminController extends Controller
{
protected $container;
public function __construct(\ContainerInterface $container)
{
$this->container = $container;
}
}