Symfony2 suddenly broke?

As far as I like Symfony2, this is not the first time I come back after a week has not developed, and there is a strange error message ...

Warning. The __PHP_Incomplete_Class class does not have a non-serializer on / var / www / my _app / vendor / symfony / src / Symfony / Component / Security / Core / Authentication / Token / AbstractToken.php line 153

Of course, I did not touch this file ... I tried to use it on Google, but found only the answers in which people used the cache: clear the team or install suppliers or relocated objects. As I said, I did nothing ... I changed the name of the directory where symfony2 is located, but this should not affect it ... In any case, I changed it later and still the same question. Clearing the cache (manually, deleted folders and logs) and restarting apache2 ...

Has anyone encountered the same problem before?

+5
source share
4 answers

The solution is to run the cache: clear the command

cd symfony/app
php console cache:clear

rather than just manually deleting folders / application for caches and applications / logs

+21
source

, . , Symfony, . , Symfony config.yml

framework:
    session:
        name: "NewSessionName"
+12

The quickest solution for me was

  • Open DevTools (Chrome / FF) (Win => F12, Mac => CMD + Shift + i) and go to
  • Resources-> Cookies → Domain / Host
  • Delete PHPSESSID and another file / All.

Need to work again!

Devtools Resources-Cookies

+3
source

`application / console cache: clear did not work in my case and returned only an error

solution: delete the contents of the cache manually

rm -r app/cache/dev/
+3
source

All Articles