Symfony 3.3.3 - default controller and container

Viewed 1930

I downloaded last stable version of Symfony (3.3.3) and on start I have error:

Attempted to call an undefined method named "getParameter" of class "AppBundle\Controller\DefaultController".

This is:

'base_dir' => realpath($this->getParameter('kernel.project_dir')).DIRECTORY_SEPARATOR,

Before 3.3.3 version Symfony controllers extended

Symfony\Bundle\FrameworkBundle\Controller\Controller.php

Now extends:

Symfony\Bundle\FrameworkBundle\Controller\AbstractController\AbstractController.php

So... How can I get data from container? In documentation (3.3 and 4.0 versions) Controller extends Controller, not AbstractController.

If I change AbstractController to Controller application works well, but do I should this change?

3 Answers
Related