سلام و خسته نباشید خدمت دوستان راکتی
ورژن لاراول من 7 بود و طبق مستندات لاراول و آموزش مهندس موسوی ورژن اون رو به 8 تغییر دادم و هیچ خطایی نداشتم و پروژه کار میکنه.
اما الان میخوام از 8 به 9 تغییر بدم و خطا دارم
ورژن php رو هم عوض کردم قبلش و طبق مستندات فایل composer.json رو تغییر دادم
اما هنگام اجرای دستور composr update خطای زیر رو دریافت میکنم و آبدیت انجام نمیشه.
Problem 1 - Conclusion: don't install fruitcake/laravel-cors v1.0.3 (conflict analysis result) - Conclusion: don't install fruitcake/laravel-cors v1.0.6 (conflict analysis result) - fruitcake/laravel-cors[v1.0.1, ..., v1.0.2] require php ^7.1.3 -> your php version (8.1.2) does not satisfy that requirement. - illuminate/support[v5.6.0, ..., 5.8.x-dev] require php ^7.1.3 -> your php version (8.1.2) does not satisfy that requirement. - illuminate/support[v6.0.0, ..., v6.19.1] require php ^7.2 -> your php version (8.1.2) does not satisfy that requ irement. - Root composer.json requires fruitcake/laravel-cors ^1.0 -> satisfiable by fruitcake/laravel-cors[v1.0.0, ..., 1. 0.x-dev]. - Conclusion: don't install laravel/framework v9.0.0-beta.2 (conflict analysis result) - Conclusion: don't install laravel/framework v9.0.0-beta.3 (conflict analysis result) - Conclusion: don't install laravel/framework v9.0.0-beta.4 (conflict analysis result) - Conclusion: don't install laravel/framework v9.0.0-beta.5 (conflict analysis result) - Conclusion: don't install laravel/framework v9.0.0 (conflict analysis result) - Conclusion: don't install laravel/framework v9.0.1 (conflict analysis result) - Conclusion: don't install laravel/framework v9.0.2 (conflict analysis result) - Conclusion: don't install laravel/framework v9.1.0 (conflict analysis result) - Conclusion: don't install laravel/framework v9.2.0 (conflict analysis result) - Conclusion: don't install laravel/framework v9.3.0 (conflict analysis result) - Conclusion: don't install laravel/framework v9.3.1 (conflict analysis result) - Conclusion: don't install laravel/framework v9.4.0 (conflict analysis result) - Conclusion: don't install laravel/framework v9.4.1 (conflict analysis result) - Conclusion: don't install laravel/framework v9.5.0 (conflict analysis result) - Conclusion: don't install laravel/framework v9.5.1 (conflict analysis result) - Conclusion: don't install laravel/framework v9.0.0-beta.1 (conflict analysis result) - fruitcake/laravel-cors v1.0.0 requires illuminate/support ^5.5|^6 -> satisfiable by illuminate/support[v5.5.0, . .., 5.8.x-dev, v6.0.0, ..., 6.x-dev]. - Only one of these can be installed: illuminate/support[v5.0.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ... , 7.x-dev, v8.0.0, ..., 8.x-dev, v9.0.0-beta.1, ..., 9.x-dev], laravel/framework[v9.0.0-beta.1, ..., 9.x-dev]. laravel /framework replaces illuminate/support and thus cannot coexist with it. - Root composer.json requires laravel/framework ^9.0 -> satisfiable by laravel/framework[v9.0.0-beta.1, ..., 9.x-d ev]. Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked t o specific versions.
خب حل مشکل رو خلاصه میگم که دوستان استفاده کنن
با تشکر فراوان از دوست خوبم @endworld در حل این مشکل و صبر و شکیبایی زیادشون
درمرحله ی اول نیاز هست تا ورژن پکیج زیر رو به شکلی که میبینید در composer تغییر بدید.
"fruitcake/laravel-cors": "^3.0"
بعد از اون طبق سایت خود لاراول در فایل app/Http/Middleware/TrustProxies.php
دو تغییر ایجاد کنید
use Fideloper\Proxy\TrustProxies as Middleware رو حذف کنید
use Illuminate\Http\Middleware\TrustProxies as Middleware. رو به جاش قرار بدید
و تغییر دوم مقدارheader
protected $headers = Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO | Request::HEADER_X_FORWARDED_AWS_ELB;
مرحله بعد پکیج رو حذف کنید composer remove fideloper/proxy
و تمام
composer update رو بزنید.
درود خوبی ..
مشکل از وابستگی laravel-cors است.
پیوند زیر:
https://github.com/fruitcake/laravel-cors/issues/458
@endworld سلام ممنون شما خوبید؟
این پیوند رو دیدم سرچ زدم یه بار چند لینک رو
پکیج پاک نمیشه که دوباره نصب بشه
حتی بعضیا نوشته بودن composer.lock رو پاک کنم و مجدد composer install بزنم ولی باز هم نشد.
PS C:\Users\lucifer\Desktop\restaurants> composer why asm89/stack-cors fruitcake/laravel-cors v1.0.6 requires asm89/stack-cors (^1.3) PS C:\Users\lucifer\Desktop\restaurants> composer remove barryvdh/laravel-cors barryvdh/laravel-cors is not required in your composer.json and has not been removed ./composer.json has been updated Running composer update barryvdh/laravel-cors Loading composer repositories with package information Package "barryvdh/laravel-cors" listed for update is not locked. Dependency laravel/framework is also a root requirement. Package has not been listed as an update argument, so keeping locked at old version. Use --with-all-dependencies (-W) to include root dependencies. Updating dependencies Your requirements could not be resolved to an installable set of packages. Problem 1 - Root composer.json requires laravel/framework ^9.0, found laravel/framework[v9.0.0-beta.1, ..., 9.x-dev] but the package is fixed to v8.83.5 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument f or the update command. Problem 2 - Root composer.json requires nunomaduro/collision ^6.1, found nunomaduro/collision[v6.1.0] but the package is fixed to v5.11 .0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update c ommand. Problem 3 - fzaninotto/faker is locked to version v1.9.2 and an update of this package was not requested. - fzaninotto/faker v1.9.2 requires php ^5.3.3 || ^7.0 -> your php version (8.1.2) does not satisfy that requirement. Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions. Removal failed, reverting ./composer.json to its original content. PS C:\Users\lucifer\Desktop\restaurants>
مشکل وابستگی ها اینه که نمی تونه در لاراول ۹ نصب بشه چون به روز رسانی آن نیامده است.
پیوند زیر:
https://roocket.ir/discuss/11884
@endworld اگر مشکل پکیج fruitcake/laravel-cors هست
این که خودش نوشته برا لاراول 9 لینکم داده
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.
آخرین نسخه لاراول ۹.۲ هستش و توی مشکل اول آمده که laravel/framework ^9.0 نشون میده.
باید composer.json نسخه ۹.۰ به ۹.۲ تغییر بدید
https://github.com/laravel/laravel/pull/5825/files
بعد composer update بزن...
@endworld
انجام دادم نشد
PS C:\Users\lucifer\Desktop\restaurants> composer update Loading composer repositories with package information Info from https://repo.packagist.org: #StandWithUkraine Updating dependencies Your requirements could not be resolved to an installable set of packages. Problem 1 - Conclusion: don't install fruitcake/laravel-cors v1.0.3 (conflict analysis result) - Conclusion: don't install fruitcake/laravel-cors v1.0.6 (conflict analysis result) - fruitcake/laravel-cors[v1.0.1, ..., v1.0.2] require php ^7.1.3 -> your php version (8.1.2) does not satisfy that requirement. - illuminate/support[v5.6.0, ..., 5.8.x-dev] require php ^7.1.3 -> your php version (8.1.2) does not satisfy that requirement. - illuminate/support[v6.0.0, ..., v6.19.1] require php ^7.2 -> your php version (8.1.2) does not satisfy that requirement. - Root composer.json requires fruitcake/laravel-cors ^1.0 -> satisfiable by fruitcake/laravel-cors[v1.0.0, ..., 1.0.x-dev]. - Conclusion: don't install laravel/framework v9.3.0 (conflict analysis result) - Conclusion: don't install laravel/framework v9.3.1 (conflict analysis result) - Conclusion: don't install laravel/framework v9.4.0 (conflict analysis result) - Conclusion: don't install laravel/framework v9.4.1 (conflict analysis result) - Conclusion: don't install laravel/framework v9.5.0 (conflict analysis result) - Conclusion: don't install laravel/framework v9.5.1 (conflict analysis result) - Conclusion: don't install laravel/framework v9.2.0 (conflict analysis result) - fruitcake/laravel-cors v1.0.0 requires illuminate/support ^5.5|^6 -> satisfiable by illuminate/support[v5.5.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev]. - Only one of these can be installed: illuminate/support[v5.0.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev, v9.0.0-beta.1, ..., 9.x-dev], laravel/framework[v9.2.0, ..., 9.x-dev]. laravel/fr amework replaces illuminate/support and thus cannot coexist with it. - Root composer.json requires laravel/framework ^9.2 -> satisfiable by laravel/framework[v9.2.0, ..., 9.x-dev]. Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions. PS C:\Users\lucifer\Desktop\restaurants>
مشکل laravel-core :
https://github.com/fruitcake/laravel-cors/issues/458
مشکل illuminate/support:
https://stackoverflow.com/questions/71122732/upgrading-laravel-into-8-i-got-illuminate-support-support
اینارو تست کن
@endworld
همون لینک اول بود ولی بازم همه رو زدم
حتی یه سایت دیگ فلگی داشت برا ابدیت که ورژن ها require ها رو نادیده بگیره اونم تست کردم نشد.
PS C:\Users\lucifer\Desktop\restaurants> composer remove fruitcake / laravel-cors fruitcake is not required in your composer.json and has not been removed / is not required in your composer.json and has not been removed laravel-cors is not required in your composer.json and has not been removed ./composer.json has been updated Running composer update fruitcake / laravel-cors Loading composer repositories with package information Package "fruitcake" listed for update is not locked. Package "/" listed for update is not locked. Package "laravel-cors" listed for update is not locked. Dependency laravel/framework is also a root requirement. Package has not been listed as an update argument, so keeping locked at old version. Use --with-all-dependencies (-W) to include root dependencies. Updating dependencies Your requirements could not be resolved to an installable set of packages. Problem 1 - Root composer.json requires laravel/framework ^9.0, found laravel/framework[v9.0.0-beta.1, ..., 9.x-dev] but the package is fixed to v8.83.5 (lock file version) by a partial update and that version does not match. Make sure yo u list it as an argument for the update command. Problem 2 - Root composer.json requires nunomaduro/collision ^6.1, found nunomaduro/collision[v6.1.0] but the package is fixed to v5.11.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command. Problem 3 - fzaninotto/faker is locked to version v1.9.2 and an update of this package was not requested. - fzaninotto/faker v1.9.2 requires php ^5.3.3 || ^7.0 -> your php version (8.1.2) does not satisfy that requirement. Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions. Removal failed, reverting ./composer.json to its original content. PS C:\Users\lucifer\Desktop\restaurants> composer require fruitcake/laravel-cors Using version ^3.0 for fruitcake/laravel-cors ./composer.json has been updated Running composer update fruitcake/laravel-cors Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages. Problem 1 - Root composer.json requires laravel/framework ^9.0, found laravel/framework[v9.0.0-beta.1, ..., 9.x-dev] but the package is fixed to v8.83.5 (lock file version) by a partial update and that version does not match. Make sure yo u list it as an argument for the update command. Problem 2 - Root composer.json requires nunomaduro/collision ^6.1, found nunomaduro/collision[v6.1.0] but the package is fixed to v5.11.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command. Problem 3 - fzaninotto/faker is locked to version v1.9.2 and an update of this package was not requested. - fzaninotto/faker v1.9.2 requires php ^5.3.3 || ^7.0 -> your php version (8.1.2) does not satisfy that requirement. Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions. You can also try re-running composer require with an explicit version constraint, e.g. "composer require fruitcake/laravel-cors:*" to figure out if any version is installable, or "composer require fruitcake/laravel-cors:^2.1" if you know which you need. Installation failed, reverting ./composer.json and ./composer.lock to their original content. PS C:\Users\lucifer\Desktop\restaurants> composer remove barryvdh/laravel-cors barryvdh/laravel-cors is not required in your composer.json and has not been removed ./composer.json has been updated Running composer update barryvdh/laravel-cors Loading composer repositories with package information Package "barryvdh/laravel-cors" listed for update is not locked. Dependency laravel/framework is also a root requirement. Package has not been listed as an update argument, so keeping locked at old version. Use --with-all-dependencies (-W) to include root dependencies. Updating dependencies Your requirements could not be resolved to an installable set of packages. Problem 1 - Root composer.json requires laravel/framework ^9.0, found laravel/framework[v9.0.0-beta.1, ..., 9.x-dev] but the package is fixed to v8.83.5 (lock file version) by a partial update and that version does not match. Make sure yo u list it as an argument for the update command. Problem 2 - Root composer.json requires nunomaduro/collision ^6.1, found nunomaduro/collision[v6.1.0] but the package is fixed to v5.11.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command. Problem 3 - fzaninotto/faker is locked to version v1.9.2 and an update of this package was not requested. - fzaninotto/faker v1.9.2 requires php ^5.3.3 || ^7.0 -> your php version (8.1.2) does not satisfy that requirement. Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions. Removal failed, reverting ./composer.json to its original content. PS C:\Users\lucifer\Desktop\restaurants> composer require fruitcake/laravel-cors --prefer-dist Using version ^3.0 for fruitcake/laravel-cors ./composer.json has been updated Running composer update fruitcake/laravel-cors Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages. Problem 1 - Root composer.json requires laravel/framework ^9.0, found laravel/framework[v9.0.0-beta.1, ..., 9.x-dev] but the package is fixed to v8.83.5 (lock file version) by a partial update and that version does not match. Make sure yo u list it as an argument for the update command. Problem 2 - Root composer.json requires nunomaduro/collision ^6.1, found nunomaduro/collision[v6.1.0] but the package is fixed to v5.11.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command. Problem 3 - fzaninotto/faker is locked to version v1.9.2 and an update of this package was not requested. - fzaninotto/faker v1.9.2 requires php ^5.3.3 || ^7.0 -> your php version (8.1.2) does not satisfy that requirement. Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions. You can also try re-running composer require with an explicit version constraint, e.g. "composer require fruitcake/laravel-cors:*" to figure out if any version is installable, or "composer require fruitcake/laravel-cors:^2.1" if you know which you need. Installation failed, reverting ./composer.json and ./composer.lock to their original content. PS C:\Users\lucifer\Desktop\restaurants> composer remove fruitcake/laravel-cors ./composer.json has been updated Running composer update fruitcake/laravel-cors Loading composer repositories with package information Dependency laravel/framework is also a root requirement. Package has not been listed as an update argument, so keeping locked at old version. Use --with-all-dependencies (-W) to include root dependencies. Updating dependencies Your requirements could not be resolved to an installable set of packages. Problem 1 - Root composer.json requires laravel/framework ^9.0, found laravel/framework[v9.0.0-beta.1, ..., 9.x-dev] but the package is fixed to v8.83.5 (lock file version) by a partial update and that version does not match. Make sure yo u list it as an argument for the update command. Problem 2 - Root composer.json requires nunomaduro/collision ^6.1, found nunomaduro/collision[v6.1.0] but the package is fixed to v5.11.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command. Problem 3 - fzaninotto/faker is locked to version v1.9.2 and an update of this package was not requested. - fzaninotto/faker v1.9.2 requires php ^5.3.3 || ^7.0 -> your php version (8.1.2) does not satisfy that requirement. Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions. Removal failed, reverting ./composer.json to its original content. Removal failed, fruitcake/laravel-cors is still present, it may be required by another package. See `composer why fruitcake/laravel-cors`. PS C:\Users\lucifer\Desktop\restaurants> composer require asm89/stack-cors "2.0.0" ./composer.json has been updated Running composer update asm89/stack-cors Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages. Problem 1 - Root composer.json requires asm89/stack-cors 2.0.0, found asm89/stack-cors[2.0.0] but these were not loaded, likely because it conflicts with another require. Problem 2 - Root composer.json requires laravel/framework ^9.0, found laravel/framework[v9.0.0-beta.1, ..., 9.x-dev] but the package is fixed to v8.83.5 (lock file version) by a partial update and that version does not match. Make sure yo u list it as an argument for the update command. Problem 3 - Root composer.json requires nunomaduro/collision ^6.1, found nunomaduro/collision[v6.1.0] but the package is fixed to v5.11.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command. Problem 4 - fruitcake/laravel-cors is locked to version v1.0.6 and an update of this package was not requested. - fruitcake/laravel-cors v1.0.6 requires asm89/stack-cors ^1.3 -> found asm89/stack-cors[1.3.0] but it conflicts with your root composer.json require (2.0.0). Problem 5 - fzaninotto/faker is locked to version v1.9.2 and an update of this package was not requested. - fzaninotto/faker v1.9.2 requires php ^5.3.3 || ^7.0 -> your php version (8.1.2) does not satisfy that requirement. Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions. Installation failed, reverting ./composer.json and ./composer.lock to their original content. PS C:\Users\lucifer\Desktop\restaurants> composer require fruitcake/laravel-cors "2.0.0" ./composer.json has been updated Running composer update fruitcake/laravel-cors Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages. Problem 1 - Root composer.json requires laravel/framework ^9.0, found laravel/framework[v9.0.0-beta.1, ..., 9.x-dev] but the package is fixed to v8.83.5 (lock file version) by a partial update and that version does not match. Make sure yo u list it as an argument for the update command. Problem 2 - Root composer.json requires nunomaduro/collision ^6.1, found nunomaduro/collision[v6.1.0] but the package is fixed to v5.11.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command. Problem 3 - Root composer.json requires fruitcake/laravel-cors 2.0.0 -> satisfiable by fruitcake/laravel-cors[v2.0.0]. - fruitcake/laravel-cors v2.0.0 requires asm89/stack-cors ^2 -> found asm89/stack-cors[dev-master, 2.0.0-beta1, ..., 2.1.x-dev (alias of dev-master)] but the package is fixed to 1.3.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command. Problem 4 - fzaninotto/faker is locked to version v1.9.2 and an update of this package was not requested. - fzaninotto/faker v1.9.2 requires php ^5.3.3 || ^7.0 -> your php version (8.1.2) does not satisfy that requirement. Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions. Installation failed, reverting ./composer.json and ./composer.lock to their original content. PS C:\Users\lucifer\Desktop\restaurants>
@endworld
نصب با خطا ی زیر مواجه شد
PS C:\Users\lucifer\Desktop\restaurants> composer update Loading composer repositories with package information Info from https://repo.packagist.org: #StandWithUkraine Updating dependencies Lock file operations: 6 installs, 24 updates, 8 removals - Removing asm89/stack-cors (1.3.0) - Removing facade/flare-client-php (1.9.1) - Removing facade/ignition (2.17.5) - Removing fruitcake/laravel-cors (v1.0.6) - Removing opis/closure (3.6.3) - Removing swiftmailer/swiftmailer (v6.3.0) - Removing symfony/polyfill-iconv (v1.25.0) - Removing symfony/polyfill-php73 (v1.25.0) - Upgrading egulias/email-validator (2.1.25 => 3.1.2) - Locking fruitcake/php-cors (v1.2.0) - Upgrading fzaninotto/faker (v1.9.2 => dev-master 5ffe7db) - Upgrading laravel/framework (v8.83.5 => v9.5.1) - Upgrading league/flysystem (1.1.9 => 3.0.12) - Upgrading nunomaduro/collision (v5.11.0 => v6.1.0) - Upgrading psr/container (1.1.2 => 2.0.2) - Locking spatie/backtrace (1.2.1) - Locking spatie/flare-client-php (1.1.0) - Locking spatie/ignition (1.2.4) - Locking spatie/laravel-ignition (1.0.10) - Upgrading symfony/console (v5.4.5 => v6.0.5) - Upgrading symfony/css-selector (v5.4.3 => v6.0.3) - Upgrading symfony/deprecation-contracts (v2.5.0 => v3.0.0) - Upgrading symfony/error-handler (v5.4.3 => v6.0.3) - Upgrading symfony/event-dispatcher (v5.4.3 => v6.0.3) - Upgrading symfony/event-dispatcher-contracts (v2.5.0 => v3.0.0) - Upgrading symfony/finder (v5.4.3 => v6.0.3) - Upgrading symfony/http-foundation (v5.4.6 => v6.0.6) - Upgrading symfony/http-kernel (v5.4.6 => v6.0.6) - Locking symfony/mailer (v6.0.5) - Upgrading symfony/mime (v5.4.3 => v6.0.3) - Upgrading symfony/process (v5.4.5 => v6.0.5) - Upgrading symfony/routing (v5.4.3 => v6.0.5) - Upgrading symfony/service-contracts (v2.5.0 => v3.0.0) - Upgrading symfony/string (v5.4.3 => v6.0.3) - Upgrading symfony/translation (v5.4.6 => v6.0.6) - Upgrading symfony/translation-contracts (v2.5.0 => v3.0.0) - Upgrading symfony/var-dumper (v5.4.6 => v6.0.6) - Upgrading voku/portable-ascii (1.6.1 => 2.0.1) Writing lock file Installing dependencies from lock file (including require-dev) Package operations: 6 installs, 24 updates, 8 removals - Downloading voku/portable-ascii (2.0.1) - Downloading symfony/css-selector (v6.0.3) - Downloading symfony/var-dumper (v6.0.6) - Downloading symfony/routing (v6.0.5) - Downloading symfony/process (v6.0.5) - Downloading symfony/mime (v6.0.3) - Downloading psr/container (2.0.2) - Downloading symfony/service-contracts (v3.0.0) - Downloading symfony/event-dispatcher-contracts (v3.0.0) - Downloading symfony/event-dispatcher (v6.0.3) - Downloading egulias/email-validator (3.1.2) - Downloading symfony/mailer (v6.0.5) - Downloading symfony/deprecation-contracts (v3.0.0) - Downloading symfony/http-foundation (v6.0.6) - Downloading symfony/error-handler (v6.0.3) - Downloading symfony/http-kernel (v6.0.6) - Downloading symfony/finder (v6.0.3) - Downloading symfony/string (v6.0.3) - Downloading symfony/console (v6.0.5) - Downloading symfony/translation-contracts (v3.0.0) - Downloading symfony/translation (v6.0.6) - Downloading league/flysystem (3.0.12) - Downloading fruitcake/php-cors (v1.2.0) - Downloading laravel/framework (v9.5.1) - Downloading fzaninotto/faker (dev-master 5ffe7db) - Downloading nunomaduro/collision (v6.1.0) - Removing symfony/polyfill-php73 (v1.25.0) - Removing symfony/polyfill-iconv (v1.25.0) - Removing swiftmailer/swiftmailer (v6.3.0) - Removing opis/closure (3.6.3) - Removing fruitcake/laravel-cors (v1.0.6) - Removing facade/ignition (2.17.5) - Removing facade/flare-client-php (1.9.1) - Removing asm89/stack-cors (1.3.0) - Upgrading voku/portable-ascii (1.6.1 => 2.0.1): Extracting archive - Upgrading symfony/css-selector (v5.4.3 => v6.0.3): Extracting archive - Upgrading symfony/var-dumper (v5.4.6 => v6.0.6): Extracting archive - Upgrading symfony/routing (v5.4.3 => v6.0.5): Extracting archive - Upgrading symfony/process (v5.4.5 => v6.0.5): Extracting archive - Upgrading symfony/mime (v5.4.3 => v6.0.3): Extracting archive - Upgrading psr/container (1.1.2 => 2.0.2): Extracting archive - Upgrading symfony/service-contracts (v2.5.0 => v3.0.0): Extracting archive - Upgrading symfony/event-dispatcher-contracts (v2.5.0 => v3.0.0): Extracting archive - Upgrading symfony/event-dispatcher (v5.4.3 => v6.0.3): Extracting archive - Upgrading egulias/email-validator (2.1.25 => 3.1.2): Extracting archive - Installing symfony/mailer (v6.0.5): Extracting archive - Upgrading symfony/deprecation-contracts (v2.5.0 => v3.0.0): Extracting archive - Upgrading symfony/http-foundation (v5.4.6 => v6.0.6): Extracting archive - Upgrading symfony/error-handler (v5.4.3 => v6.0.3): Extracting archive - Upgrading symfony/http-kernel (v5.4.6 => v6.0.6): Extracting archive - Upgrading symfony/finder (v5.4.3 => v6.0.3): Extracting archive - Upgrading symfony/string (v5.4.3 => v6.0.3): Extracting archive - Upgrading symfony/console (v5.4.5 => v6.0.5): Extracting archive - Upgrading symfony/translation-contracts (v2.5.0 => v3.0.0): Extracting archive - Upgrading symfony/translation (v5.4.6 => v6.0.6): Extracting archive - Upgrading league/flysystem (1.1.9 => 3.0.12): Extracting archive - Installing fruitcake/php-cors (v1.2.0): Extracting archive - Upgrading laravel/framework (v8.83.5 => v9.5.1): Extracting archive - Upgrading fzaninotto/faker (v1.9.2 => dev-master 5ffe7db): Extracting archive - Upgrading nunomaduro/collision (v5.11.0 => v6.1.0): Extracting archive - Installing spatie/backtrace (1.2.1): Extracting archive - Installing spatie/flare-client-php (1.1.0): Extracting archive - Installing spatie/ignition (1.2.4): Extracting archive - Installing spatie/laravel-ignition (1.0.10): Extracting archive Package fzaninotto/faker is abandoned, you should avoid using it. No replacement was suggested. Generating optimized autoload files > Illuminate\Foundation\ComposerScripts::postAutoloadDump > @php artisan package:discover --ansi Error Undefined constant Illuminate\Http\Request::HEADER_X_FORWARDED_ALL at C:\Users\lucifer\Desktop\restaurants\vendor\fideloper\proxy\config\trustedproxy.php:48 44▕ * - 'HEADER_X_FORWARDED_AWS_ELB' (If you are using AWS Elastic Load Balancer) 45▕ * 46▕ * @link https://symfony.com/doc/current/deployment/proxies.html 47▕ */ ➜ 48▕ 'headers' => Illuminate\Http\Request::HEADER_X_FORWARDED_ALL, 49▕ 50▕ ]; 51▕ 1 C:\Users\lucifer\Desktop\restaurants\vendor\laravel\framework\src\Illuminate\Support\ServiceProvider.php:138 require() 2 C:\Users\lucifer\Desktop\restaurants\vendor\fideloper\proxy\src\TrustedProxyServiceProvider.php:28 Illuminate\Support\ServiceProvider::mergeConfigFrom("C:\Users\lucifer\Desktop\restaurants\vendor\fideloper\proxy\config\trustedproxy.php", "trustedproxy") Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
ولی از این لینک خطا رو طبق گفتش use و header رو تغییر دادم
مجدد اجرا کردم باز هم خطا میده
ولی راه حل قبلیش ک تایید نشده گفته composer remove fideloper/proxy رو هم انجام بده
انجام دادم و مجدد update اجرا کردم
PS C:\Users\lucifer\Desktop\restaurants> composer remove fideloper/proxy ./composer.json has been updated Running composer update fideloper/proxy Loading composer repositories with package information Updating dependencies Lock file operations: 0 installs, 0 updates, 1 removal - Removing fideloper/proxy (4.4.1) Writing lock file Installing dependencies from lock file (including require-dev) Package operations: 0 installs, 0 updates, 1 removal - Removing fideloper/proxy (4.4.1) Package fzaninotto/faker is abandoned, you should avoid using it. No replacement was suggested. Generating optimized autoload files > Illuminate\Foundation\ComposerScripts::postAutoloadDump > @php artisan package:discover --ansi Discovered Package: intervention/image Discovered Package: kavenegar/laravel Discovered Package: laravel/tinker Discovered Package: laravel/ui Discovered Package: livewire/livewire Discovered Package: maatwebsite/excel Discovered Package: nesbot/carbon Discovered Package: nunomaduro/collision Discovered Package: shetabit/payment Discovered Package: spatie/laravel-ignition Package manifest generated successfully. > @php artisan vendor:publish --force --tag=livewire:assets --ansi Copied Directory [\vendor\livewire\livewire\dist] To [\public\vendor\livewire] Publishing complete. 83 packages you are using are looking for funding. Use the `composer fund` command to find out more! PS C:\Users\lucifer\Desktop\restaurants> composer update Loading composer repositories with package information Info from https://repo.packagist.org: #StandWithUkraine Updating dependencies Nothing to modify in lock file Installing dependencies from lock file (including require-dev) Nothing to install, update or remove Package fzaninotto/faker is abandoned, you should avoid using it. No replacement was suggested. Generating optimized autoload files > Illuminate\Foundation\ComposerScripts::postAutoloadDump > @php artisan package:discover --ansi Discovered Package: intervention/image Discovered Package: kavenegar/laravel Discovered Package: laravel/tinker Discovered Package: laravel/ui Discovered Package: livewire/livewire Discovered Package: maatwebsite/excel Discovered Package: nesbot/carbon Discovered Package: nunomaduro/collision Discovered Package: shetabit/payment Discovered Package: spatie/laravel-ignition Package manifest generated successfully. > @php artisan vendor:publish --force --tag=livewire:assets --ansi Copied Directory [\vendor\livewire\livewire\dist] To [\public\vendor\livewire] Publishing complete. 83 packages you are using are looking for funding. Use the `composer fund` command to find out more! PS C:\Users\lucifer\Desktop\restaurants>
الان ابدیت شده :/
پروژه اجرا کردم خود پروژه خطای زیر رو داد
Target class [Fruitcake\Cors\HandleCors] does not exist.
همون پکیجی که اول کاری اسمشو از composer حذف کردم
اسمش رو اضاف کردم چون ورژن 1 بود بازم خطا داد
composer require fruitcake/laravel-cors زدم ورژن 3 نصب کرد خودش
برای خطای
Target class [Fruitcake\Cors\HandleCors] does not exist.
کد زیر:
#Add [Barryvdh\Cors\HandleCors] to $middlewareGroups in Kernel.php 'cors' => [ \Barryvdh\Cors\HandleCors::class, ],
@salar.mohammad2013
یه بررسی کن کاربرد وابستگی fideloper/proxy چیه ...
اگر می ببنید مهم است, این وابستگی رو نصب کن.
@endworld خیالم راحت شد
خود سایت لاراول کاری که گفته بودمو گفته انجام بدید و خود پکیجم گفته برا لاراول 9 استفاده نکنید .
Laravel 9.x Docs (Don't use this package. Explanation here, Upgrade
docs here)
آیا مایل به ارسال نوتیفیکیشن و اخبار از طرف راکت هستید ؟