Fruitcake\Cors\CorsService issue on Laravel upgrading from 8 to 9.5 #41600
Unanswered
podrabinek
asked this question in
General
Replies: 1 comment
-
Leave it alone, latest framework upgrade still using Fruitcake\Cors\CorsService; https://github.com/laravel/framework/blob/9.x/src/Illuminate/Http/Middleware/HandleCors.php |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I've just upgraded Laravel from 8.5 to 9.5.1, everything went smoothly, but I've found one inconsistency:
On https://github.com/fruitcake/laravel-cors page there's a text about Laravel 9.2+:
Since Laravel 9.2, this Middleware is included in laravel/framework. You can use the provided middleware, which should be compatible with the Middleware and config provided in this package. See https://github.com/laravel/laravel/pull/5825/files for the changes.
According to https://github.com/laravel/laravel/pull/5825/files I've made the changes to my composer.json:
(-)
\Fruitcake\Cors\HandleCors::class,
(+)
\Illuminate\Http\Middleware\HandleCors::class,
Then upgraded the Laravel.
Now, if we go to the
vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php
file, we still see the FruitCake implementation:I've noticed that because of VSCode intelephense highlight - "Undefined type 'Fruitcake\Cors\CorsService'."
What should I do with this? Thanks
Beta Was this translation helpful? Give feedback.
All reactions