-
Hi, Compared to v3 I had to insert a shared service sersessionbag because otherwise I have a PHP error (Service 'sessionBag' wasn't found in the dependency injection container). The problem is that in v3 Checking the session, in v3 I have a key for each controller, while in v4 I only have one key called "bag" (the name of the sessionbag). How can I solve the problem? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I encountered this exact same problem. Unfortunately, I wasn't able to find a solution using Before I came to that realization though, I was namespacing all my parameters. So rather than storing |
Beta Was this translation helpful? Give feedback.
-
After doing various tests, I added This way, it seems to be working as in v3. |
Beta Was this translation helpful? Give feedback.
After doing various tests, I added
$this->persistent = new \Phalcon\Session\Bag(get_class());
in the initailize method of my controllers.This way, it seems to be working as in v3.