https://www.drupal.org/docs/user_guide/en/install-composer.html points to the 'unofficial, yet functional' method for starting a site.

Beginning in 8.8.0 (and currently on 8.8.x) these external templates are now part of core. We should update the docs to reflect the varied nature of the two templates that we support.

The following changes will need to be made:

  1. composer create-project drupal-composer/drupal-project instructions will need to be replaced with drupal/recommended-project.
  2. Optional - also explain about the choice to use drupal/legacy-project.
  3. Currently the page says that Drush and Drupal Console are included; this should be updated to include instructions on how to add them.
  4. Optional - also provide a reference to patching with cweagans/composer-patches.
  5. Conversion of existing projects using grasmash/composerize-drupal is explained; this will need to be updated to the new tool.
  6. There is a link to a presentation recording; this will need to be reviewed and maybe updated.

These documentation changes are postponed pending availability of the new conversion tool et. al.

CommentFileSizeAuthor
#20 3086656-20-composer-updates.patch3.99 KBeojthebrave

Comments

Mixologic created an issue. See original summary.

Mixologic’s picture

https://www.drupal.org/docs/user_guide/en/extend-module-install.html should also mention how to find the composer instructions to install a module, if you are managing a site with composer.

Mixologic’s picture

Now might be a good time to actually explode section 3.5 out into its relevant locations, composer is just the mechanism, but downloading, modules, updating core, installing core for the first time, those are the user relevant actions, and composer should be mentioned under each of those sections.

jhodgdon’s picture

We're still on Drupal 8.7.x for the User Guide. We generally open a new branch after the .0 is out (soon!), because the User Guide mostly talks about the UI (best to wait until the UI is stable instead of trying to chase it). But this seems like a good idea once we open the 8.x-8.x branch of User Guide, which corresponds to 8.8.x of Drupal Core.

Patches will, at that time, be welcome. :)

Mixologic’s picture

Status: Active » Postponed

Sounds great. Just trying to enumerate all the places that might be outdated now that we've created a much more "official" way to do things with composer and core.

does the 8.x-7.x branch correspond to 8.7.x for drupal?

jhodgdon’s picture

Yes, each branch of the User Guide corresponds to a Drupal Core branch with the same sub-number.

yonailo’s picture

I have installed my D8 site using https://github.com/drupal-composer/drupal-project.

If after the D8.8 release Drupal core will officially support a new composer package installation system, could you please document how we can switch from the old template to the new officially supported template(s) ? Moreover, Is it better to switch or can we keep using the now outdated drupal-project template ? What are the pros and cons ?

I am a bit worried about this change (please keep in mind that I am not a composer expert so maybe I am asking obvious things.. :)

jhodgdon’s picture

Thanks for the comment! I am not yet sure how this will work. We might not document how to switch in the User Guide, but we should at least link to a drupal.org page/section that would have this information.

baluertl’s picture

Title: Update user guide to reflect 8.8.x changes to composer workflow » Update user guide to reflect 8.8.x changes to Composer workflow
greg.1.anderson’s picture

Issue summary: View changes
jhodgdon’s picture

Thanks for those updates @greg.1.anderson! That clarifies things a lot. Issue still postponed until we open the 8.x-8.x branch (corresponding to Drupal 8.8.0).

baluertl’s picture

Status: Postponed » Active

Drupal Core version 8.8.0 is out, so this issue is active again.

mmjvb’s picture

Status: Active » Postponed

Postponed on opening 8.x-8.x branch of User Guide.

baluertl’s picture

There's no point to play ping-pong by switching issue status back and forward. As there's no other issue about opening the relevant branch, therefore this issue implicitly includes that as well – for me, at least. I thought activating this issue will wake up this topic from sleeping.

mmjvb’s picture

Indeed it will wake up people and put them back to sleep when they figure out it is still postponed because the branch isn't there. It is the branch it was postponed on, not release of drupal.

So, thank you for informing people they still need to wait for that branch !

jhodgdon’s picture

Version: 8.x-7.x-dev » 8.x-8.x-dev
Status: Postponed » Active

Branch created.

eojthebrave’s picture

I'm starting to work on this and have a question about, "Conversion of existing projects using grasmash/composerize-drupal is explained; this will need to be updated to the new tool."

Is grasmash/composerize-drupal still relevant? It looks like it uses the older `drupal/core` and `drupal-composer/drupal-scaffold` dependencies. So we probably don't want to recommend people use it. Is there a new tool to help with automating this conversion?

This page currently seems to have the best documentation https://www.drupal.org/docs/8/install/add-composer-to-an-existing-site#s.... And, I don't think we should duplicate it. What if instead in the User Guide we say something like; "If you have >= 8.8.0 you're good to go. Otherwise to convert a site that was created using a version of the core software prior to
8.8.0 see the instructions at
https://www.drupal.org/docs/8/install/add-composer-to-an-existing-site[Add Composer to an existing site]."

Now that Drush/Drupal console are no longer installed by default we can remove the text that says they are. But, should we add new content that explains how to install them? Perhaps this belongs in the Additional Tools page now https://www.drupal.org/docs/user_guide/en/install-tools.html?

Once the written version has been updated I can also make sure the video gets updated.

jhodgdon’s picture

Woot! Thanks for taking this on. My thoughts (hopefully correct):

- Yeah, it seems like the grashmash project is obsoleted because we now have an official one on drupal.org.
- I agree with pointing people to the online page regarding converting from an old project
- If the official project doesn't install either Console or Drush, yes I think we should say how to install them starting with the official Drupal composer project. That's kind of important.

greg.1.anderson’s picture

eojthebrave’s picture

Status: Active » Needs review
StatusFileSize
new3.99 KB

Here's a first pass at these updates.

I'm thinking that instead of talking about the forthcoming tool to assist in converting a site to start using Composer we just remove that completely and link to the docs on Drupal.org. Then, once that tool is complete, it can get added to the documentation here https://www.drupal.org/docs/8/install/add-composer-to-an-existing-site and the User Guide doesn't have to be updated. And, also doesn't have to be updated as the tools change over time.

One question that remains is related to comments #3 and #5 where @Mixologic suggests that now that Composer is the "official" method for installing Drupal should we consider updating the User Guide so that relevant composer commands are present on pages like this one https://www.drupal.org/docs/user_guide/en/extend-module-install.html. At least that's how I'm interpreting the suggestion.

My current thinking is that I still like the way it's organized now where there's just one page with Composer commands and we link to that whenever we want to do something with Composer. I like that it makes it easier to keep the commands up-to-date without having to edit them in multiple places. And, I'm as long as there's still a prominent tarball download option on Drupal.org we should probably mention it in the user guide.

Should we consider trying to emphasize Composer as the "official" way while still providing documentation about manually downloading tarballs? Like for example adding a note to this page https://www.drupal.org/docs/user_guide/en/extend-manual-install.html that tells people they should consider using Composer instead? My instinct is that we should at some point, but maybe not yet? Maybe in the 9.x branch?

amber himes matz’s picture

Status: Needs review » Reviewed & tested by the community

Patch in #20 LGTM.

  • jhodgdon committed af57139 on 8.x-8.x
    Issue #3086656 by eojthebrave, Mixologic, greg.1.anderson, Amber Himes...
jhodgdon’s picture

Status: Reviewed & tested by the community » Fixed

Thanks everyone -- committed! I think this is the right thing to do for now.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.