I have an old Symfony 2.4 app (with php 5) and a standard security (form_login
firewall & role based authorization). Let's call it app1.
Now I'm creating a new Symfony 3.3 app (php 7) that I'd like to use keeping sessions so users can switch from one to an other seamlessly. Let's call it app2. The users' authentication and storage would still be managed by app1.
These apps are hosted on the same domain, different subdomains. I managed to share the app1 session files into app2 (with Docker volumes).
Here is the session configuration of both apps:
framework:
session:
handler_id: session.handler.native_file
save_path: '%kernel.root_dir%/../var/sessions/%kernel.environment%'
cookie_domain: myapp.dev
So when I'm logged into app1 I'm expecting to be considered logged into app2 as well.
I'm seeing app2 sending the right cookie but it crashes saying :
Warning: Class __PHP_Incomplete_Class has no unserializer
It is actually trying to unserialize app1's user from the session but does not have the related User
implementation in app2.
How can app2 know that I'm logged in app1 ?