我已经安装了几个Drupal 8站点与作曲家,因为它是强烈推荐的。
我可以这样更新模块:
composer require drupal/pathauto:1.1但我不能用
composer update drupal/core --with-dependencies (如文档所示)
或者(我认为应该是这样):
composer update drupal/drupal --with-dependencies我试着在这个网站上从8.4.2到8.5.0更新tu。
我读过很多关于这个的话题,我试过:
但没起作用。
我如何才能更新我的经典Drupal (里面没有什么花哨)与作曲家?我应该放弃,用Drush更新一下吗?
她是我的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+",
"require": {
"composer/installers": "^1.0.24",
"wikimedia/composer-merge-plugin": "^1.4",
"drupal/contact_block": "^1.4",
"drupal/twig_tweak": "^1.9",
"drupal/contact_ajax": "^1.4@beta",
"drupal/pathauto": "1.1",
"drupal/easy_breadcrumb": "^1.6",
"drupal/redirect": "1.1",
"drupal/views_slideshow": "^4.6",
"drupal/bootstrap": "3.11",
"drush/drush": "dev-master"
},
"replace": {
"drupal/core": "^8.4"
},
"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"
],
"recurse": false,
"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"
}
},
"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"
},
"repositories": [
{
"type": "composer",
"url": "https://packages.drupal.org/8"
}
]
}发布于 2018-03-15 11:52:50
最后,我可以通过这些修改进行更新。
Step 1,如果composer.json包含此内容,则为可选。如果可以,请执行步骤2。
添加
"require": {
---
"drupal/core": "~8.5"
},删除
"replace": {
"drupal/core": "^8.4"
},Step 2
删除此文件夹:
vendor删除此文件:
composer.lock跑
composer update --with-dependencies发布于 2018-03-15 13:25:33
在“要求”部分中,将版本从drupal/core:"8.4“更改为drupal/core:"8.5”并运行composer update
https://drupal.stackexchange.com/questions/257755
复制相似问题