-
-
Notifications
You must be signed in to change notification settings - Fork 645
Upgrade Drupal VM to use Drush Launcher / drush role 3.0.0 version #1672
Comments
Going to release 4.7.2 bugfix release before beginning work on this: #1673 |
So just switching to 3.0.0 seems to work fine in terms of getting the Also, if I have Drush 8.1.15 installed on host, the current (old style) Drush aliases seem to work to connect to Drush inside the VM at version 9.0.0. (cc @danepowell). Inside the VM, after I run
Running
But running So, primarily, this will be an educational thing, with the following lessons learned (so far):
Basically, if you've been putting off using Composer to manage your Drupal site's codebase (either for 7 or 8!), and want to continue using Drush, consider this the third or fourth major impetus towards making that change! You can always decline using Drush entirely, and remove it from your |
Wrapping the postgresql install issue that's been breaking builds for a week into #1675 :( |
Also sooner or later we need to Remove Drush make support :( — so opened a new ticket for that too. |
Also slightly related: drush-ops/drush-launcher#2 |
Wrote the blog post, waiting to publish it until I finish testing and merge this branch... and create 4.8.0. |
Done. This is in |
This is causing us some difficulties on a project that we can't upgrade to drupal 8.4 yet, and also can't install drush locally due to dependency hell in composer. I'm trying to figure out how to get previous functionality of the drush ansible role, ie to specify a drush version <9 and not install the launcher. Is this still possible? |
Just add these two lines to a post-provision script. This will add Drush globally, which the Drush launcher will use as a fallback if it does not detect drush in your project.
The only issue that I have faced is with composer running out of memory. But that can be fixed by increasing the memory of the VM or by running |
I'm using DrupalVM for developing Drupal 7 and 8 applications. webflo/drupal-finder#35 This installs drush in my Drupal 7 projects. Because I don't want the composer.json and .lock files and vendor files in Git, I've added these to .gitignore, so my Git repository remains unchanged. |
Issue Type
Summary
Drush 9 and Drupal 8.4 have thrown a bit of a wrinkle into the Drush-based Drupal automation world... there are some backwards-incompatible breakages that make working with older and newer sites at the same time a little awkward.
The
geerlingguy.drush
role was just updated to 3.0.0 (see geerlingguy/ansible-role-drush#44 (comment) for a brief overview of the new features), and the Drush integration in Drupal VM will need to change at least a little bit to get things working well with the latest role version.Basically, the 3.0.0 version installs Drush Launcher by default (instead of global Drush from a .phar file), because that's the recommended way to use the
drush
command system-wide, especially with Drush 9+.This means we'll have
drush
available, but it will only work in the context of a Drupal project with Drush as a dependency. Also, the alias files will need to be changed to work properly with Drush 9+... so we might want to either write two sets of alias files if aliases are enabled (one for < 9, one for 9+), or determine the Drush version somehow and write the correct type of alias file?See related: #1595 — I might move the Drush aliases work to that issue, since just getting things working with Drush Launcher instead of system-wide Drush could take a little time.
Remaining Tasks
geerlingguy.drush
role to 3.0.0 (so we install Drush Launcher by default).drush_version
variable from the default config.The text was updated successfully, but these errors were encountered: