Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[10.x] Set container instance on session manager #46621

Merged
merged 2 commits into from
Mar 31, 2023

Conversation

smortexa
Copy link
Contributor

@smortexa smortexa commented Mar 28, 2023

Related PR: laravel/octane#669

@taylorotwell
Copy link
Member

Can you explain why this is needed? What bug is it fixing in your application?

@smortexa
Copy link
Contributor Author

In the case of Octane, The SessionManager gives the old instance of $container and $config to session drivers and session handlers like CacheBasedSessionHandler. Even though the configuration and cache manager are being refreshed, the session manager still uses the old instance of $config and $contanier.

In my case, I needed to switch between drivers on the fly, and the problem was that the session manager didn't receive a new container instance and when I wanted to login with Fortify, the old cache driver was being used.

@taylorotwell taylorotwell merged commit ae8ee69 into laravel:10.x Mar 31, 2023
@smortexa smortexa deleted the fix/session_manager branch March 31, 2023 12:47
taylorotwell added a commit that referenced this pull request Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants