我正在尝试更新我的Drupal8scaffold,并从旧的drupal - composer.json转移到核心-作曲者-脚手架。但是composer2将核心目录和相关目录直接放入app文件夹,而不是app/web。
我的composer.json内容是:
"description": "Project template for Drupal 8 projects with composer",
"type": "project",
"license": "GPL-2.0-or-later",
"authors": [
{
"name": "",
"role": ""
}
],
"repositories": {
"drupal": {
"type": "composer",
"url": "https://packages.drupal.org/8"
},
"asset-packagist": {
"type": "composer",
"url": "https://asset-packagist.org"
}
},
"require": {
"php": "^7.4",
"composer/installers": "^1.2",
"cweagans/composer-patches": "^1.6.5",
"drupal/clamav": "^1.1.0",
"drupal/core-composer-scaffold": "^8.8",
"drupal/core-dev": "^8.1",
"drupal/core-recommended": "^8.8",
"drupal/google_analytics": "^2.4.0",
"drupal/mailsystem": "^4.1.0",
"drupal/metatag": "^1.9.0",
"drupal/officialfacebookpixel": "^1.1",
"drupal/php": "^1.0",
"drupal/schema_metatag": "^1.4.0",
"drupal/sendgrid_integration": "^1.3",
"drupal/simple_facebook_pixel": "1.1",
"drupal/superfish": "^1.3.0",
"drupal/token": "^1.5.0",
"oomphinc/composer-installers-extender": "^2.0"
},
"config": {
"sort-packages": true,
"discard-changes": true,
"optimize-autoloader": true
},
"conflict": {
"drupal/drupal": "*"
},
"extra": {
"enable-patching": true,
"composer-exit-on-patch-failure": true,
"patchLevel": {
"drupal/core": "-p2"
},
"drupal-scaffold": {
"locations": {
"web-root": "web/"
},
"patches": [],
"installer-types": [
"bower-asset",
"npm-asset"
],
"installer-paths": {
"drush/Commands/{$name}": ["type:drupal-drush"],
"web/core": ["type:drupal-core"],
"web/modules/contrib/{$name}": ["type:drupal-module"],
"web/modules/custom/{$name}": ["type:drupal-custom-module"],
"web/profiles/contrib/{$name}": ["type:drupal-profile"],
"web/profiles/custom/{$name}": ["type:drupal-custom-profile"],
"web/themes/contrib/{$name}": ["type:drupal-theme"],
"web/themes/custom/{$name}": ["type:drupal-custom-theme"],
"web/libraries/{$name}": [
"type:drupal-library",
"type:bower-asset",
"type:npm-asset"
]
},
"merge-plugin": {
"include": [
"web/modules/custom/*/composer.json"
],
"replace": false,
"ignore-duplicates": true
}
}
},
"scripts": {
"search-git-submodules": "find . -mindepth 2 -type d -name .git",
"remove-git-submodules": "find . -mindepth 2 -type d -name .git | xargs rm -rf",
"post-install-cmd": [
"@remove-git-submodules"
],
"post-update-cmd": [
"@remove-git-submodules"
]
},
"minimum-stability": "dev",
"prefer-stable": true
}我自己找不到任何问题,那么为什么会发生这种情况呢?
发布于 2020-12-08 09:53:53
根据the doc的说法,web-root应该是"./web"而不是"web/"
"locations": {
"web-root": "./web"
},发布于 2020-12-10 01:39:31
好了,我已经找到了我自己问题的解决方案。
在极少数情况下,您在required部分中使用的顺序很重要。
我把"oomphinc/ composer -installers-extender":"^2.0“移到了列表的首位,composer现在把所有的东西都放到了正确的位置。
这个问题似乎是因为特定的项目依赖关系而发生的,这使得composer无法为自己重新排序安装。
https://stackoverflow.com/questions/65190185
复制相似问题