0

I am using Drush (8.0.3) on my Drupal 8 site (8.0.3) to check for updates, but Drush is not checking for updates of any modules that I checked out the dev branch for.

$ drush @mysite ups --check-disabled 
Checking available update data for Drupal.                                  [ok]
Checking available update data for Address (address).                       [ok]
Checking available update data for CloudFlare (cloudflare).                 [ok]
Checking available update data for Commerce (commerce).                     [ok]
Checking available update data for Composer Manager                         [ok]
(composer_manager).
Checking available update data for Chaos tools (ctools).                    [ok]
Checking available update data for Domain Registration                      [ok]
(domain_registration).
Checking available update data for Entity (entity).                         [ok]
Checking available update data for Google Analytics                         [ok]
(google_analytics).

I have dev branches of the following modules:

  • Inmail
  • SMTP
  • Rules
  • Several others not in the list above

Now I have some idea about what may be wrong: I am using Pantheon for my site, and I added these modules to composer.json, then ran composer update to install them. For dev modules, this adds .git repositories for each dev module.

I then committed all this to Pantheon, which gave me a message about not supporting submodules. I ignored this message because I could still install the modules on Pantheon, but I now suspect that either this or installing via composer has somehow busted Drush for me.

How can I get Drush to also check for updates to the dev branches of modules installed by composer?

2 Answers 2

3

Drush relies on information written by the Drupal.org package manager to determine whether or not updates are needed to modules or core.

If you use git to install Drupal modules, then you may also use the git-deploy module, and it will add the information needed for Drush to do the update. Git deploy also works for modules installed via Composer using git; Composer uses git to install when using the --prefer-source directive, or when the module version installed is a development version.

If you use the Composer option --prefer-dist, then Composer will install the tarball packaged by drupal.org, which is why git-deploy is not needed in most cases for stable modules.

Note that there is a bug in git-deploy that prevents it from working when the path to the Drupal root contains spaces. There is a patch to fix this problem available in the git-deploy issue queue; see #2672166.

2

If you are using Composer, why do you even need to use Drush to check for updates? You can just run composer update and it will automatically pull updates in.

(This is not the definitive answer, but it occurs to me I could take this approach since I only update modules from my local dev machine anyway.)

1
  • 1
    It is useful to use Drush to check for updates even when using composer because drush pm-updatestatus produces a nice report that identifies security updates from non-security updates. Composer is lacking this feature. Feb 19, 2016 at 16:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.