fruitcake / laravel-cors

Adds CORS (Cross-Origin Resource Sharing) headers support in your Laravel application
MIT License
6.27k stars 617 forks source link

Composer error upon installing in Laravel 9 #571

Open MostafaNorzade opened 1 year ago

MostafaNorzade commented 1 year ago

Hi. I have PHP version 8.1.3. We have an error for updating Laravel to version 9

Root composer.json requires fruitcake/laravel-cors ^1.2.0, found fruitcake/laravel-cors
[dev-feat-lazyoptions, dev-feat-groupmiddleware, dev-test-single, dev-feat-middlewaretest, 
dev-feat-actions, dev-feat-browsertests, dev-master, dev-v1-backport, dev-feat-prependmiddleware, 
dev-develop, dev-barryvdh-test-laravel9, 
v0.1, ..., 0.11.x-dev, v1.0.0, ..., 1.0.x-dev, v2.0.0-beta1, ..., 2.2.x-dev, v3.0.0, 3.0.x-dev 
(alias of dev-master)] 
but it does not match the constraint.
mfn commented 1 year ago

See the readme https://github.com/fruitcake/laravel-cors#cors-middleware-for-laravel

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.