Problem/Motivation
To create a Composer-based site from a template, the Composer Project Template README advises:
composer -n create-project drupal/recommended-project:^8.8 my-project
This does not work today, because there is no stable release of Drupal 8.8. This command would work if the version constraint were changed to ^8.8@dev
. A simpler version of the same command would also work with the addition of a minimum stability specification:
composer -n create-project -s dev drupal/recommended-project my-project
Once there is a stable release of Drupal 8.8.0, the above command will continue to create the 8.8.x-dev version of drupal/recommended-project. However, since that project includes a "prefer-source": "true"
directive, the dev version of drupal/recommended-project will install a stable version of drupal/core. This might not be what the user expects, but it would be awkward to remove prefer-source from dev versions of drupal/recommended-project, since it is produced from a subtree split.
Proposed resolution
We should update the documentation to include -s dev
, so that the create-project
command will work.
As a follow-on task, we should add documentation on how to install a dev version of drupal/core
by running composer require
as a second step after composer create-project
. There is no point in adding this documentation until there is a stable release of 8.8.0, as it offers no benefit and might cause confusion before then.
Remaining tasks
Update the documentation aboutcomposer create-project
.Create follow-on issues.#3085315: Provide instructions on how to use a dev version of drupal/core in a Composer-managed site
User interface changes
None
API changes
None
Data model changes
None
Release notes snippet
n/a
Comment | File | Size | Author |
---|---|---|---|
#8 | 3085075-8.patch | 504 bytes | greg.1.anderson |
#2 | 3085075-2.patch | 504 bytes | greg.1.anderson |
Comments
Comment #2
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedUpdate issue summary and add patch to fix command in documentation.
Comment #3
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedComment #4
hussainweb@greg.1.anderson, how about adding a brief description which explains why this is needed and it can be removed later. Something like this:
Comment #5
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commented@hussainweb: I did consider that, but the information does not seem to be very important. It saves a few characters of typing, but we can just remove the description once there is a stable release (see follow-up issue). There isn't any real negative impact if folks keep using
-s dev
, because you'll still get a stable release of drupal/core (if available).Comment #6
hussainwebAh, that's right. In that case, this LGTM.
Comment #7
webchickI am a huge fan of working documentation! ;)
Confirmed:
But when I do the new version:
...whoops! ;)
Comment #8
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedArgh I did this hundreds of times (yes, I exaggerate), and then I make a cut-copy-pasta error.
Here's a better version.
Comment #9
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedComment #10
larowlanComment #11
webchickAwesome! Confirmed the new instructions work great. SUCH EXCITEMENT to see the Composer stuff coming together!
Committed and pushed to 8.8.x. Thanks!
Comment #13
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedRetroactively update issue summary to match what was committed.