#Laravel upgrade - CORS to install or not ?

1 messages · Page 1 of 1 (latest)

dark haven
#

Laravel upgrade - CORS to install or not ?

real marsh
#

What they mean to say is that the laravel skeleton included that package by default from 7.x - 8.x. While 6.x did not have it, so upgrading you would need to require yourself.

#

But that will be moot when you upgrade to 9.x and on to 10.x

#

As 9.x+ has the cors middleware/config actually built into the framework core.

dark haven
#

So this is what I need to do

#

right?

real marsh
#

Once you are at 9.x or 10.x yea

dark haven
#

I'm at 10 upgrade from 9

real marsh
#

and be sure you have their config file

dark haven
#

I checked 10's Kernel it's not having this line "\Illuminate\Http\Middleware\HandleCors::class"

#

this line is mandatory only if we come from older versions?

real marsh
#

The old version was the fruitcake one, if you had it at all

#

Rather, is something breaking?

dark haven
#

I never used CORS, at 7 upgrade they asked to installe it as shown in the first image

real marsh
#

Ah, you should be able to leave it commented out in the global middleware then

dark haven
#

now at 10 at composer update I got an issue, nortmal becaus the package is deprecatedd

#

ok perfect

#

thks

real marsh
#

yea remove the fruitcake

#

and leave the illuminate commented out

dark haven
#

I have a new one now lol

real marsh
#

Need to update your UI max version in your composer.json

#

"laravel/ui": "^4.0",

dark haven
#

Actually I have all custom views

#

I can remove it

real marsh
#

It still has namespaced classes in "backend"

#

from what I recall

dark haven
#

ok no risks so

real marsh
#

these are not copied over like breeze

dark haven
#

I go for 4

real marsh
#

yea just put to 4

dark haven
#

Nothing not necessary in your oppoinion?

#

I upgraded from 5.1 lol

real marsh
#

Well...the helpers for one, unless you really need that legacy package. No clue what symfony http client is. And carbon is a dependency of the framework's core already.

dark haven
#

Thank yhou so much

#

You are kind

#

Thius is your job?

real marsh
#

Yup, full stack, mainly backend.

#

Been using laravel since 2017.

dark haven
#

Great are you familiar with aspnet also?

real marsh
#

Nopeeee

dark haven
#

For security reasons I'll delete images and maybe the thread

#

I thank you so much and wish you a happy life