mercredi 8 février 2017

Laravel sessions no shutdown handler

I am working on session using Laravel as inspiration for my own code.

Normally when registering your custom session handler with session_set_save_handler you would also register a shutdown handler with session_register_shutdown or something alike.

Although Laravel implements the SessionHandlerInterface I see no mention of something that looks like a shutdown handler for when something goes wrong in the controller.

I know laravel does not use session_set_save_handler but uses their own solution.

Using their own solution would mean that if you ultimately don't reach the middleware again to call a save on the session you are screwed.

Is there a legitimate reason for this? I would love to know since I am building something alike and I feel like Laravel might be missing out here by not implementing something like this.

Then again I don't know if it even would be possible at this point so I am hoping somebody might provide me with some knowledge on why this is not done.

It seems strange for them to leave this wide open. Would love to hear some thoughts of people who use Laravel about this.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2kS0Xwf
via IFTTT

Aucun commentaire:

Enregistrer un commentaire