我正在使用composer成功地更新drupal核心。
composer update
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 9 updates, 0 removals
- Upgrading drupal/core (9.4.0 => 9.4.5)
- Upgrading drupal/core-composer-scaffold (9.4.0 => 9.4.5)
- Upgrading drupal/core-project-message (9.4.0 => 9.4.5)
- Upgrading drupal/core-recommended (9.4.0 => 9.4.5)
- Upgrading drupal/core-vendor-hardening (9.4.0 => 9.4.5)
- Upgrading guzzlehttp/guzzle (6.5.7 => 6.5.8)
- Upgrading guzzlehttp/psr7 (1.8.5 => 1.9.0)
- Upgrading symfony/css-selector (v6.1.0 => v6.1.3)
- Upgrading symfony/mailer (v5.4.8 => v5.4.11)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 9 updates, 0 removals
- Upgrading drupal/core-composer-scaffold (9.4.0 => 9.4.5): Extracting archive
- Upgrading drupal/core-project-message (9.4.0 => 9.4.5): Extracting archive
- Upgrading drupal/core-vendor-hardening (9.4.0 => 9.4.5): Extracting archive
- Upgrading guzzlehttp/psr7 (1.8.5 => 1.9.0): Extracting archive
- Upgrading guzzlehttp/guzzle (6.5.7 => 6.5.8): Extracting archive
- Upgrading drupal/core (9.4.0 => 9.4.5): Extracting archive
- Upgrading drupal/core-recommended (9.4.0 => 9.4.5)
- Upgrading symfony/css-selector (v6.1.0 => v6.1.3): Extracting archive
- Upgrading symfony/mailer (v5.4.8 => v5.4.11): Extracting archive
Cleaning: guzzlehttp/psr7
Cleaning: symfony/css-selector
Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.
Package symfony/debug is abandoned, you should avoid using it. Use symfony/error-handler instead.
Generating autoload files
Hardening vendor directory with .htaccess and web.config files.
44 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Scaffolding files for drupal/core:
- Copy [project-root]/.editorconfig from assets/scaffold/files/editorconfig
- Copy [project-root]/.gitattributes from assets/scaffold/files/gitattributes
- Copy [web-root]/.csslintrc from assets/scaffold/files/csslintrc
- Copy [web-root]/.eslintignore from assets/scaffold/files/eslintignore
- Copy [web-root]/.htaccess from assets/scaffold/files/htaccess
- Copy [web-root]/example.gitignore from assets/scaffold/files/example.gitignore
- Copy [web-root]/sites/default/default.settings.php from assets/scaffold/files/default.settings.php
Cleaning installed packages.但我正在尝试用composer更新模块,但它不起作用。日志显示下载和安装是成功的,但在网站报告中,该模块已经过时。
composer require drupal/metatag:^1.21
./composer.json has been updated
Running composer update drupal/metatag
Loading composer repositories with package information
Updating dependencies
Lock file operations: 2 installs, 0 updates, 0 removals
- Locking drupal/metatag (1.21.0)
- Locking drupal/token (1.11.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 2 installs, 0 updates, 0 removals
- Installing drupal/token (1.11.0): Extracting archive
- Installing drupal/metatag (1.21.0): Extracting archive
Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.
Package symfony/debug is abandoned, you should avoid using it. Use symfony/error-handler instead.
Generating autoload files
Hardening vendor directory with .htaccess and web.config files.
44 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Cleaning installed packages.在运行/update.php但在/admin/ module /update中,模块元数据在8.x-1.19中继续,而不是在8.x-1.21中。我在用窗户。
composer.json
{
"name": "drupal/legacy-project",
"description": "Project template for Drupal 9 projects with composer following drupal/drupal layout",
"type": "project",
"license": "GPL-2.0-or-later",
"homepage": "https://www.drupal.org/project/drupal",
"support": {
"docs": "https://www.drupal.org/docs/user_guide/en/index.html",
"chat": "https://www.drupal.org/node/314178"
},
"repositories": [
{
"type": "composer",
"url": "https://packages.drupal.org/8"
}
],
"require": {
"composer/installers": "^1.9",
"drupal/core-composer-scaffold": "^9.3",
"drupal/core-project-message": "^9.3",
"drupal/core-recommended": "^9.3",
"drupal/core-vendor-hardening": "^9.3",
"drupal/symfony_mailer": "^1.0@alpha"
},
"conflict": {
"drupal/drupal": "*"
},
"minimum-stability": "stable",
"prefer-stable": true,
"config": {
"sort-packages": true,
"allow-plugins": {
"composer/installers": true,
"drupal/core-composer-scaffold": true,
"drupal/core-project-message": true,
"drupal/core-vendor-hardening": true
}
},
"extra": {
"drupal-scaffold": {
"locations": {
"web-root": "./"
}
},
"installer-paths": {
"core": [
"type:drupal-core"
],
"libraries/{$name}": [
"type:drupal-library"
],
"modules/contrib/{$name}": [
"type:drupal-module"
],
"profiles/contrib/{$name}": [
"type:drupal-profile"
],
"themes/contrib/{$name}": [
"type:drupal-theme"
],
"drush/Commands/contrib/{$name}": [
"type:drupal-drush"
],
"modules/custom/{$name}": [
"type:drupal-custom-module"
],
"profiles/custom/{$name}": [
"type:drupal-custom-profile"
],
"themes/custom/{$name}": [
"type:drupal-custom-theme"
]
},
"drupal-core-project-message": {
"include-keys": [
"homepage",
"support"
],
"post-create-project-cmd-message": [
" ",
" Congratulations, you’ve installed the Drupal codebase ",
" from the drupal/legacy-project template! ",
" ",
"",
"Next steps:",
" * Install the site: https://www.drupal.org/docs/8/install",
" * Read the user guide: https://www.drupal.org/docs/user_guide/en/index.html",
" * Get support: https://www.drupal.org/support",
" * Get involved with the Drupal community:",
" https://www.drupal.org/getting-involved",
" * Remove the plugin that prints this message:",
" composer remove drupal/core-project-message"
]
}
}}
发布于 2022-08-09 20:14:20
我认为您有两个metatag的副本,一个是在modules/metatag中安装的,即1.19版本,另一个是Composer在modules/contrib/metatag中安装的版本,即1.21版本。鉴于你在评论中提供的信息,这是我能提供的最好的答案。
https://drupal.stackexchange.com/questions/312477
复制相似问题