首页 > 解决方案 > 使用 composer 和 drush 管理 drupal 8 模块

问题描述

我是作曲家的drupal管理新手。因此,我需要在我的 D8 网站(从 D6 迁移)上进行更新。我在 drush 和 composer 之间得到不匹配的信息,如下所示:

$ composer outdated drupal/*
drupal/feeds                   3.0.0-alpha5 3.0.0-alpha6 Aggregates RSS/Atom/RDF feeds, imports CSV files and more.
drupal/migrate_tools           4.3.0        4.4.0        Tools to assist in developing and running migrations.

$ drush @sited8 pml --filter=feed
 --------- ---------------------------------------- ---------- ----------------
  Package   Name                                     Status     Version
 --------- ---------------------------------------- ---------- ----------------
  Feeds     Feeds (feeds)                            Disabled   8.x-3.0-alpha4

$ drush @sited8 pml --filter=migr
 -------------------------- --------------------------------------------- --
  Package                    Name                                 Status     Version
 -------------------------- ----------------------------------------------- 
  Migration                  Migrate Tools (migrate_tools)             Disabled   8.x-4.1

那么处理禁用模块的好方法是什么?我需要用 composer 删除它们吗?作曲家不存在与“禁用”类似的状态吗?

谢谢

编辑:好的做法已修复,但 drush 和作曲家之间的信息不匹配怎么办?

EDIT2:另一种信息不匹配的情况

composer outdated drupal/*
drupal/admin_toolbar          1.27.0       2.0.0        Provides a drop-down menu interface to the core Drupal Toolbar.
drupal/better_exposed_filters 3.0.0-alpha6 4.0.0-alpha1 Provides advanced options (such as links, checkboxes, or jQueryUI widgets) for exposed Views elements.
drupal/webform                5.4.0        5.5.0        Enables the creation of webforms and questionnaires.
@ssh4:~/www/celony/sited8$ composer update drupal/admin_toolbar drupal/better_exposed_filters
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files

更多信息:如果 update 被提及为红色,我可以运行 composer update,如果它是黄色,我确实使用 composer require 代替。也许是正常的方式? https://getcomposer.org/doc/03-cli.md#outdated

标签: modulecomposer-phpupdatesdrupal-8drush

解决方案


推荐阅读