hechoendrupal / drupal-console

The Drupal CLI. A tool to generate boilerplate code, interact with and debug Drupal.
http://drupalconsole.com
GNU General Public License v2.0
939 stars 559 forks source link

[documentation] Self-update is now confusing #3198

Open aangelinsf opened 7 years ago

aangelinsf commented 7 years ago

Problem/Motivation

I am just trying Drupal console, thus I am a newbie to it. After installation, as a test, I attempted to run a self-update because it showed me that was a possible command. It failed with it not being a valid command name. But why does drupal on its own show:

Update project to the latest version.
-------------------------------------

   drupal self-update

After some googling I discovered: https://github.com/hechoendrupal/drupal-console/issues/3001

Which informed me that updating is now handling by composer. But then why is there a self-update command? Should I file a documentation issue to have it removed?

Further googling turned up: https://github.com/hechoendrupal/drupal-console/issues/3144

This informed me that I should run self-update outside the web directory. So I did that and now self-update works.

How to reproduce

  1. Execute drupal in a project. You will be told that self-update is a valid command.
  2. Execute drupal self-update.
  3. Returns [ERROR] Command "self-update", is not a valid command name.
  4. Scratch head.

Suggested Solution

  1. When executing drupal inside of project folder, tell the user to: a) add drupal/console to the project composer file and update that portion with composer b) update the drupal launcher by running drupal self-update outside of a project directory.
mh9 commented 7 years ago

@aangelinsf I also find your steps to reproduce are exactly correct. I can update drupal console.

However, according to the just published https://www.drupal.org/docs/8/update/update-procedure-in-drupal-8 drupal self-update in the site root directory should update the drupal version. (Today I would hope to update to 8.27.) However it returns [ERROR] Command "self-update", is not a valid command name.

So it seems that drupal self-update is supposed to do different things in different directory contexts. Am I missing something to make "drupal console" do a "drupal" update?

jmolivas commented 7 years ago

@aangelinsf @mh9 self-update command output was updated can you please comment if this is less confusing.

drupal-self-update
DigitalFrontiersMedia commented 7 years ago

This page's documentation ( https://hechoendrupal.gitbooks.io/drupal-console/content/en/getting/launcher.html )would also need to be updated since there was no indication on that page that this command would fail when I tried it.