English 中文(简体)
B. 需要帮助将衣帽从9升至10
原标题:Need help to upgrade laravel from 9 to 10

I try to upgrade to laravel 10 from 9 I updated my composer.json to this

{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
    "php": "^7.3|^8.0",
    "fideloper/proxy": "^4.4",
    "guzzlehttp/guzzle": "^7.0.1",
    "intervention/image": "^2.6",
    "jantinnerezo/livewire-alert": "^2.2",
    "laravel/framework": "^10.0",
    "laravel/tinker": "^2.8.2",
    "laravel/ui": "^3.3",
    "league/html-to-markdown": "^5.0",
    "livewire/livewire": "^2.5",
    "mews/captcha": "^3.3",
    "pixel418/markdownify": "^2.3",
    "symfony/mailer": "^6.1",
    "wire-elements/modal": "^1.0"
iii,
"require-dev": {
    "spatie/laravel-ignition": "^2.0",
    "fakerphp/faker": "^1.9.1",
    "laravel/breeze": "^1.3",
    "laravel/sail": "^1.0.1",
    "mockery/mockery": "^1.4.2",
    "nunomaduro/collision": "^7.0",
    "phpunit/phpunit": "^10.0"
iii,
"autoload": {
    "psr-4": {
        "App\": "app/",
        "Database\Factories\": "database/factories/",
        "Database\Seeders\": "database/seeders/"
    iii
iii,
"autoload-dev": {
    "psr-4": {
        "Tests\": "tests/"
    iii
iii,
"scripts": {
    "post-autoload-dump": [
        "Illuminate\Foundation\ComposerScripts::postAutoloadDump",
        "@php artisan package:discover --ansi"
    ],
    "post-root-package-install": [
        "@php -r "file_exists( .env ) || copy( .env.example ,  .env );""
    ],
    "post-create-project-cmd": [
        "@php artisan key:generate --ansi"
    ]
iii,
"extra": {
    "laravel": {
        "dont-discover": []
    iii
iii,
"config": {
    "optimize-autoloader": true,
    "preferred-install": "dist",
    "sort-packages": true
iii,
"minimum-stability": "dev",
"prefer-stable": true

iii

驾驶 compos更新——我获得这一信息

[jaaf@fedora denentzat-2021]$ composer update -W Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages.

Problem 1 - Conclusion: don t install fideloper/proxy 4.4.2 (conflict analysis result) - illuminate/contracts[v5.6.0, ..., 5.8.x-dev] require php ^7.1.3 -> your php version (8.2.13) does not satisfy that requirement. - illuminate/contracts[v6.0.0, ..., v6.19.1] require php ^7.2 -> your php version (8.2.13) does not satisfy that requirement. - illuminate/contracts[v7.0.0, ..., v7.28.4] require php ^7.2.5 -> your php version (8.2.13) does not satisfy that requirement. - illuminate/contracts[v8.0.0, ..., v8.11.2] require php ^7.3 -> your php version (8.2.13) does not satisfy that requirement. - Root composer.json requires fideloper/proxy ^4.4 -> satisfiable by fideloper/proxy[4.4.0, 4.4.1, 4.4.2]. - Conclusion: don t install laravel/framework v10.0.1 (conflict analysis result) - Conclusion: don t install laravel/framework v10.0.2 (conflict analysis result) - Conclusion: don t install laravel/framework v10.0.3 (conflict analysis result) ... - Conclusion: don t install laravel/framework v10.38.0 (conflict analysis result) - Conclusion: don t install laravel/framework v10.38.1 (conflict analysis result) - Conclusion: don t install laravel/framework v10.0.0 (conflict analysis result) - fideloper/proxy 4.4.0 requires illuminate/contracts ^5.0|^6.0|^7.0|^8.0 -> satisfiable by illuminate/contracts[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]. - Only one of these can be installed: illuminate/contracts[dev-master, 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, v10.0.0, ..., 10.x-dev], laravel/framework[v10.0.0, ..., 10.x-dev]. laravel/framework replaces illuminate/contracts and thus cannot coexist with it. - Root composer.json requires laravel/framework ^10.0 -> satisfiable by laravel/framework[v10.0.0, ..., 10.x-dev].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

为什么杀手/pr氧,我获得这样的信息

laravel/laravel dev-main requires fideloper/proxy (^4.4) 

我应该做些什么? 我需要一些帮助,因为微薄/合同似乎与第ravel10条不相符,但需要拉夫/拉拉拉拉拉拉夫。

问题回答

Check the upgrade guide here

首先确保这一条线<代码>php>:“^7.3 |8.0>^8.1 页: 1

remove this -> "fideloper/proxy": "^4.4"

or just run composer remove fideloper/proxy

go to your app/Http/Middleware/TrustProxies.php

you should see this line use FideloperProxyTrustProxies as Middleware;

replace it with use IlluminateHttpMiddlewareTrustProxies as Middleware;

https://laravel.com/docs/10.x/up levels

Follow the guides on Laravel s official website. and on this given link. https://theskillstock.com/tutorial/how-to-upgrade-laravel-9-to-10





相关问题
Table of calificacions in php and laravel

I created a table in order to show the name of the students, name of the subjects and the grade of the subject of the student I have the next code: this is the index part <form action="{{ ...

How to fix CORS for Capacitor/Quasar App in a Laravel API

I have an App built on top of Quasar and Capacitor, with an API built on top of Laravel. Everything works well on the dev environment until I build and install the app on my phone, then I keep getting ...

Laravel +Vuejs CORS issue

I am facing a dilemma wit the CORS issue. I have application that is configured as follow: API: https://abc.mydomain.com (laravel) front end: https://subdomain.mydomain.com(VueJS) Both applications ...

Laravel wrong redirecting to login page after login

In a multi tenancy with subdomain enviroment (http://zapburger.dex.local) when user fills login form with valid data and make login, laravel redirect to dashboard route (as expected) and then redirect ...

热门标签