Last week, to appropriate fanfares, Drupal 8 reached Release Candidate stage. That means Drupal 8 tagged releases now have an upgrade path between them, and it also means (very nearly) complete API / hook stability - which means this is the cue for some serious testing and development of contrib themes and modules.
However I made one schoolboy error: I was still using Drush 7.
It's actually quite an understandable mistake - all you had to do was follow the development of Drupal Next, and Drush, but not quite follow it closely enough.
The (over-)simplified narrative
Here's how the story (nearly goes):
- Drush 5 is now unsupported.
- So, if you want to work with Drupal 7, you need at least Drush 6.
- However, Drupal 8 will differ from Drupal 7 in some significant ways.
- So a new branch of Drush, Drush 7, has been created.
- For Drupal 7, use Drush 6; for Drupal 8, use Drush 7.
- As an aside, Drush 6 was the last branch to be installable through Pear; from Drush 7, the source code is on github, and you install it using Composer.
- 20th May 2015, Drush 7.0.0 is released. So now you can have a stable version of Drush to use with Drupal 8. Hurrah! Use that!
- So, if you want to work with Drupal 8, use Drush 7.0.0 (until 7.0.1 or 7.1.0 is released).
Nearly, but not quite. So what did I miss?
What Actually Happened
18th March 2015, Moshe Wietzman, lead maintainer for the Drush project, announced that there would be a new tagged release of Drush for each pre-release of Drupal 8. This allows Drush to keep pace with changes to Drupal 8, and helps site-builders ensure they have a recent enough version of Drush at any given time.
- Drupal 8.0 beta 7 plays nicely with Drush 7.0-alpha9
- Drupal 8.0 beta 8 will play nicely with Drush 7.0-rc1
May 11th to May 15th 2015 was DrupalCon LA, including some valuable sprint work to fix critical issues for Drush 7. They cleared the list, and Drush 7.0.0 was tagged and released just 5 days later - May 20th.
But then there's a problem. Drupal 8.0.0 was about to hit beta11 (May 27th). Not yet in Release Candidate stage, Drupal 8 was a moving target. There could be critical changes in API or other functionality. Drush was going to have to keep up.
It helps site builders and server administrators to have a simple rule of thumb for Drush / Drupal compatibility: "Drupal X works with Drush Y". But clearly, "Drupal 8 works with Drush 7" wasn't going to work; it would only be a matter of time before there was a breaking-change to Drupal 8, that would means Drush 7 would not work with it.
So the only way to keep things this tidy is to make the rule of thumb: "Drupal version 8 works with Drush version 8". Drush may have been ready for a stable release when 7.0.0 was tagged, but Drupal was not, and so the 7.x branch of Drush could never be the stable branch to work with Drupal 8.
Actually, I make it sound as if someone had a eureka moment, some time after the release of Drush 7.0.0. In fact, read the release notes of Drush 7.0.0:
Drush 7 is not compatible with Drupal 8. If you try to run Drush7 with Drupal 8, you get a message suggesting that you install from the master branch, or as Composer likes to call it, dev-master. There you will find all our terrific commands for managing Views, Config, Migrations, State, etc.
So a new branch of Drush was started, now known as Drush 8. There will be a new tagged release on this branch for every pre-release of Drupal. And there won't be a stable release, Drush 8.0.0, until Drupal 8.0.0 is released.
So, long story short: For Drupal 8, use Drush 8.
Comments
Thanks for helping to boost the signal about Drush 8!
The reason for the change was unrelated to the version alignment between Drush 8 and Drupal 8; Drush releases new major versions more frequently than Drupal, so in time, you will probably be using Drush 9 with Drupal 8. You hit on the real reason in your post -- Drush needed to keep up with API changes in Drupal 8, and at the time when Drush 7.0.0 stable was released, Drupal 8 was not yet stable itself. We don't make changes that break backwards compatibility in stable releases of Drush, so Drush 7 could not viably support the Drupal 8 betas.
See my blog post on the subject, What Version of Drush Works with Version 8?
Yay - I got it right!
^^
Thanks for dropping by, Greg. :-)
Sigh. This was one of the
Sigh. This was one of the most confusing endeavors done by the Drush team, and it makes having a globally installed version of Drush (PREFERRED) impossible if you do both Drupal 7 and Drupal 8 development / projects.
Not quite
Drush 8 works fine with Drupal 7 (and Drupal 6 for that matter).
So simply have Drush 8 installed globally, and you can work with any of the supported core versions of Drupal
Add new comment