I am trying to configure migration from Legacy code to Symfony, and I am trying to use legacy session variables between two applications.
Now I can var_dump($_SESSION)in app_dev.php, and the key user_idis from an outdated application. However, when I run the following in the controller, I do not get any session variables:
var_dump($request->getSession()->all());
To clarify , I currently have access to $_SESSION['user_id'], so the session is distributed among applications successfully, but the Symfony session object and parameter packages do not contain expired keys.
My goal:
- For the key
user_idthat will be available in the call$request->getSession() - For all other keys that will be available here.
My problems:
PHP Session bridge, , , . Symfony, , , - , Symfony.
Symfony , , "Bags", $_SESSION. , Symfony $_SESSION, , $_SESSION . [ ]
TheodoEvolutionSessionBundle, , Symfony 3.
, Symfony $_SESSION['_sf2_attributes'], , app_dev.php:
$_SESSION['_sf2_attributes']['user_id'] = $_SESSION['user_id'];
, session_start().
$_SESSION Symfony Session? - Symfony, ? , $_SESSION['_sf2_attributes'] "" , ?