无法从 5.7 更新到 Laravel 5.8



我正在尝试将我的网站从Laravel5.7升级到5.8。

我将composer.jsonlaravel/framework更改为"5.8.*",然后运行composer update但作曲家的结果是这样的:

Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Writing lock file
Generating optimized autoload files
> IlluminateFoundationComposerScripts::postAutoloadDump
Carbon 1 is deprecated, see how to migrate to Carbon 2.
https://carbon.nesbot.com/docs/#api-carbon-2
You can run './vendor/bin/upgrade-carbon' to get help in updating carbon and other frameworks and libraries that depend on it.
> @php artisan package:discover
Discovered Package: barryvdh/laravel-dompdf
Discovered Package: barryvdh/laravel-ide-helper
Discovered Package: fideloper/proxy
Discovered Package: laravel/nexmo-notification-channel
Discovered Package: laravel/slack-notification-channel
Discovered Package: laravel/tinker
Discovered Package: laravelcollective/html
Discovered Package: maatwebsite/excel
Discovered Package: nesbot/carbon
Discovered Package: staudenmeir/dusk-updater
Discovered Package: yajra/laravel-datatables-buttons
Discovered Package: yajra/laravel-datatables-editor
Discovered Package: yajra/laravel-datatables-fractal
Discovered Package: yajra/laravel-datatables-html
Discovered Package: yajra/laravel-datatables-oracle
Package manifest generated successfully.
> IlluminateFoundationComposerScripts::postUpdate
> php artisan ide-helper:generate
A new helper file was written to _ide_helper.php
> php artisan ide-helper:meta
A new meta file was written to .phpstorm.meta.php

我什至尝试更新composer.lock中的版本号,但这也没有用,它只是将版本恢复为"5.7.28"。

编辑 1:

尝试也删除composer.lock但得到了类似的结果,这里是:

Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Writing lock file
Generating optimized autoload files
Carbon 1 is deprecated, see how to migrate to Carbon 2.
https://carbon.nesbot.com/docs/#api-carbon-2
You can run './vendor/bin/upgrade-carbon' to get help in updating carbon and other frameworks and libraries that depend on it.
> IlluminateFoundationComposerScripts::postAutoloadDump
> @php artisan package:discover
Discovered Package: barryvdh/laravel-dompdf
Discovered Package: barryvdh/laravel-ide-helper
Discovered Package: fideloper/proxy
Discovered Package: laravel/nexmo-notification-channel
Discovered Package: laravel/slack-notification-channel
Discovered Package: laravel/tinker
Discovered Package: laravelcollective/html
Discovered Package: maatwebsite/excel
Discovered Package: nesbot/carbon
Discovered Package: staudenmeir/dusk-updater
Discovered Package: yajra/laravel-datatables-buttons
Discovered Package: yajra/laravel-datatables-editor
Discovered Package: yajra/laravel-datatables-fractal
Discovered Package: yajra/laravel-datatables-html
Discovered Package: yajra/laravel-datatables-oracle
Package manifest generated successfully.
> IlluminateFoundationComposerScripts::postUpdate
> php artisan ide-helper:generate
A new helper file was written to _ide_helper.php
> php artisan ide-helper:meta
A new meta file was written to .phpstorm.meta.php

编辑2:

我这样做了:

composer require laravel/framework ^5.8

结果是:

./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Conclusion: don't install laravel/framework v5.8.24
- Conclusion: don't install laravel/framework v5.8.23
- Conclusion: don't install laravel/framework v5.8.22
- Conclusion: don't install laravel/framework v5.8.21
- Conclusion: don't install laravel/framework v5.8.20
- Conclusion: don't install laravel/framework v5.8.19
- Conclusion: don't install laravel/framework v5.8.18
- Conclusion: don't install laravel/framework v5.8.17
- Conclusion: don't install laravel/framework v5.8.16
- Conclusion: don't install laravel/framework v5.8.15
- Conclusion: don't install laravel/framework v5.8.14
- Conclusion: don't install laravel/framework v5.8.13
- Conclusion: don't install laravel/framework v5.8.12
- Conclusion: don't install laravel/framework v5.8.11
- Conclusion: don't install laravel/framework v5.8.10
- Conclusion: don't install laravel/framework v5.8.9
- Conclusion: don't install laravel/framework v5.8.8
- Conclusion: don't install laravel/framework v5.8.7
- Conclusion: don't install laravel/framework v5.8.6
- Conclusion: don't install laravel/framework v5.8.5
- Conclusion: don't install laravel/framework v5.8.4
- Conclusion: don't install laravel/framework v5.8.3
- Conclusion: don't install laravel/framework v5.8.2
- Conclusion: don't install laravel/framework v5.8.1
- laravelcollective/html v5.7.1 requires illuminate/view 5.7.* -> satisfiable by laravel/framework[v5.7.28], illuminate/view[5.7.17, 5.7.18, 5.7.19, v5.7.0, v5.7.1, v5.7.10, v5.7.11, v5.7.15, v5.7.2, v5.7.20, v5.7.21, v5.7.22, v5.7.23, v5.7.26, v5.7.27, v5.7.28, v5.7.3, v5.7.4, v5.7.5, v5.7.6, v5.7.7, v5.7.8, v5.7.9].
- laravelcollective/html v5.7.1 requires illuminate/view 5.7.* -> satisfiable by laravel/framework[v5.7.28], illuminate/view[5.7.17, 5.7.18, 5.7.19, v5.7.0, v5.7.1, v5.7.10, v5.7.11, v5.7.15, v5.7.2, v5.7.20, v5.7.21, v5.7.22, v5.7.23, v5.7.26, v5.7.27, v5.7.28, v5.7.3, v5.7.4, v5.7.5, v5.7.6, v5.7.7, v5.7.8, v5.7.9].
- laravelcollective/html v5.7.1 requires illuminate/view 5.7.* -> satisfiable by laravel/framework[v5.7.28], illuminate/view[5.7.17, 5.7.18, 5.7.19, v5.7.0, v5.7.1, v5.7.10, v5.7.11, v5.7.15, v5.7.2, v5.7.20, v5.7.21, v5.7.22, v5.7.23, v5.7.26, v5.7.27, v5.7.28, v5.7.3, v5.7.4, v5.7.5, v5.7.6, v5.7.7, v5.7.8, v5.7.9].
- Can only install one of: laravel/framework[v5.8.0, v5.7.28].
- don't install illuminate/view 5.7.17|don't install laravel/framework v5.8.0
- don't install illuminate/view 5.7.18|don't install laravel/framework v5.8.0
- don't install illuminate/view 5.7.19|don't install laravel/framework v5.8.0
- don't install illuminate/view v5.7.0|don't install laravel/framework v5.8.0
- don't install illuminate/view v5.7.1|don't install laravel/framework v5.8.0
- don't install illuminate/view v5.7.10|don't install laravel/framework v5.8.0
- don't install illuminate/view v5.7.11|don't install laravel/framework v5.8.0
- don't install illuminate/view v5.7.15|don't install laravel/framework v5.8.0
- don't install illuminate/view v5.7.2|don't install laravel/framework v5.8.0
- don't install illuminate/view v5.7.20|don't install laravel/framework v5.8.0
- don't install illuminate/view v5.7.21|don't install laravel/framework v5.8.0
- don't install illuminate/view v5.7.22|don't install laravel/framework v5.8.0
- don't install illuminate/view v5.7.23|don't install laravel/framework v5.8.0
- don't install illuminate/view v5.7.26|don't install laravel/framework v5.8.0
- don't install illuminate/view v5.7.27|don't install laravel/framework v5.8.0
- don't install illuminate/view v5.7.28|don't install laravel/framework v5.8.0
- don't install illuminate/view v5.7.3|don't install laravel/framework v5.8.0
- don't install illuminate/view v5.7.4|don't install laravel/framework v5.8.0
- don't install illuminate/view v5.7.5|don't install laravel/framework v5.8.0
- don't install illuminate/view v5.7.6|don't install laravel/framework v5.8.0
- don't install illuminate/view v5.7.7|don't install laravel/framework v5.8.0
- don't install illuminate/view v5.7.8|don't install laravel/framework v5.8.0
- don't install illuminate/view v5.7.9|don't install laravel/framework v5.8.0
- Installation request for laravel/framework ^5.8 -> satisfiable by laravel/framework[v5.8.0, v5.8.1, v5.8.10, v5.8.11, v5.8.12, v5.8.13, v5.8.14, v5.8.15, v5.8.16, v5.8.17, v5.8.18, v5.8.19, v5.8.2, v5.8.20, v5.8.21, v5.8.22, v5.8.23, v5.8.24, v5.8.3, v5.8.4, v5.8.5, v5.8.6, v5.8.7, v5.8.8, v5.8.9].
- Installation request for laravelcollective/html (locked at v5.7.1) -> satisfiable by laravelcollective/html[v5.7.1].

Installation failed, reverting ./composer.json to its original content.

有什么想法吗?

尝试使用这个

composer require laravel/framework ^5.8 --update-with-dependencies
--

update-with-dependencies:同时更新新需要的包的依赖关系,除了那些根需求。

或者在更新包时

composer update laravel/framework --with-dependencies
--

with-dependencies:将白名单包的依赖添加到白名单中,但那些根需求的依赖除外。

换句话说,这将更新除laravel/framework之外的其他软件包,这些软件包是更新到Laravel5.8所必需的。

您是否尝试按照错误消息中的建议运行./vendor/bin/upgrade-carbon?我最近在不同的框架中遇到了类似的问题,但是在将 Carbon 升级到 v2 后,我可以更新我的框架和其他软件包。

相关内容

  • 没有找到相关文章

最新更新