Currently the user guide says:
Check the Drush website for installation instructions and version compatibility.
This is no longer adequate since Drush 9 doesn't support the Drush install / update commands in the user guide. (Drush 9 leaves the job of installing and updating to composer.) I suggest that you explicitly state that the guide is written for Drush 8 (or earlier).
PS! Not sure if you should mention that Drush 8.14 or newer is needed for recent versions of Drupal 8.
Update
The current plan for this issue is to remove information about downloading stuff with Drush, and align the guide towards Drush 9.
Comment | File | Size | Author |
---|---|---|---|
#37 | 2950307-v2.patch | 28.69 KB | jhodgdon |
Comments
Comment #2
hansfn CreditAttribution: hansfn commentedComment #3
jhodgdonThanks for posting this issue. I think you are right, we need to reconsider how to suggest the use of Drush. It cannot even be installed any more without Composer...
Comment #4
hansfn CreditAttribution: hansfn commentedIf you recommend Drush 8, it it can still be installed as a file download.
Comment #5
eojthebraveI recommend that we stop telling people to download core, or contrib projects using Drush. This, for now at least, is the domain of Composer. And while Drush 8.14+ might work for now, it will likely eventually be EOL as Drush 9 progresses.
So for example, on pages like this one https://www.drupal.org/docs/user_guide/en/install-prepare.html
We should replace commands like this
drush dl drupal --drupal-project-rename=example
with the Composer equivalent. Once you've used Composer to download the files for core, or contrib, you can still use Drush commands likedrush site-install
to install them. I'm pretty sure. :)Comment #6
jhodgdonThat sounds like a good plan (#5)!!
Comment #7
hansfn CreditAttribution: hansfn commentedYes, you can still use all the sweet Drush commands after downloading/updating with Composer. However, the track record for doing D8 minor upgrades using composer is terrible. The current approach
composer update drupal/core --with-dependencies
has failed miserably several time. See also related discussion on https://github.com/drupal-composer/drupal-project/issues/362
My point is that we have to be careful so the user guide shows the smoothest way to the goal :-) I haven't made up my own mind yet so I won't come with any recommendations.
Comment #8
jhodgdonComment #9
hansfn CreditAttribution: hansfn commentedNow that the User guide is even more prominently highlighted - as the only Official Guide - we need to fix this issue.
Either
In my opinion the User Guide can't require that a (new) user gets to know both Drush and Drupal Console. In other words, if we decide to use Drupal Console for this we should use it everywhere we currently use Drush. (I'm quite sure Drupal Console can do it all.)
Since Composer is slow (and very complicated when things don't work) and, most importantly, not that many modules use composer.json to load third party libraries, I think we should recommend Drupal Console.
I'm still not 100% sure ...
Comment #10
jhodgdonDoes Drush even really work any more for installing modules and/or Drupal?
Comment #11
eojthebraveMy recommendation is still using Composer to download the files, and then Drush (or Drupal console) or the UI, to enable the module.
Comment #12
jhodgdonOK. I went and looked for what we're actually recommending in the User Guide for downloads, and where. Here's an inventory:
a) install-tools https://www.drupal.org/docs/user_guide/en/install-tools.html
- We mention Drush and Composer as tools for site builders
- We mention Console as a tool for module/theme developers
- We don't tell how to install any of them, but instead say to go to the individual tool web site to install
If you go to the Drush web site, it says to install Drush 9 using Composer [the subject of this issue], and points you to https://github.com/drupal-composer/drupal-project for instructions.
And as noted here, if someone does that, they'll be using Composer for downloading/updating Drupal and modules and themes, not Drush.
b) install-prepare https://www.drupal.org/docs/user_guide/en/install-prepare.html
- Gives the drush dl command to download drupal [which won't work with Drush 9]
- Points you to the install-composer topic if you want to use Composer or Git to download drupal core
c) install-composer https://www.drupal.org/docs/user_guide/en/install-composer.html
- Gives instructions on using Composer to download the core software or modules
- Note that it says to use composer project drupal/drupal, but we should be using drupal-composer instead. See issue #2980636: Fix Composer instructions for downloading Drupal core in User Guide, or add warning for more on that.
d) extend-module-install https://www.drupal.org/docs/user_guide/en/extend-module-install.html
- Gives instructions on using drush dl to download a module, which won't work in Drush 9
- Links to install-composer topic for composer instructions
e) extend-theme -- see (d), same but for themes
Comment #13
jhodgdonSo... given this, I think we should:
a) Use the patch in #2980636: Fix Composer instructions for downloading Drupal core in User Guide, or add warning, or something similar, to update the Composer instructions to use the other composer project
b) Remove instructions for downloading Drupal and modules with Drush
c) Let people use Drush 9, since that is the supported version
d) Mention that they'll need Composer if they use Drush 9
e) Probably reorganize some of these pages so they make more sense. Especially I think the "Preparing to install" page needs some help! And probably the Composer topic should be moved earlier in the outline?
Comment #14
eojthebraveThanks for doing the work to catalog all of that Jennifer. And your proposed outlines makes sense to me. And helps address a handful of open issues for the user guide right now. So +1.
Regarding @hansfn's comment in #9 about recommending Drupal console. While I agree that Composer can be super frustrating, especially when it's not working how you would expect. My sense is that right now it is the community recommended way to manage Drupal and it's dependencies. Regardless of whether I think that's a good thing or not, I do think that the User Guide should probably try and stick to whatever the bulk of the community is doing at any given point in time. We can always adjust this in the future as that changes. Like we're doing now as Drush is no longer the best way to handle these downloads/updates. I'm totally open to being convinced otherwise though.
Comment #15
jhodgdonI guess we could mention Drupal Console as an alternative [explaining what it's an alternative to], on the Tools page, but then not give commands for doing things with it like we do with Drush throughout the guide?
Comment #16
mmjvb CreditAttribution: mmjvb as a volunteer commentedAgree that there is a need for proper documentation on composer. However, consider it far too early to leave the traditional way behind. The `User Guide` should document both ways properly, without and with composer. Not everyone of the community is on board for composer to manage their site.
Comment #17
jhodgdonOK, here's a first-pass patch. I have split the install-prepare topic into several topics, and moved the install-composer topic into the Installation section (it still needs the patch from the other issue). I think this all makes more sense now...
Note: two other things to add to the list in #12: the topics on updating Core and modules and themes also say to use drush dl commands or drush upd, neither of which we support. So I took those out too.
Comment #18
jhodgdonDon't worry, we're not getting rid of the non-composer methods! Just getting rid of outdated information on Drush.
Comment #19
jhodgdonps: I think we need another issue to add a topic on how to update core, modules, and themes if you're using Composer.
Comment #20
jhodgdonI've created a separate issue about adding information about Composer for updates: #3001626: Update Composer instructions and make sure they are linked to from other topics
And I think we need to change the title of this issue.
Comment #21
jhodgdonIt looks like we should do a few things in this patch for #2969725: Add documentation about command-line quick start tool (8.6)... see latest comments there, #14-15... Or maybe finalize this and then work on the other? Not sure. Anyway, I'll think more about it on Friday -- sorry, no time until then (I'm working on building a trail bridge this week through Thursday, and pretty exhausted when I get home each evening).
Comment #22
hansfn CreditAttribution: hansfn commentedHm, I'm not sure that the user guide should go all in for Composer. (Personally I recommend it to everyone developing sites - I have even added "Recommended" after Composer on https://www.drupal.org/docs/8/update/updating-drupal-8-overview-of-options ) The problem is that Composer still isn't very user-friendly, and very few modules actually really uses Composer. The user guide is for beginners, not Drupal developers IMHO.
Just as a thought experiment: If Drush 9 hadn't dropped support for downloading and updating core and modules, would we have gone all in for Composer then? Probably not. When "composer update drupal/core" just works we might go all in for Composer. That might be for Drupal 8.8 or 9.0 ...
I suggest again that we replace Drush with Drupal Console for now.
Comment #23
jhodgdonI wouldn't say we are going all-in for Composer. We are still recommending downloading zip/tgz files, and Composer as an alternative to that. But Drush is still a super usefull tool to use, even without downloads... and you need Composer to get it installed these days.
I personally don't have experience with Drupal Console. Maybe I'll check it out and see ...
Comment #24
mmjvb CreditAttribution: mmjvb as a volunteer commentedDisagree on the direction this is going. The User Guide shouldn't remove the drush part, it is still valid, only requiring drush 8. It is missing the drupal console equivalent. It also misses the composer part and more importantly the fact you can't mix the composer way with the traditional ways.
No idea what `going all-in for Composer` means, but expect the User Guide to inform the user how to go about using composer to manage their codebase for site building. The current positioning of the tools is outdated and should reflect the current situation.
Comment #25
hansfn CreditAttribution: hansfn commented"Going all-in for Composer" means that you drop tools like Drush and Drupal Console for installing/updating, and only use Composer. (I don't consider manually downloading compressed files, unpacking, uploading with FTP a real option, but I don't object to keeping it.)
However, I object to recommending Drush 8. Drush 9 is the default version and a lot of users will automatically download the latest version of Drush no matter what we write. In addition, officially Drush 8 only supports Drupal 8.3 or older. I repeat that the clean way to install/update using a tool is Drupal Console. I know it's hard to replace Drush with Drupal Console for us that have used Drush for years, but that isn't a problem for new users ;-)
I will stop repeating myself now.
Comment #26
jhodgdonI agree we shouldn't recommend
DrupalDrush 8. It is dead, outdated, and may contain security flaws, won't be updated, etc.Using the FTP method, I agree, has flaws... but it is viable as a starting point, and even going forward if your site is simple (for instance, I personally am running several simple live Drupal 8 sites that way on shared hosting that doesn't have Composer as an option on the command line as far as I know, or at least didn't when I first installed the sites).
I hear you about Drupal Console. Sorry this is taking a while, but I will investigate Console and make a new patch.
Comment #27
mmjvb CreditAttribution: mmjvb as a volunteer commentedDocumenting what works is not the same as recommending!
Comment #28
jhodgdonI do not think that documenting that you can use Drush 8 is a good idea either. It may work today, but if it's not supported, we could be documenting something that opens up people to security problems.
Comment #29
mmjvb CreditAttribution: mmjvb as a volunteer commentedWell, that is good to know. Won't be wasting time on the User Guide anymore.
Comment #30
jhodgdonI'm sorry you feel that way... Let me explain a bit more.
http://docs.drush.org/en/master/install/ says that Drush 8 is only supported for Drupal versions through 8.3. We are currently working on the Drupal 8.5 and/or 8.6 versions of the User Guide. To me, suggesting that people install Drush 8 and hope that it works (even though it is not supposed to for Drupal 8.4 or later) doesn't sound like a good idea. Most likely, as time goes on, they would start to run into more and more problems with Drush 8, and that would be frustrating, since we told them Drush 8 was a good option.
Because of that, it seems to me that if we are going to recommend or mention Drush, we should recommend that people use the version that is supported for the current versions of Drupal, which is Drush 9.
Does that make sense?
Comment #31
mmjvb CreditAttribution: mmjvb as a volunteer commentedSorry, we are just too far apart. Both are too convinced about their right and wrong things to do. We just disagree, so I withdraw.
See https://drupal.stackexchange.com/questions/231741/has-drupal-abandoned-d...
If only the User Guide was the resource people needed!
Comment #32
jhodgdonI took a quick look at the Drupal Console documentation. A few thoughts:
a) According to the documentation, it looks like to install Drupal Console, you need to install both the "Launcher" (to run global Console commands), and Console itself (within each Drupal installation, to run installation-specific Drupal commands). Reference:
https://docs.drupalconsole.com/en/getting/project.html
b) The launcher install instructions assume that you already have curl and PHP installed, but there aren't requirements pages that explain this. I think they would be confusing instructions for people maybe less familiar with the command line, and they would probably not work on all computers.
https://docs.drupalconsole.com/en/getting/launcher.html
c) The Console instructions say it needs to be installed using Composer.
https://docs.drupalconsole.com/en/getting/composer.html
d) Given that you apparently need Composer to do anything with Console, I don't see it being that much of a big win over just using the Composer instructions to download Drupal and modules. And I don't think it has much to offer for commands other than the downloading commands.
So... I think for now we should stick with Composer for downloading. But I'm going to make a separate issue where we can explore whether to add more about Console to the User Guide (it will mark this one as Related, so see sidebar).
Comment #33
jhodgdonOK...
So, we now have related issues for:
- Drupal Console - #3005751: Add information about using Drupal Console to User Guide
- Quick start tool - #2969725: Add documentation about command-line quick start tool (8.6)
- Fixing up Composer docs - #2980636: Fix Composer instructions for downloading Drupal core in User Guide, or add warning
Let's leave those related tasks to those related issues. Given that, I think the patch in #17 should be reviewed as it is, so setting this back to Needs Review. I'll go look at the Composer docs patch now too, because that urgently needs to get done.
Comment #34
NickDickinsonWildeDrupal Console has a lot more than downloading as far as commands go - *roughly* equivalent to Drush in features, although both have at times things the other doesn't and there are lots of differences. By default, the Drupal Commerce composer starter installs Drupal Console and not Drush, the Drupal Composer Project starter from Github installs both. /clarification of dubious necessity.
Comment #35
NickDickinsonWildeLooks awesome Jennifer. Did have 1 typo and 1 minor concern.
+1 RTBC except for that minor concern.
I'm concerned here about one thing... deleted files. In some cases, not deleting files will be harmless, but in others 💣.
Maybe something like:
[snip]The recommended procedure is to make an archive or zip file of the new/changed folders, transfer the archive to your live server, and extract it there after deleting changed folders.
(also, ook argh that is a dangerous life to live, but good to provide instructions for those hamstrung by their hosting providers)
The example drush si command has an extraneous space in --site-name.
Comment #36
hansfn CreditAttribution: hansfn commentedI'm fine with just removing Drush as a recommended way to download / update core and modules. Reviewing the result of the patch in comment 17 is hard, but it seems correct.
The small win with using Drupal Console, is that you can download modules and update modules and core, but you can't avoid the initial Composer usage. I (finally) agree that we might as well just recommend to use Composer for all the download / update tasks - not Drupal Console (or Drush 8).
PS! I'm not going to start a further Drush vs Drupal Console discussion, but most of the issues mentioned in comment 32 is valid for Drush as well. The wording in their docs might be different though. (The launcher is optional for both Drush and Drupal Console.)
Comment #37
jhodgdonRE #34 -- let's leave the discussion about what to say for Console to #3005751: Add information about using Drupal Console to User Guide.
RE #35 -- making a new patch to address review, thanks! The new paragraph in install-composer says (sorry, interdiff failed me here):
Comment #38
NickDickinsonWildeI use know interdiff way less than I should and like it less than it deserves ;)
Looks good to me and for unfamiliar users I think it is sufficiently clear.
Comment #39
Amber Himes MatzRead through the entire patch. Looks good to me. +1 RTBC.
Comment #40
eojthebraveThis looks good to me. I have just one small nit-pick below. Overall, I like the decision to split this into multiple pages. I think it helps reduce duplication and removes some of the "if this then that" confusion that arises from trying to cover to many things on a single page.
Can we change the order of these two. I don't think we're necessarily trying to recommend one approach over the other but since people might take it that way I would order them as:
- Composer
- Download manually
- Git
Both composer and manually download also imply that you're getting a tagged release. Which is probably better in most cases.
Comment #41
Amber Himes MatzI like @eojthebrave's suggestion in #40.
Comment #42
jhodgdonIt looks like we're probably going to eliminate Git, as a downloading method, from the User Guide -- see #3007090: Remove Git as way to download core/modules/themes. But for now, yes I'll change the order.
Comment #43
jhodgdonAdding a follow-up issue also: #3007656: Update lists of topics to current list
Comment #44
jhodgdonOK, I changed the order of those two paragraphs as in #40, and otherwise committed the patch in #37. Oh, I noticed we used the word "folder" instead of "directory" in the Git/Composer topic, so I fixed that as well (our standard is to use "directory" to refer to directories/folders).
Thanks for all the discussions and reviews! I'll be sending an email message to the translation group...