8

Does Drupal Console (that is available for Drupal 8) aim to totally or partially replace Drush?

  • 1
    For those people who have not heard of it yet, What is the Drupal Console? – No Sssweat May 24 '16 at 22:39
  • Torn on whether to close this as "primarily opinion-based". Wondering if we can edit this to gather more concrete answers. – mpdonadio May 24 '16 at 22:42
  • 3
    Ultimately, this can only be answered by Drupal Console team since they know their own roadmap. If there's a primary source stating as such that could do it. Otherwise, yeah, many speculative answers. I tried to answer the Drush v. Console question since that's probably the most important thing here. Perhaps community wiki entry? – Shawn Conn May 25 '16 at 0:24
17
+100

Drupal console is a Drupal CLI tool, from the-ground-up, that leverages Symfony CLI components and modern PHP OOP design practices. Drush is a venerable Drupal CLI tool that has been around since Drupal 4.7, thus built with an older design practice. However, since Drush 9 it's been rearchitected to use the Symfony components as well.

There is overlap based on both projects being a general purpose Drupal administration CLI tool. Drush has more features, due to its age, but Drupal Console has some new features due to its more modern design.

In a commercial software world, there would be some profit motive to merge/buy-mind-share/etc. However, in the open source world they both stand as their own independent projects, with its maintainers motivated for other reasons than to build the one true Drupal CLI tool to bind them all (tm).

It might help to read Ten things you need to know about Drupal Console coming from Ray Saltini of FFW (the company supporting the lead developer Jesus Olivas of Drupal Console), & Drush and the Drupal Console with Drupal 8 from Greg Anderson (one of the maintainers of Drush).

To explicitly answer the question, maybe. If you're wondering which should I use?, the answer is maybe both for the time being. Perhaps Drupal Console will eclipse Drush, but right now both have useful feature sets for administering your Drupal site.

  • 2
    Intemporal answer. Drush and Drupal Console are still evolving, here in 2018 and both are still pratical for us. – JudaPriest Aug 24 '18 at 12:38
2

Sean Hamlin - 10 things I learnt building in Drupal 8

  1. Drupal Console is awesome

Every time you need to generate a custom module, or a new block in a custom module, you can quickly and easily use Drupal Console to produce the code scaffolding for you. This quite easily makes the job of a developer a lot less stressful, and allows you to focus on actually writing code that delivers functionality.

Sounds like DC does things that Drush can't.

Now to answer your question, IDK if their objective is to replace Drush, but it's definitely looking like a Drush substitute. To me this is like Display Suite Vs Panels.

  • 1
    DC appears to me like "Software Reuse at construction time", something that finally starts to make it to the Drupal world, and which dates from the 80s (or was it 90s). It would (eg) generate COBOL code to create an online transaction to be executed on the mainframe, whereas the generation process was running in MS DOS, and later on in windows 3.1 ... The beauty of it being that "if it worked according to the specs in MS DOS, you could be sure that it would also work the same way if executed as a mainframe transaction ... Am I close about what DC is about (or might be heading to)? – Pierre.Vriens Jun 24 '16 at 19:36
1

I'm facing the fact of I should write Drush Commands or Drupal Console Commands, but in my case I need to maintain the same module in Drupal 8 and Drupal 7.

As you know we don't have Drupal Console in Drupal 7, so in this case if I create Drupal Console Commands I don't will have this commands available in my Drupal 7 module. But if I use Drush Commands I will have quickly the same commands in Drupal 8 and Drupal doing a few changes related to the API.

So, I don't think that Drupal Console will replace for the moment Drush, but maybe in the future we will need to write some post like:

"How to migrate my Drush Commands to Drupal Console Commands?" :-D

1

This question is a good one.

  • Drupal Console is build on top of Symfony and POO.
  • Drush up to 8 (included) not .
  • Drush 9 is build on top on top of Symfony and POO.

In other way :

  • Drupal Console use Command dir on your website installation
  • Drush use Commands dir on your website installation

I think, and it's my own opinion, work on 2 differents console tools is a less of time. Drush is more know into the community. So maybe great console command will be forked to Drush and just Drush will survive.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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