dunglas / DunglasActionBundle

Symfony controllers, redesigned
https://dunglas.fr/2016/01/dunglasactionbundle-symfony-controllers-redesigned/
MIT License
256 stars 14 forks source link

Problem with Symfony 3.3-dev and magic __set_state method #69

Open tommy-muehle opened 7 years ago

tommy-muehle commented 7 years ago

@dunglas Here are the issue (addressed via Slack). I got this issue with Symfony 3.3-dev. With Symfony 3.2.2 this code works fine.

Symfony\Component\Debug\Exception\UndefinedMethodException: Attempted to call an undefined method named "__set_state" of class "AppBundle\Action\Homepage". in /Users/tommy/Projects/Sites/tmy.li/app/var/cache/configProjectContainerUrlMatcher.php on line 36

The relevant part in the matcher class looks like this:

return array (  '_controller' =>   AppBundle\Action\Homepage::__set_state(array(     'viewDirectory' => '/Users/tommy/Projects/Sites/tmy.li/app/config/../web/views',  )),  '_route' => '_',    );

Here are the source for further details: https://github.com/tommy-muehle/tmy.li/tree/release/0.1.0/app

dunglas commented 7 years ago

Hi @tommy-muehle,

Can you reproduce this bug with the latest master of Symfony?

tommy-muehle commented 7 years ago

Hi @dunglas,

yes, still the same with "latest" master (ab93fea).