From what I can tell, Improved Session Engine Because new session layer is leaner and faster. Thus, the older one wasn't as lean, and was slow.
I believe you're right. When using $_SESSION it uses memory that a large public app cannot always afford.
"file" would be similar to native.
Why recreate a file/array session handler? Control. Knowing what's going on. Easier to debug when people raise issues. When things go wrong related to core PHP, php ini, or your server technology; Apache config, Nginx, etc.... it would be a head-ache. Controlling it all avoids having to work out who is to blame for a session bug.
Somebody over at reddit pointed me to a comment from Taylor Otwell that gives one of the reasons behind the change.
@christoferd it looks like you were correct - it's a matter of control. Specifically, the ability to control how the sessions were managed as part of Laravel's request/response cycle. Using PHP's native sessions meant that session cookie headers were sent outside of Laravel's response.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community