php - Drupal 8 - 无法通过作曲家升级到最新版本
问题描述
我当前的 Drupal 版本:8.7.8。想升级到8.8.0。
我已经跑了
composer update
composer prohibits drupal/core:8.8.0
drupal/core 8.8.0 requires typo3/phar-stream-wrapper (^3.1.3)
drupal/drupal - requires typo3/phar-stream-wrapper (^2.1.1)
drupal/core 8.8.0 requires doctrine/annotations (^1.4)
drupal/drupal - does not require doctrine/annotations (but v1.2.7 is installed)
所以我跑
composer update drupal/core typo/* doctrine/* --with-dependencies
它给
Package "drupal/core" listed for update is not installed. Ignoring.
Package "typo/*" listed for update is not installed. Ignoring.
Loading composer repositories with package information
Updating dependencies (including require-dev)
The "http://repo.packagist.org/p/sdboyer/gliph%24a386760768df0346abad1d5c7e9e8dcf3eba1dd5aaa86a30ddc548504b0fffa0.json" file could not be downloaded: failed to open stream: Operation timed out
Retrying with degraded mode, check https://getcomposer.org/doc/articles/troubleshooting.md#degraded-mode for more info
[Composer\Downloader\TransportException]
The "http://repo.packagist.org/p/sdboyer/gliph%24a386760768df0346abad1d5c7e9e8dcf3eba1dd5aaa86a30ddc548504b0fffa0.json" file could not be downloaded: php_network_getaddresses: geta
ddrinfo failed: nodename nor servname provided, or not known
failed to open stream: php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known
上
composer outdated drupal/*
它给
drupal/admin_toolbar 1.27.0 2.0.0 Provides a drop-down menu interface to the core Drupal Toolbar.
所以我尝试了
composer update "drupal/admin_toolbar:^2.0"
Package "drupal/admin_toolbar:^2.0" listed for update is not installed. Ignoring.
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
- The requested package drupal/admin_toolbar (locked at 1.27.0, required as ^2.0) is satisfiable by drupal/admin_toolbar[1.27.0] but these conflict with your requirements or minimum-stability.
我还删除了composer.lock
文件vendor
夹并运行composer clearcache
thencomposer install
命令。
我不确定是什么导致问题升级。
解决方案
查看您composer.json
设置了哪些基本要求。
我认为您有一些非常具体的版本,范围会有所帮助。
从命令行或 json 中显式设置新版本(范围)(当然保存旧文件)。在文件中设置/更新多个版本比通过命令行更容易。
--with-dependencies
此外,使用该选项在一次运行中更新多个包也可能会有所帮助。
然后你会得到帮助,
composer update --dry-run
它会告诉你会发生什么,以及
composer why-not <packet>[:<version>]
为什么不能安装一个数据包(在版本中)。
推荐阅读
- excel - 使用用户表单对零件编号进行排序
- javascript - 为什么 JavaScript 的 string.split() 在某些情况下不能正常工作?
- sql - 获取存储过程、视图、函数中使用的表列列表
- python - 从列表中找到最接近的值?
- django - 为什么覆盖表单的init函数会使表单字段返回none
- javascript - 动态构建外部 API URL 和参数
- css - 有没有办法阻止詹金斯从构建摘要中剥离样式元素?
- python - Python 3.8.1 Discord.py 重写反应
- angular - 角度测试路线:SPEC HAS NO EXPECTATIONS 应该导航到 /tests
- django - CheckboxInput 始终显示为 True