Closed okdewit closed 5 years ago
Can you maybe provide the routes and controller for this? Would help to reproduce it.
Possibly related laravel/framework#27894
My issue was fixed by https://github.com/laravel/framework/pull/27935 in Laravel 5.8.5 👍
See comment on https://github.com/laravel/framework/issues/27731#issuecomment-472908169.
Given some controller route with a
return redirect()->back()
:And a browserkit test:
This is a simple "show" route + view, with an "archive" button + GET route which is this case is set up to just do a
redirect()->back()
again to the "show" page (I know it's not super REST-compliant, it's a legacy system).After migrating to Laravel 5.8, I noticed that some tests would rapidly fill up storage/framework/session directory with session files (hundreds of gigabytes).
It seems something changed regarding the way the session stores the previous URL.
Both with Laravel 5.7.21 and 5.8.3 everything works correctly when used with an actual browser, the "previous URL" on the archive action is identical to the "show" route.
When using the
->visit(...)->click(...)
methods in browserkit tests, the previous URL during theclick
request is the "archive" route itself, which leads to an infinite redirect loop.