So, we have this project MASSIVE bare metal php, which we want to slowly convert to Symfony3
This is an ever-changing and updated project, so we need it to be transparent so as not to disturb the people who use it. They should not notice the difference at all.
So, the solution we decided to try was as follows:
- Paste the whole application in / web
- Store the script authenticator in an outdated application (it is too complicated to migrate to a new one and then updates the old one to use the new session system), since all it does is set a pair of $ _SESSION keys
- Nowhere in the application are any session variables set, just an authenticator.
The problem is that suffering through Legacy Bridge configuration and several stack overflow havent gotten us anywhere.
Using Bridge
Configuring with the bridge referred to in this document did not affect anything, except that the session he was reading did not add anything to the association $_SESSION['_sf2_attributes']or anywhere else for that matter.
Using the Bridge Component
According to this document , which describes the use of the component PhpBridgeSessionStorage, when it is configured, it displays:
ContextErrorException in the classes.php 83 line: Warning: ini_set (): active session. You cannot change session ini settings at this time
, liek . , NONE , , symfony
DefaultController.php on line 16:
array:3 [▼
"_sf2_attributes" => & []
"_sf2_flashes" => & []
"_sf2_meta" => & array:3 [▼
"u" => 1469839893
"c" => 1469836213
"l" => "0"
]
]
DefaultController.php on line 17:
Session {
"attributes" => AttributeBag {
-name: "attributes"
-storageKey: "_sf2_attributes"
}
"flashes" => FlashBag {
-name: "flashes"
-flashes: & []
-storageKey: "_sf2_flashes"
}
]
}
-name: "__metadata"
-storageKey: "_sf2_meta"
"u" => 1469839893
"c" => 1469836213
"l" => "0"
]
-lastUsed: 1469839892
-updateThreshold: "0"
}
}
-flashName: "flashes"
-attributeName: "attributes"
}
"" SO-
app/config/services.yml :
services:
session.legacy:
class: AppBundle\Session\LegacySessionHandler
tags:
- { name: kernel.event_listener, event: kernel.request, method: onKernelRequest }
:
LogicException NativeSessionStorage.php 240: .
, , :
, kernel.request - symfony, - $_SESSION. , $_SESSION .
, . , , ,
, - ...
- "F-it"
, _sf2_attributes , var_dump - $_SESSION, , _sf2_attributes, !
. , . symfony.
. , ?