我在更新Drupal 8核心版本时遇到问题。 Composer说我不应该安装drupal / core-renderer 8.2.0并删除Drupal核心。
我尝试删除composer.lock文件,vendor文件夹并按照composer的要求将核心版本替换为v8.2.0,但是当我运行“ composer require drupal / core”时,它将始终安装版本^ 8.7(最新版本)。 清除作曲家的缓存也无济于事。
我也不了解psr-http-message-bridge的问题。它没有出现在我的composer.json文件中,它是Drupal核心的内部内容。
这是composer命令的输出:
Problem 1
- don't install drupal/core-render 8.2.0|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.2.0-beta1|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.2.0-beta2|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.2.0-beta3|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.2.0-rc1|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.2.0-rc2|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.2.1|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.2.2|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.2.3|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.2.4|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.2.5|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.2.6|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.2.7|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.2.8|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.2.x-dev|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.3.0|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.3.0-alpha1|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.3.0-beta1|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.3.0-rc1|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.3.0-rc2|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.3.1|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.3.2|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.3.3|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.3.4|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.3.5|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.3.6|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.3.7|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.3.8|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.3.9|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.3.x-dev|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.4.0|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.4.0-alpha1|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.4.0-beta1|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.4.0-rc1|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.4.0-rc2|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.4.1|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.4.2|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.4.3|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.4.4|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.4.5|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.4.6|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.4.7|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.4.8|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.4.x-dev|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.5.0|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.5.0-alpha1|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.5.0-beta1|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.5.0-rc1|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.5.1|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.5.10|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.5.11|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.5.12|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.5.13|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.5.14|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.5.15|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.5.2|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.5.3|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.5.4|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.5.5|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.5.6|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.5.7|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.5.8|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.5.9|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.5.x-dev|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.6.0|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.6.0-alpha1|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.6.0-beta1|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.6.0-beta2|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.6.0-rc1|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.6.1|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.6.10|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.6.11|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.6.12|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.6.13|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.6.14|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.6.15|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.6.16|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.6.17|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.6.2|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.6.3|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.6.4|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.6.5|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.6.6|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.6.7|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.6.8|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.6.9|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.6.x-dev|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.7.0|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.7.0-alpha1|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.7.0-alpha2|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.7.0-beta1|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.7.0-beta2|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.7.0-rc1|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.7.1|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.7.2|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.7.3|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.7.4|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.7.5|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.7.6|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.7.7|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.7.8|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.7.x-dev|remove drupal/drupal dev-prueba_composer
- don't install drupal/core-render 8.8.x-dev|remove drupal/drupal dev-prueba_composer
- remove drupal/drupal dev-prueba_composer|remove drupal/core 8.7.8
- don't install drupal/core 8.7.0|remove drupal/drupal dev-prueba_composer
- don't install drupal/core 8.7.0-alpha1|remove drupal/drupal dev-prueba_composer
- don't install drupal/core 8.7.0-alpha2|remove drupal/drupal dev-prueba_composer
- don't install drupal/core 8.7.0-beta1|remove drupal/drupal dev-prueba_composer
- don't install drupal/core 8.7.0-beta2|remove drupal/drupal dev-prueba_composer
- don't install drupal/core 8.7.0-rc1|remove drupal/drupal dev-prueba_composer
- don't install drupal/core 8.7.1|remove drupal/drupal dev-prueba_composer
- don't install drupal/core 8.7.2|remove drupal/drupal dev-prueba_composer
- don't install drupal/core 8.7.3|remove drupal/drupal dev-prueba_composer
- don't install drupal/core 8.7.4|remove drupal/drupal dev-prueba_composer
- don't install drupal/core 8.7.5|remove drupal/drupal dev-prueba_composer
- don't install drupal/core 8.7.6|remove drupal/drupal dev-prueba_composer
- don't install drupal/core 8.7.7|remove drupal/drupal dev-prueba_composer
- don't install drupal/core 8.7.8|remove drupal/drupal dev-prueba_composer
- don't install drupal/core 8.7.x-dev|remove drupal/drupal dev-prueba_composer
- don't install drupal/core 8.8.x-dev|remove drupal/drupal dev-prueba_composer
- don't install drupal/core 8.3.x-dev|remove drupal/drupal dev-prueba_composer
- don't install drupal/core 8.4.x-dev|remove drupal/drupal dev-prueba_composer
- don't install drupal/core 8.5.x-dev|remove drupal/drupal dev-prueba_composer
- don't install drupal/core 8.6.x-dev|remove drupal/drupal dev-prueba_composer
- drupal/core 8.2.x-dev requires symfony/psr-http-message-bridge v0.2 -> satisfiable by symfony/psr-http-message-bridge[v0.2] but these conflict with your requirements or minimum-stability.
- Installation request for drupal/drupal dev-prueba_composer -> satisfiable by drupal/drupal[dev-prueba_composer].
- Installation request for drupal/core-render ^8.2 -> satisfiable by drupal/core[8.2.x-dev, 8.3.x-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-dev].
这是我的composer.json文件:
{
"name": "drupal/drupal",
"description": "Drupal is an open source content management platform powering millions of websites and applications.",
"type": "project",
"license": "GPL-2.0-or-later",
"require": {
"drupal/core": "^8.7",
"composer/installers": "^1.0.24",
"wikimedia/composer-merge-plugin": "^1.4",
"drush/drush": "^9.0",
"symfony/property-access": "^3.2.",
"gufy/pdftohtml-php":"~2",
"mikehaertl/phpwkhtmltopdf": "~2.0",
"tecnickcom/tcpdf": "6.0.*",
"dompdf/dompdf" : "0.6.*",
"mpdf/mpdf" : "5.7.*",
"wa72/htmlpagedom": "1.3.*",
"smalot/pdfparser": "*",
"squizlabs/php_codesniffer": "3.4.*"
},
"replace": {
"drupal/metatag": "8.*",
"drupal/slick": "8.*",
"drupal/superfish": "8.*",
"drupal/swiftmailer": "8.*"
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"preferred-install": "dist",
"autoloader-suffix": "Drupal8"
},
"extra": {
"_readme": [
"By default Drupal loads the autoloader from ./vendor/autoload.php.",
"To change the autoloader you can edit ./autoload.php.",
"This file specifies the packages.drupal.org repository.",
"You can read more about this composer repository at:",
"https://www.drupal.org/node/2718229"
],
"merge-plugin": {
"include": [
"core/composer.json",
"modules/contrib/metatag/composer.json",
"modules/contrib/slick/composer.json",
"modules/contrib/superfish/composer.json",
"modules/contrib/swiftmailer/composer.json"
],
"recurse": true,
"replace": false,
"merge-extra": false
},
"installer-paths": {
"core": [
"type:drupal-core"
],
"modules/contrib/{$name}": [
"type:drupal-module"
],
"profiles/contrib/{$name}": [
"type:drupal-profile"
],
"themes/contrib/{$name}": [
"type:drupal-theme"
],
"drush/contrib/{$name}": [
"type:drupal-drush"
],
"modules/custom/{$name}": [
"type:drupal-custom-module"
],
"themes/custom/{$name}": [
"type:drupal-custom-theme"
]
}
},
"autoload": {
"psr-4": {
"Drupal\\Core\\Composer\\": "core/lib/Drupal/Core/Composer",
"Drupal\\composer_manager\\Composer\\": "modules/contrib/composer_manager/src/Composer"
}
},
"scripts": {
"pre-autoload-dump": "Drupal\\Core\\Composer\\Composer::preAutoloadDump",
"post-autoload-dump": "Drupal\\Core\\Composer\\Composer::ensureHtaccess",
"post-package-install": "Drupal\\Core\\Composer\\Composer::vendorTestCodeCleanup",
"post-package-update": "Drupal\\Core\\Composer\\Composer::vendorTestCodeCleanup",
"drupal-phpunit-upgrade-check": "Drupal\\Core\\Composer\\Composer::upgradePHPUnit",
"drupal-phpunit-upgrade": "@composer update phpunit/phpunit --with-dependencies --no-progress",
"phpcs": "phpcs --standard=core/phpcs.xml.dist --runtime-set installed_paths $($COMPOSER_BINARY config vendor-dir)/drupal/coder/coder_sniffer --",
"phpcbf": "phpcbf --standard=core/phpcs.xml.dist --runtime-set installed_paths $($COMPOSER_BINARY config vendor-dir)/drupal/coder/coder_sniffer --"
},
"repositories": [
{
"type": "composer",
"url": "https://packages.drupal.org/8"
}
]
}
谢谢。
更新 阅读无尽的文章时,我遇到了wikimedia merge插件的一个预期问题。我试图重复作曲家更新drupal / core --with-dependencies删除了根composer.json中包含的合并插件,至少完成了它没有问题,但是我不知道所有依赖项是否都已正确安装,或者我是否会需要为将来的核心更新再次添加此内容。
答案 0 :(得分:1)
已弃用Wikimedia合并插件,而推荐使用composer.json上的路径存储库。 解决此问题的方法是从合并插件部分中删除Drupal核心的作曲家include:
"merge-plugin": {
"include": [
"core/composer.json", <-- Remove
"modules/contrib/metatag/composer.json",
"modules/contrib/slick/composer.json",
"modules/contrib/superfish/composer.json",
"modules/contrib/swiftmailer/composer.json"
],
"recurse": true,
"replace": false,
"merge-extra": false
}