首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >composer update drupal/drupal不工作:无需安装或更新

composer update drupal/drupal不工作:无需安装或更新
EN

Drupal用户
提问于 2018-03-15 10:13:47
回答 2查看 7.6K关注 0票数 5

我已经安装了几个Drupal 8站点与作曲家,因为它是强烈推荐的。

我可以这样更新模块:

代码语言:javascript
复制
composer require drupal/pathauto:1.1

但我不能用

composer update drupal/core --with-dependencies (如文档所示)

或者(我认为应该是这样):

代码语言:javascript
复制
composer update drupal/drupal --with-dependencies

我试着在这个网站上从8.4.2到8.5.0更新tu。

我读过很多关于这个的话题,我试过:

  • 删除文件夹/vendor
  • 删除composer.lock

但没起作用。

我如何才能更新我的经典Drupal (里面没有什么花哨)与作曲家?我应该放弃,用Drush更新一下吗?

她是我的composer.json

代码语言:javascript
复制
{
    "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"
        }
    ]
}
EN

回答 2

Drupal用户

发布于 2018-03-15 11:52:50

最后,我可以通过这些修改进行更新。

Step 1,如果composer.json包含此内容,则为可选。如果可以,请执行步骤2。

添加

代码语言:javascript
复制
"require": {
        ---
        "drupal/core": "~8.5"
    },

删除

代码语言:javascript
复制
"replace": {
    "drupal/core": "^8.4"
},

Step 2

删除此文件夹:

代码语言:javascript
复制
vendor

删除此文件:

代码语言:javascript
复制
composer.lock

代码语言:javascript
复制
composer update --with-dependencies
票数 10
EN

Drupal用户

发布于 2018-03-15 13:25:33

在“要求”部分中,将版本从drupal/core:"8.4“更改为drupal/core:"8.5”并运行composer update

票数 0
EN
页面原文内容由Drupal提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://drupal.stackexchange.com/questions/257755

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档