I'm trying to enject doctrine in controller:
This is my services:
services:
default_controller:
class: Catalog\WebBundle\Controller\DefaultController
arguments: [@doctrine.orm.entity_manager]
Controller:
public function __construct(EntityManager $em)
{
}
CRITICAL - Uncaught PHP Exception ErrorException: "Catchable Fatal Error: Argument 1 passed to Catalog\WebBundle\Controller\DefaultController::__construct() must be an instance of Doctrine\ORM\EntityManager, none given, called in /home/katalogas/domains/example.com/public_html/app/cache/dev/classes.php on line 2783 and defined in /home/katalogas/domains/example.com/public_html/src/Catalog/WebBundle/Controller/DefaultController.php line 23" at /home/katalogas/domains/example.com/public_html/src/Catalog/WebBundle/Controller/DefaultController.php line 23 Context: {"exception":"Object(ErrorException)"}
I'm sure that my service.yml is loaded, because when I make typo - get parse error.