Конфликт пакетов зависимостей Composer при попытке обновления с Laravel 9 до 10Php

Кемеровские программисты php общаются здесь
Ответить
Anonymous
 Конфликт пакетов зависимостей Composer при попытке обновления с Laravel 9 до 10

Сообщение Anonymous »

Я пытаюсь обновить Laravel 9 до Laravel 10, но когда я пытаюсь обновить версию Laravel, пакет monolog/monolog конфликтует, поскольку он заблокирован до версии 2.9.1 в моем файле композитора.lock. Попробовал удалить композитор.lock, затем выполнил требование пакета monolog для ^3.0, чтобы заново сгенерировать композитор.lock с более новой версией, но что-то я, должно быть, делаю неправильно.
На моем композиторе.json, если я изменю laravel/framework на ^10.0 и обновлю композитор laravel/framework -W, я получу следующее:
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
- laravel/framework[v10.0.0, ..., 10.x-dev] require monolog/monolog ^3.0 -> found monolog/monolog[dev-main, 3.0.0-RC1, ..., 3.x-dev] but these were not loaded, likely because it conflicts with another require.
- Root composer.json requires laravel/framework ^10.0 -> satisfiable by laravel/framework[v10.0.0, ..., 10.x-dev].

Это мой композитор.json
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"php": "^8.0.2",
"guzzlehttp/guzzle": "^7.2",
"inertiajs/inertia-laravel": "^0.6.9",
"inspector-apm/inspector-laravel": "^4.7",
"laravel/framework": "^10.0",
"laravel/jetstream": "^2.7",
"laravel/sanctum": "^3.2.1",
"laravel/tinker": "^2.7",
"manifiesto/dashboard": "^0.4",
"monolog/monolog": "^2.0|^3.0",
"pestphp/pest": "^1.16",
"pestphp/pest-plugin-laravel": "^1.1",
"sentry/sentry-laravel": "^3.3",
"tightenco/ziggy": "^1.0"
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.6",
"fakerphp/faker": "^1.9.1",
"laravel/sail": "^1.0.1",
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^6.1",
"phpunit/phpunit": "^9.5.10",
"spatie/laravel-ignition": "^1.0"
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-update-cmd": [
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true,
"allow-plugins": {
"pestphp/pest-plugin": true,
"php-http/discovery": true
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"repositories": [
{
"type": "vcs",
"url": "git@bitbucket.org:manifiesto/dashboard.git"
}
]
}

Итак, если я сделаю композитор, почему бы и нет spatie/laravel-ignition ^2.0, я получу следующее:
spatie/laravel-ignition 2.2.0 requires illuminate/support (^10.0)
laravel/laravel dev-develop requires laravel/framework (^9.2)
Not finding what you were looking for? Try calling `composer update "spatie/laravel-ignition:^2.0" --dry-run` to get another view on the problem.

Итак, что заставляет меня здесь теряться (потому что я застрял в этом уже несколько дней и чувствую себя застрявшим и в цикле, где все, что я пытаюсь обновить, зависит от другого устаревшего пакета, и я не продвигаюсь вперед), так это то, что я не могу понять, что мне нужно обновить в первую очередь или в каком порядке мне следует следовать. Потому что сначала я думал, что spatie/laravel-ignition — это первое, что мне нужно обновить, но он также возвращает мне ошибки при попытке обновить его.
composer require "spatie/laravel-ignition:>=2.0.0" --with-all-dependencies
./composer.json has been updated
Running composer update spatie/laravel-ignition --with-all-dependencies
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 spatie/laravel-ignition >=2.0.0 -> satisfiable by spatie/laravel-ignition[2.0.0, ..., 2.2.0].
- tightenco/ziggy is locked to version v1.6.0 and an update of this package was not requested.
- tightenco/ziggy v1.6.0 requires laravel/framework >=5.4@dev -> satisfiable by laravel/framework[v9.2.0, ..., v9.52.10].
- Only one of these can be installed: illuminate/support[v9.0.0, ..., v9.52.10, v10.0.0, ..., v10.14.1], laravel/framework[v9.47.0, ..., v9.52.10]. laravel/framework replaces illuminate/support and thus cannot coexist with it.
- Conclusion: install illuminate/support v10.14.1 (conflict analysis result)

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

composer require illuminate/support:10.14.1 && composer update illumiante/support
./composer.json has been updated
Running composer update illuminate/support
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 illuminate/support 10.14.1, found illuminate/support[v10.14.1] but these were not loaded, likely because it conflicts with another require.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

composer why illuminate/support
barryvdh/laravel-debugbar v3.8.1 requires illuminate/support (^9|^10)
inspector-apm/inspector-laravel 4.7.31 requires illuminate/support (^5.5|^6.0|^7.0|^8.0|^9.0|^10.0)
laravel/fortify v1.17.4 requires illuminate/support (^8.82|^9.0|^10.0)
laravel/framework v9.52.10 replaces illuminate/support (self.version)
laravel/jetstream v2.16.2 requires illuminate/support (^9.21|^10.0)
laravel/sail v1.23.0 requires illuminate/support (^8.0|^9.0|^10.0)
laravel/sanctum v3.2.5 requires illuminate/support (^9.21|^10.0)
laravel/tinker v2.8.1 requires illuminate/support (^6.0|^7.0|^8.0|^9.0|^10.0)
sentry/sentry-laravel 3.6.0 requires illuminate/support (^6.0 | ^7.0 | ^8.0 | ^9.0 | ^10.0)
spatie/laravel-ignition 1.6.4 requires illuminate/support (^8.77|^9.27)

composer update spatie/laravel-ignition -W
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 spatie/laravel-ignition ^2.0 -> satisfiable by spatie/laravel-ignition[2.0.0, ..., 2.2.0].
- tightenco/ziggy is locked to version v1.6.0 and an update of this package was not requested.
- tightenco/ziggy v1.6.0 requires laravel/framework >=5.4@dev -> satisfiable by laravel/framework[v9.2.0, ..., v9.52.10].
- Only one of these can be installed: illuminate/support[v9.0.0, ..., v9.52.10, v10.0.0, ..., v10.14.1], laravel/framework[v9.47.0, ..., v9.52.10]. laravel/framework replaces illuminate/support and thus cannot coexist with it.
- Conclusion: install illuminate/support v10.14.1 (conflict analysis result)

Попытка обновить spatie/laravel-ignition и освещение/поддержку одновременно дает мне следующее:
composer update -W illuminate/support spatie/laravel-ignition
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 illuminate/support ^10.0 -> satisfiable by illuminate/support[v10.0.0, ..., v10.14.1].
- inertiajs/inertia-laravel v0.6.9 requires laravel/framework ^6.0|^7.0|^8.74|^9.0|^10.0 -> satisfiable by laravel/framework[v9.52.0, ..., v9.52.10].
- Only one of these can be installed: illuminate/support[v10.0.0, ..., v10.14.1], laravel/framework[v9.52.0, ..., v9.52.10]. laravel/framework replaces illuminate/support and thus cannot coexist with it.
- inertiajs/inertia-laravel is locked to version v0.6.9 and an update of this package was not requested.


Подробнее здесь: https://stackoverflow.com/questions/765 ... aravel-9-t
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «Php»