Skip to content
New issue

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

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

Already on GitHub? # to your account

[9.x] Fix session retrieval from HTTP request #39830

Merged
merged 1 commit into from
Nov 30, 2021
Merged

Conversation

driesvints
Copy link
Member

This change is needed to circumvent the changes Symfony did in v6 for type-hinting their getSession method. I already had to remove the method in the Symfony v6 PR I made earlier:

https://github.com/laravel/framework/pull/38376/files#diff-4a2dd251f1519763d08bb47f9ae2e9029687a3208542d09e317166b89f57a7a7L491-L500

The reason why is that our own session store doesn't implements Symfony's SessionInterface so we can't return like that anymore. We can safely call ->session instead because we're checking if the object is a Laravel HTTP Request class with the self type-hint.

This also solves the failing issues with Laravel 9 support in Fortify.

@taylorotwell taylorotwell merged commit 49aac46 into master Nov 30, 2021
@driesvints driesvints deleted the driesvints-patch-1 branch November 30, 2021 14:17
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants