Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
In order to fix support for core in composer, we need to add a composer kickstart template to core that becomes the starting point for all future drupal sites.
The https://github.com/drupal-composer/drupal-project has shown that this is the best practice method for starting drupal sites using composer, and should be used as a basis for what this looks like.
Proposed resolution
- Two templates will be provided: a "recommended" template modeled after drupal-composer/drupal-project, and a "legacy" template modeled after the existing tarball downloads.
- The project templates will be split out from core using the existing subtree splitter, and will exist on packagist.org and github.com.
- These templates *are not meant to be upgraded*. They are intended to initially set up a drupal site, but should be free from any implied features.
- The initial effort is *not meant* to make it easier/faster/better to get a site up and running over a bare tarball. (i.e. patches/docroots/webroot/security fixes etc). Those features can be added later, in an additional template.
- The "legacy" template is expressly designed to change absolutely nothing about what the filesystem structure and layout looks like. When you run
composer create-project drupal/legacy-project
, it should mirror *exactly* what you get when youdownload the current tarball from drupal.orggit clone and composer install the git repository (although there will of necessity be minor differences in certain files, such as composer.json and composer.lock).
Remaining tasks
- [X] #2982684: Add a composer scaffolding plugin to core
- [X] Plan to support multiple templates. (Just put them in a directory)
- [X] Decide naming convention for templates. (drupal/recommended-project and drupal/legacy-project)
- [X] Decide where it's physically located inside of the directory tree. (composer/Templates)
- [X] Decide how to test this, and what the bar is for success vs failure. (Just test 'composer install' to start.)
- [X] Submit a patch that takes all of the above into account.
- [X] Write a change record.
- [X] Add documentation to drupal.org.
- [X] Remove .gitignore from the project template for now, pending discussion in follow-on issue (see below).
- [X] Make a follow-on issue to decide what to do about the .gitignore file long-term. (#3082958: Add gitignore(s) to Composer-ready project templates)
- [X] Make a follow-on issue to decide what to put in the "suggests" section. (#3082983: Decide what to "suggest" in Composer Project Templates)
- [X] Make a follow-on issue to strip wikimedia/composer-merge-plugin from drupal/core-recommended. (drupalorg-infrastructure/package-generator#1)
- [X] Determine whether the Composer-managed layout causes Drupal to use more memory. (Memory requirement increase not due to Composer, per #3082985: Determine whether it is expected to be able to install demo_umami with 128m of RAM)
Follow-on tasks
- Improve testing leveraging #2984031: Create Build Tests For Composer and Drupal
- Build Drupal download tarballs from the legacy template project #3082470: Update drupal/drupal tarball generator
- Update Composer documentation once Drupal is sufficiently ready #3082601: Update Composer documentation to match Drupal 8.8.0+ capabilities
User interface changes
None.
API changes
None.
Data model changes
None.
Release notes snippet
Drupal.org now provides "starter" Composer project templates that can be used to start new Composer-managed sites.
- Use
composer create-project drupal/recommended-project
to create a site where the Drupal root has been relocated into aweb
subdirectory. - Use
composer create-project drupal/legacy-project
to create a site where the Drupal root is in the top-level directory, with thevendor
folder.
Comment | File | Size | Author |
---|---|---|---|
#111 | 2982680-111.patch | 8.21 KB | mbaynton |
#111 | 2982680-91-111.interdiff.txt | 2.27 KB | mbaynton |
#104 | 2982680-104.patch | 12.01 KB | mbaynton |
#104 | 2982680-91-104.interdiff.txt | 2.96 KB | mbaynton |
#91 | 2982680-91.patch | 10.48 KB | Mixologic |
Comments
Comment #2
webflo CreditAttribution: webflo at UEBERBIT GmbH commentedMultiple templates is easy, we could do it by providing multiple templates and subtree splits.
Comment #3
webchickThis is a core requirement of the Composer initiative, so escalating to Major.
Comment #4
webchickAlso there's a patch! :D
Comment #5
phenaproximaTagging for manual testing.
Comment #6
phenaproximaCan the description explain the difference between this project and drupal/drupal-project? A _readme section in the extra block might also be useful here.
I like this line, but I thought core wasn't supposed to be Drush-aware? I'm asking merely for completeness' sake.
Comment #7
webflo CreditAttribution: webflo at UEBERBIT GmbH commentedRelated to #6 - 2
The current version in on the repo root is already Drush-aware :)
Comment #8
phenaproximaAnother question: will the subtree split begin at core/scripts/composer/drupal-project? If so, maybe we want to add a .gitignore which ignores the vendor directory and any directories in the webroot which are likely to be heavily customized (modules/custom, for example). I realize this is out of scope for this issue, but maybe a follow-up is called for?
Comment #9
webflo CreditAttribution: webflo at UEBERBIT GmbH commentedYes the subtree split should start at core/scripts/composer/drupal-project. All other required files like .htaccess, .gitignore should be shipped via drupal-scaffold.
Comment #10
MixologicShould we get the core version of the scaffold in first, and have this depend on that instead?
And if we have multiple versions (drupal-project-legacy/drupal-project), then do we need to have multiple scaffold plugins? or some way to make the scaffold plugin figure out where to lay out the files?
I just want to ensure that
composer create project drupal/drupal-project-legacy
creates an identical copy to what we get today with a git clone (except /composer.json and /composer.lock)Comment #11
phenaproximaIf I understand this correctly, that will require the scaffold plugin to be ready first. So maybe we should block on that issue.
Comment #12
MixologicYep. thats what I was implying. Postponing this on #2982684: Add a composer scaffolding plugin to core
So, I was also thinking about how to test this stuff, since the subtree splits only happen against the stuff thats committed to the repository.
*if* we can agree on the name, or at least call it temporarily, I can create github projects for drupal/drupal-project and drupal/drupal-project-legacy and drupal/drupal-scaffold, and we could work on these there if need be. That way we can add them to packagist, and write the build tests to prove that they work. The final step could be then to move them into core.
Once they are in core, we'll overwrite the github repo's with the subtree splits.
Comment #13
phenaproximaThat sounds like a pretty good plan to me. As far as I know, Drupal CI has no way to test this kind of packaging functionality, but we could easily do it on Travis CI.
Comment #14
effulgentsia CreditAttribution: effulgentsia at Acquia commentedJust an idea, feel free to disagree or suggest improvements, but what do you think of renaming
drupal-project-legacy
todrupal-project-everything-in-document-root
ordrupal-project-root-is-document-root
?Comment #15
effulgentsia CreditAttribution: effulgentsia at Acquia commentedAlso, the word "kickstart" doesn't appear in the patch at all. Should we remove it from the issue title as well?
Comment #16
MixologicI guess it depends on who we'd be telling to use that particular starting point.
If its literally just drupal.org's packaging infra to create identical tarballs, then we can name it whatever we want.
But, if we're going to have our documentation say stuff like "If you have a webhost that gives you just one folder and says "put your website in this folder", then we might also be telling people "run composer create project drupal/drupal-project-legacy" in that folder, or download the tarball from drupal.org.
And sure "project templates" is probably a better name than 'kickstart' for the overarching category of what these things are.
Comment #17
MixologicIn light of #12, I went ahead and created 2 projects under the drupal namespace on github:
https://github.com/drupal/drupal-project-legacy
and
https://github.com/drupal/drupal-scaffold
I got rid of any branches/tags, and set the default branch to 8.6.x, and submitted both of them to packagist, and setup the auto update hooks.
That means we ought to be able to setup travisCI on the drupal-project-legacy project for the time being to run the test I outlined here: https://www.drupal.org/project/drupal/issues/2984031
Maybe @phenaproxima you can help with that? (I havent used travisCI much, being as I have another CI system where I spend most of my time).
Comment #18
effulgentsia CreditAttribution: effulgentsia at Acquia commentedI don't know if this is feasible, but something like this might be cool if it were:
A single project with installer paths like:
And the ability to pass the value of docroot through when calling
composer create-project
, maybe something like:or
Comment #19
Mile23I think this issue needs some scope love.
If this is the issue where we make drupal/kickstart, then we should spec it out and only do that.
So we have:
(Two bikesheds and a specification walk into a bar...)
I suggest outside of core/ for the location since core/ is also its own Composer package. We could have a projects/ or packages/ directory, if that won't conflict with something or be too confusing. Also should have a README.txt per project explaining the whole thing.
We can do packaging type behaviors on DrupalCI, and eventually we should move to doing that, but we don't have a way to trigger different types of builds. In some ways that would be good because we can always make sure a patch doesn't break a build. But that's a bit wasteful.
Some experimentation tells me that we can make our own packages.json file for the local file system and specify that as
composer create-project --repository path/to/packages.json
. This would help us write in-place patch tests of builds. I'm not sure where the canonical subtree split file is located; maybe we could repurpose that in some way.Comment #20
MixologicFor now, we'll just go with whats in the patch, which is 'drupal/drupal-project-legacy', and 'drupal/drupal-project'. The former is mostly for the packaging infrastructure and those users who somehow have a terribad webhost with only one folder, yet want to command line composer start a project. Not a particularly common use case IMO -> most of those users will probably download the tarball. The latter will be for those who want that sweet sweet web folder.
I agree that it probably should not be nested underneath /core since we're eventually wanting to make a subtree split of core that does not contain nested packages. Granted we may be able to do that anyhow, but since we're no longer treating the core repository as our product, then yes, we can make an arbitrary top level directory that is "starter-templates" or something.
So I was doing some experiments, and I think we should aim for this to replicate the filesystem of the current git repository, and not of the tarball. The tarball is built out of the git repo, but then adds additional 'magic' to the packaging, like modifying all of the .info.yml files to have the version string added. 😢, as well as injecting the LICENSE.txt file into the root of the repo.
In the interests of doing one thing at a time, if we aim to replicate the git repo, then packaging only has to change from 'git clone' to 'composer create project' to make the tarball. We can address the version and license stuff later on in future issues. This would mean that if that version stuff is critical in the .info.yaml files, then we'll probably need to address it with something like https://www.drupal.org/project/composer_deploy
So, speaking of those experiments, I built a test that is running on travis.
https://www.drupal.org/project/drupal/issues/2984031#comment-12676495
Comment #21
MixologicComment #22
MixologicComment #24
Mixologicterribad patch. Jetlag to blame.
Comment #25
bojanz CreditAttribution: bojanz at Centarro commentedAgreed. Could be just "composer", or "composer_templates" (we tend to prefer underscore over dashes, no?).
Comment #26
Mile23By way of an update:
So I had been doing some work on https://github.com/drupal/drupal-project-legacy with my own fork at https://github.com/paul-m/drupal-project-legacy
The goal was to make a file-diff perfect replica of the 'tarball' package using Composer. We currently don't have a way to test this with DrupalCI, but we're using travis-ci.
I succeeded, but I had to import the Composer event scripts from core to accomplish this, since using diff means we can’t just compare the packages that were installed, but we also have to compare all the test code removal that our scripts perform when we run composer install.
I talked it over with @mixologic and the consensus was that we needed to solve the following problem: We must use those scripts to clean out test code from dependencies, but the scripts are only present in one of the dependencies, not in our template project.
That is, we must use the event scripts, but we must also not put the scripts in the drupal/drupal-project-legacy codebase.
That’s because once you use the project template, it never goes away, and more importantly it’s never modified or updated.
This is reflected in the concerns in #2990257: Determine how to handle composer scripts in drupal/drupal
Comment #27
MixologicBuilding off the work that @mile23 did in #26, I've updated https://github.com/drupal/drupal-project-legacy, and now we have a template that builds something very, very similar to what we get with a git clone and composer install.
Some notes:
drupal/drupal
's lock file, merged with the drupal/core, and drupal/scaffold dependencies. See #2983089: Add a core lockfile creator to generate template lockfiles. for more information on how this works.composer create-project
, and then comparing that to a git clone/composer installed version of drupal. We're removing files that we *know* will be different and are not relevant to the comparison. The goal here is to prove that what we've built is functionally identical to what we provide currently in the tarball and when users start with a git clone.I could *really* use more sets of eyes
to help determine if any of this: https://travis-ci.org/drupal/drupal-project-legacy/builds/443380886#L841... matters.
Things that remain:
1. potentially move the code from
core/lib/Drupal/Core/Composer/Composer.php
into the drupal-scaffold plugin. Or, perhaps into a plugin of its own (re: https://www.drupal.org/project/drupal/issues/2990257#comment-12804649), Or, commit the patch in https://www.drupal.org/project/drupal/issues/2998829 to core, but suffer error messages on project creation.2. incorporate the code reviews of the drupal-scaffold plugin (https://www.drupal.org/project/drupal/issues/2982684#comment-12769425 and https://www.drupal.org/project/drupal/issues/2982684#comment-12769839),
3. determine if the preautoloaddump script is needed (potential followup - non-blocking).
4. determine if the ensurehtaccess script is needed, or if it can be replaced by drupal-scaffold (potential followup - non-blocking).
Comment #28
Mile23The diffs in https://travis-ci.org/drupal/drupal-project-legacy/builds/443380886#L841... are there because the autoloading setups are slightly different.
I just removed the whole vendor/composer directory in my version of that travis test: https://github.com/paul-m/drupal-project-legacy/blob/passing/.travis.yml... because as your diff points out: We'll have different sets of classes loading, especially with the scaffolding plugin, and potentially different order of adding the dependencies.
So if we can run and pass tests then it's clear that the autoloading is occurring, but it might not be a carbon copy of the autoloader files. Since we don't install with
--dev
, we have to figure out some other suitable way of proving that autoloading works. Maybe try to do the quickstart install before we delete all the different stuff:php core/scripts/drupal quick-start demo_umami
Comment #29
MixologicI just want to make sure that whatever differences there are, are not material and/or important, or we at least understand why the differences are there. Im pretty sure that the answer is "because of wikimedia merge plugin" but I'd like some other folks to either confirm or deny that.
I'd be willing to bet that all of the currently installed drupal 8 sites that are using the drupal-composer/drupal-project template are also getting the same type of discrepancies in autoloading, which is somewhat of another indicator that the changes arent relevant. But again, Im just betting. Confirmation would be build confidence in this case.
Somebody could definitely try the umami profile to ensure its working in this case, as a way to prove this works.
Comment #30
Mile23All the differences are either components or packages that aren't added to the tarball.
You're correct that it's the merge that does it. drupal-project-legacy doesn't do the merge that drupal/drupal does.
In drupal/drupal we merge core/composer.json recursively, and core/composer.json merges all the components. We do this so we at least verify that the components' composer.json files are usable, and that they reconcile with the other dependencies.
I just spent 20 minutes waiting for various phases of
composer create-project
to timeout due to network issues, so congratulate me on verifying that drupal-project-legacy does in fact add a PSR-4 classmap forDrupal\Component
, which catches all the components:Whereas drupal/drupal sets up PSR4 for all the individual components like
Drupal\Component\[YourComponentHere]
, which is arguably better but not by much. See especially the last line:The scope here is to be able to build a file-perfect replica of drupal/drupal. So we can do that easily minus the autoloading files, if we prove that the autoloading works by running something in the travis test.
We have a few options:
1) Not care about this discrepancy as long as we run something to prove that autoloading works.
2) Add the merge plugin and have it recursively merge core/composer.json. This gets us a similar set of PSR4 arrays. The reason we have the merge is to exercise the composer.json files. We don't need the merge here because we exercise it whenever we use drupal/drupal. But it would maybe give us similar PSR4 arrays.
3) Make core/composer.json require the components. That's part of the goal in this issue: #2943842: Allow component namespaces to be autoloaded independently and others. So we shouldn't do that here.
Comment #31
MixologicFabulous. Thanks for verifying that.
Or, if there *are* changes, to be able to explain any discrepancies and confirm that its all backwards compatible and not going to impact/impair existing sites or functionality, so I think this qualifies.
As far as the options go:
1. is where I think we should focus.
2. I'd love to kill the merge plugin with fire. We should have better ways to "exercise the composer.json files", we definitely dont want to have this moving forward, and we definitely want to revert the addition of it to drupal/core.
3. Definitely want to do this, and it'll be significantly easier to do once these templates are in place, but I don't think it needs to be done just yet.
So, was exploring the quick start, which seems like a reasonable assumption that core needs at least one of the components to render the home page of umami, and it appears to work fine. I ran `php core/scripts/drupal quick-start demo_umami` and curl'ed the homepage for both the git repo version and the template version, and they were identical in every way except the expected hash tokens were different.
so, I'm comfortable saying "not care about the discrepancy" - as I dont think we really need to add the check to travis since it'd be kinda tough to do a comparison without figuring out how to handle the itok/hashing stuff in the html etc.
Comment #32
Mile23Is there a PR or github branch related to this work?
Comment #34
Mile23Updating IS to show that the only real blocker here is #2982684: Add a composer scaffolding plugin to core
Comment #35
Mile23Over in the Composer Initiative meeting we decided that the scaffolding plugin and the vendor cleanup plugin should be different. #3053800: Agenda for 5-15-2019
So now we're also blocked by #3057094: Add Composer vendor/ hardening plugin to core
We'll also be able to reliably test after #3031379: Add a new test type to do real update testing but that might not be a hard blocker.
Comment #36
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedI forked https://github.com/greg-1-anderson/drupal-drupal-composer to demonstrate the legacy project using the drupal/scaffold plugin #2982684: Add a composer scaffolding plugin to core.
Comment #37
grasmash CreditAttribution: grasmash at Acquia commentedI'd like to document some thoughts coming out of the the most recent Composer in Core initiative meeting.
For the initiative to be successful, we will need to modify and create multiple composer packages. I was having some trouble wrapping my head around all the packages, their purposes, their file structures, and their dependencies, so I've drafted a quick summary of the plan:
drupal/core
8.8.x
This will contain Drupal core files and files that were formerly "scaffold" files within the drupal/drupal package. I.e., the structure will look like:
* assets
** scaffold
*** .htaccess
*** robots.txt
*** ...
** ...
* config
* includes
* ...
drupal/drupal
8.7.x
This branch would be deprecated. It (still) cannot be used to create new Drupal projects that can be managed with Composer.
I.e., the structure will (still) look like:
* core
* .htaccess
* vendor
* ...
8.8.x
This branch will be used to create new Drupal projects that can be managed with Composer.
I.e., the structure will look like:
* docroot
** core (provided by drupal/core package)
*** assets
**** scaffold
***** .htaccess
** .htaccess (copied from docroot/core/assets/scaffold/.htaccess)
** ...
* vendor
* ...
And it’s composer.json will include:
drupal/drupal-legacy
This package will support the legacy layout for future versions of core. I.e, it will support the layout of files used in drupal/drupal:8.7.x and prior, but will do so for drupal/core 8.8.x and forward.
The purpose of this package is to provide an upgrade path for users that downloaded Drupal using a tarball. This package will be used to continue to generate tarballs on Drupal.org using an (unchanged) legacy layout of files.
drupal/core-strict
This package will force projects to use exactly the versions of pinned dependencies that Drupal core specifies in its own composer.lock file, much like https://github.com/webflo/drupal-core-strict.
Comment #38
Mile23New child issue, working on the scaffolding package: #3067645: Add core scaffold assets to drupal/core's composer.json extra field
Comment #39
Mile23New child issue. Begone, foul merge! #2912387: Stop using wikimedia/composer-merge-plugin
Comment #40
MixologicComment #41
jibran#3067645: Add core scaffold assets to drupal/core's composer.json extra field is in I think we can un-postpone this.
Comment #42
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedYes, we can start working here. We probably want to do #3076600: Create drupal/core-recommended metapackage before we call this issue done, though.
The tests for my prototype project are green again using the scaffold files from drupal/core:
https://travis-ci.org/greg-1-anderson/drupal-drupal-composer/builds/5768...
This project is a good starting point for making the templates here.
Comment #43
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedHere are some templates for the "recommended" and "traditional" project layouts. As noted in the README, the Vendor Hardening plugin is not included yet pending #3077455: Move Drupal Components out of 'core' directory.
I included a couple of extremely rudimentary tests for the provided template projects:
composer install
must work, and both the core directory and the autoload.php file must be placed in the correct location. We can improve the tests with #3031379: Add a new test type to do real update testing, once that is committed.Comment #44
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedFix typo / quote escaping error.
Comment #45
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedMy naive tests did not play well with the test bot; rather than fiddle with it, I am just going to take out the simple assertions and rely on only the exit code for `composer install`, and see if we can't do something better after #3031379: Add a new test type to do real update testing.
Comment #46
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedMarking as postponed on #3077455: Move Drupal Components out of 'core' directory, which is preventing us from adding the Vendor Hardening plugin here.
Comment #47
jibranLet's create a script file for these and then we can run that here.
Comment #48
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commented@jibran: That's not a bad idea. However, even if we do not wait on #3031379: Add a new test type to do real update testing, we are still blocked on #3077455: Move Drupal Components out of 'core' directory. I'd recommend waiting to see how both of those issues progress before deciding how to move forward here; however, I wouldn't be opposed if someone wanted to try making a patch for #47 as a contingency.
Comment #49
MixologicSo I believe that we're unpostponed now.
Comment #50
jibranRE #48: How about something like this?
Comment #51
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commented#50 looks very similar to the script I wrote last night. :)
I'm +1 on it, except that I would put the test script somewhere in 'core/tests' rather than in 'core/scripts'.
Comment #52
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedWe also need to add the vendor hardening plugin to the traditional template (but not the recommended template).
I'm going to wait until the tests in #50 complete before rolling a new patch, but anyone else who feels like pushing this forward is welcome to do so.
Comment #53
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedPostponed on https://www.drupal.org/project/drupal/issues/3080649
Comment #54
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedAdded vendor hardening plugin, moved the script, and fixed up the .gitignore file for the recommended project template.
Setting the status to 'needs review' so that the tests will run, but this should go back to 'postponed' once the job is complete.
Comment #55
jibranI copied these utlity methods from @nicksanta's blog post https://www.nicksantamaria.net/post/boilerplate-bash-script/.
Comment #56
volegerSee #54
Comment #57
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedThe issue that this one is postponed on is RTBC, so I expect we should be un-postponed again here soon. In the meantime, if anyone has any review comments on things that need to be changed, feedback would be appreciated. Of particular note is whether the README says what it needs to say. We could also use a change record here (the two already listed are actually for subtasks of this issue). I'll probably have time to write up the change record later this evening if someone else doesn't do it first.
Comment #58
jibranHere is a suggestion.
Let's move it under
core/tests/scripts/
.Comment #59
Mile23+1 on core/tests/scripts/.
Also, can we add a @todo to this script so that we'll convert this to a build test after #3031379: Add a new test type to do real update testing?
That way you won't need bash to run this test, and it can be easily performed locally.
Comment #60
MixologicThe version numbers here concern me. When core is released, should these be 8.8.0? Do these need to be bumped every minor version?
can/should these be self.version?
drupal/traditional-project and drupal/recommended-project are going to get the exact version/tag numbers from whatever version of core they are subtree split from.
Also, is 'traditional' vs 'recommended' clear enough as to which is which? Im somewhat in favor of 'legacy' over traditional, just because that language would cause anybody who needs that to question 'what am I doing wrong by using 'legacy' ?'
Are these artifacts of including cweagans/composer_patches
Comment #61
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commented@todo-ing the tests is a good idea.
> When core is released, should these be 8.8.0?
Actually, we can just start using '^8.8'. With minimum-stability: dev, that will select 8.8-x.dev. Once we have a stable release of Drupal 8.8.0, and stable release of our behat/mink dev dependencies, we can switch minimum-stability to "stable".
self.version would not be right, because folks usually do not tag their projects with the version of Drupal they are using, and these are templates for copying -- they will not be used directly.
> I'm somewhat in favor of 'legacy' over traditional
We should definitely delve into the naming conventions here so that we can hone in on the best name. First off, I want to be clear that I'm okay with 'legacy', and think it's fine to go with this option if it is the consensus.The reason I prefer 'traditional' over 'legacy' is that the later implies 'deprecated'. The flat layout is definitely the less-esteemed option, but I also feel like it's probably here to stay. Bare-bones providers commonly have no-config web server setups where there is no option but to serve files from the root of the directory that you can write files to. Drupal will probably still be supporting this layout in Drupal 9 and Drupal 10. I would prefer to use the word 'legacy' only when you're actually getting legacy code - something that is not main-line Drupal. If you use the 'traditional' layout, what you get is the real Drupal.
Other names we might consider:
drupal/
inadvisable
use-with-caution
for-barebone-hosting-only
here-there-be-dragons
OK, most of those are not serious. But I care 3/10, let's just take a straw poll or something and pick one. (Last option, for the ballot stuffers: boaty-mc-boat-project).
> Are these artifacts of including cweagans/composer_patches
I copied this configuration from drupal-composer/drupal-project. In general, I think that we should strip as much optional stuff out of the template as possible, and strictly speaking, cweagans/composer-patches and its configuration thereof is optional. However, it is very common for folks to need to patch their Drupal sites, so it seemed very desirable to me to have common configuration like this available in the standard template.
This configuration is also the answer to the question I had in slack the other day: does patching drupal/core even work (since the patch was rolled against drupal/drupal), and if so, how? This config sets -p2 for drupal/core only, which adjusts for the difference in nesting levels in the patch. Patches rolled against modules don't need this setting, so they won't get it.
Comment #62
mbaynton@Mixologic, I thought I'd test doing it with
self.version
, but to do that I'd like to reproduce "the existing subtree splitter" locally. Where can I learn more about that / see exactly what is being run?Comment #63
mbayntonArgh, I was one refresh behind on this issue, never mind.
Comment #64
webchick#3080649: Drupal core scaffolding : path to vendor directory in generated autoload.php file is incorrect is in; back to "needs review" (I think).
Comment #65
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedWoot! We are unblocked! Still a pile of things to do, mostly minor, in #58, #59, #60 and #61.
Comment #66
mbayntonPile of minor things patch
Comment #67
mbayntonRe:
I'll suggest that I agree with @greg.1.anderson. "traditional" by itself isn't strong language, but contrasted with "recommended" I think communicates here-there-be-dragons at the appropriate volume. I'll then request that my vote count proportionally less to bigger contributors on this initiative.
Comment #68
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedOh, another thing on the naming conventions front: if we go with project templates such as `drupal/recommended`, `drupal/traditional` and/or `drupal/legacy`, we are folding into the same namespace as all of the Drupal projects. Today, there are no projects named "recommended" or "traditional", but there IS a project named "legacy". Applesauce.
If we go with "legacy", we'd have to add a modifier, like "legacy-project". I kind of prefer the shorter names, although the issue summary still says "drupal-project-legacy" (by which I think "drupal/project-legacy" was meant).
+1 on #66, but I can't RTBC here. I'll write up a change record, and then I think we just need to ro-sham-bo on the project names to be done (so not quite RTBC yet anyway).
Comment #69
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedRegarding #60 / #61, I was just reading the issue summary again, and it definitely says that patches is a non-goal for the template projects. So, as very useful and common as cweagans/patches is, perhaps we should take that out.
I'll do that & fix the test failure in #66.
Comment #70
Mile23Adding NCR and ND tags cuz we need those things. Documentation can be just a copy of the readme.
For names: +1 for drupal/legacy-project and drupal/recommended-project.
We're going to recommend the recommended project. :-) But since it's recommended and not required, it should be clear that people can roll their own if they want to.
Also, that's how you say it: Drupal legacy project, Drupal recommended project.
Sorry I referenced the wrong issue. We should link to the more-specific #2984031: Create Build Tests For Composer and Drupal instead.
Comment #71
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedRemove cweagans/patches configuration, and adjust base pass in test script. Renamed 'drupal/traditional-project' to 'drupal/legacy-project'. Updated issue reference in test script TODO.
Comment #72
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedUpdate issue summary.
Comment #73
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedProvide link to follow-on task to update tarball download generation.
Comment #74
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedUpdate documentation to change references to "traditional" to "legacy".
Comment #75
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedWrote a change record.
Comment #76
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedAdded a documentation page (copy of the README):
https://www.drupal.org/docs/develop/using-composer/use-drupal-composer-p...
Comment #77
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedAdd another follow-on task: update documentation once Drupal 8.8.0 is sufficiently ready.
Comment #78
MixologicShould we postpone on #3080205: Implicitly allow drupal/core and legacy scaffold projects to scaffold files. ?
Im not really a fan of using drupalci container commands as tests - the CI system doesn't behave the same if a composer command fails vs how it treats actual testing framework things.
Given that this is the best we can probably do until #3031379: Add a new test type to do real update testing is in, though, I wont protest very strongly, and do not believe we should postpone for those tests that we'll eventually make in #2984031: Create Build Tests For Composer and Drupal.
Comment #79
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedI think we should not postpone on #78.1 or #78.2. Let's get this committed, as that will unblock other important work, like #3082470: Update drupal/drupal tarball generator. We can come back and make follow-on commits for those item. #78.2 already has a follow-on issue. I don't know if we need a separate follow-on for #78.1, as this issue and #3080205: Implicitly allow drupal/core and legacy scaffold projects to scaffold files. are both really close. Should the later happen to be committed first, we can adjust this issue. If this one gets committed first, we can adjust that issue.
Comment #80
mbayntonSimplified `composer-scaffold` config enabled by just-fixed #3080205: Implicitly allow drupal/core and legacy scaffold projects to scaffold files.
Comment #81
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedWoot, #80 addresses #78.1.
Comment #82
mbayntonOn everyone's favorite topic of naming things, it occurs to me that as we take a pronounced "minimum file to get you a Drupal" approach in these templates (ex: recent patches like the removal of cweagans/patches configuration in #71 and #80), we're also moving away from what I believe was an initial goal of the initiative to stop having to tell people to use community drupal-composer/drupal-project to avoid pain.
I don't mean to or want to re-examine the minimalist philosophy of the templates, official minimal project templates definitely have a place. But what about including the minimalist philosophy in the names? This might just lead to a clearer set of project template names should a future arise where we also decide to ship templates that include more of the niceties of drupal-composer/drupal-project.
drupal/recommended-minimal-project
drupal/recommended-project
Instead of
drupal/recommended-project
drupal/but-you-really-want-this-project
And if that future doesn't happen, no biggie to call it what it is anyway.
Comment #83
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedI like the idea of #82 (and in fact was thinking similar things recently); however, today there is no difference between `drupal/recommended-project` and `drupal/recommended-minimal-project`, as we are recommending the minimum as an MVP for our first step here.
If we eventually decide that `drupal/recommended-project` should be more full-featured, then I would advise making the minimal project `drupal/minimal-project`. It would be confusing to have two recommended projects, and we'd rather recommend the one with extras, not the minimal one.
Comment #84
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedSpeaking of additions, in #45,
"drupal/core": "-p2"
is correct for the Recommended project, but I think it should be"drupal/core": "-p1"
in the legacy project (if we later expand the scope of these projects to add more 'nice' features.)Comment #85
mbayntonI guess it's true that since they're only templates and site builders immediately take ownership of them, it's not really a b/c break to change the contents or philosophy of a template and keep calling it the same thing.
Comment #86
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedSpeaking of naming things, #37 says the consensus from a Composer Initiatives meeting was to make the relocated docroot location "docroot", but this patch still places it in "web", like drupal-composer/drupal-project does. I don't see a firm consensus on this name in the 10 July meeting minutes, and the variable that sets the name of this location is
[web-root]
, so it is my opinion that "web" is fine.Comment #87
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commented#80 failed because #3080205: Implicitly allow drupal/core and legacy scaffold projects to scaffold files. did not get written out by the subtree splitter. Re-running #80 after that happens should make it go back to green. No additional work needed here, but blocked by that.
Comment #88
mbayntonlink to "the existing subtree splitter" in IS
Comment #89
Mixologic#80 is back to green after fixing the splitter.
There's really not a whole lot left to do here.
Huzzah!
Comment #90
Ghost of Drupal PastWith a very heavy heart and apologies but I need to reset this from RTBC.
"php": ">=5.6",
this is incorrect, Drupal now requires 7.0.8. See my reaction at https://twitter.com/chx/status/1109966918813794304 -- speaking of which, won't core/composer.json enforce the php version anyways? Of course, my composer-fu is not that strong, so I have no idea really.I also believe -- but less sure -- the descriptions could be improved. RecommendedProject/composer.json has "Project template for Drupal 8 projects with composer following drupal/drupal layout" and LegacyProject/composer.json has "Project template for Drupal 8 projects with composer following drupal/drupal layout" which really looks like the exact same.
Comment #91
MixologicGood catch.
Yes. RecommendedProject appears to have copy/pasted that from Legacy, but we didnt re-word its short description.
Anyhow, attached is a patch that fixes a few more things.
1. fixes #90.1 by removing it entirely. We already specify php version requirements in drupal/core.
2. fixes #90.2 by changing description to:
3. Changes the url in the README.txt to https://git.drupalcode.org -> there is no more cgit.
4. Changes the folders in .gitignore to have trailing slashes as per https://github.com/drupal-composer/drupal-project/pull/210
Comment #92
MixologicDoing a little bit deeper review, I've got some concerns about these .gitignore files.
Im really unsure as to the breadth of them, and at first glance, I cannot see what *isn't* ignored. Seems like the only thing that would end up in a git repo with these are your composer.json and composer.lock.
That seems *very* opinionated, and I don't think we want to provide that. (also, theres a phpstorm specific thing in there, and while its common, its not a universal thing afaik.)
Looking at where it came from, This doesn't tell us much:
https://github.com/drupal-composer/drupal-project/commit/fd47d6a033b81fa...
So, my suggestion is that we just use the example.gitignore that comes with drupal core now. I don't think this is the right issue to make those sort of changes.
Comment #93
MixologicAnd, also, did some manual testing by doing the following:
1. apply the patch
2. go into the composer/Template/RecommendedProject folder and do
git init; git checkout -b 8.8.x;git add .;git commit -m "initialize"
3. add a file to that folder called
packages.json
with the following contents:4. Go to some other folder and
composer create-project drupal/recommended-project:8.8.x-dev test-project-name -vv --repository-url=/Path/To/drupal_8/composer/Template/RecommendedProject/packages.json
replacing Path/To/drupal_8 with wherever you have the patched repo.This will create your project as if it were already on packagist.org.
My manual tests revealed two things:
1. because we left the wikimedia/composer-merge-plugin in core's composer.json and lock file for BC compatibility, it pulls it in, and uses default config and thus does unnecessary work. I think we should just exclude it from core-recommended manually in our package generator.
2. Once I had a project, I tried doing a `composer require drupal/ctools`, and I was surprised that it re-scaffolded all the files.. I dont think we want that?
Then I tried running `php drupal quick-start demo_umami` from the scripts dir, and, well, I ran out of memory with 128mb configured.
I upped it to 256, tried again, and the umami site launched right away.
I doubt we did anything to cause drupal to need more memory, unless *just* installing ctools is enough to make it need more than 128mb. There could also be something else weird with my local config.
Comment #94
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commented@chx: It was very helpful for you to find and report these errors; it saves a lot of time when we fix errors before the core committer review, so thanks so much.
1) I agree with the fixes in #91.
2) It would not be correct to reduce .gitignore down to just example.gitignore as suggested in #92.
It is critical in a Composer-managaged project to .gitignore everything that is placed by Composer. /modules/contrib must be ignored, because that is where the Composer-managed contrib modules are placed. /modules/custom et. al. are not .gitignored, and are available if you want to commit a module or two that is custom to just this one site.
Perhaps we could enhance the documentation to explain how to manage .gitignore in a Composer-managed project?
We could remove Simpletest; that is gone / going away. We could remove the PHPStorm .idea directory. I think everything else needs to stay.
3) #93
Fixing the over-scaffolding should be a separate issue. Composer manages which files are installed so that it can avoid over-installing. Our scaffold tool started off simple, and therefore scaffolds every time. We could check mod dates or use other means to determine whether the scaffold files need to be refreshed. This might be a little complicated in terms of files that are appended, so we'd want to add this enhancement with caution. One thing that we could do is ensure that the scaffolding operation only runs once per Composer operation. Currently it is possible for it to run multiple times.
I don't think that we have done anything to increase the required memory for Drupal, but I did not try to reproduce or measure yet.
wikimedia/composer-merge-plugin is part of drupal/drupal, so I wouldn't expect to see it at all when using these templates, which should only include things from drupal/core et. al. And yet:
https://github.com/drupal/core-recommended/blob/8.8.x/composer.json#L54
So the thing is that core-recommended includes everything from the drupal/drupal composer.lock; this is always how the package generator has worked, but the intention really is that it should only include things from drupal/core. I think this would be hard to do in the general case, but we could certainly exclude wikimedia/composer-merge-plugin via special checking. It is the only thing in the root composer.json require section save for composer/installers and drupal/core at the moment.
Comment #95
AaronMcHaleRe #61
Agree with that, I think in the context of a Composer project people will likely understand what "traditional" means.
For me (and probably many others) I really appreciate the ability to just drop a patch into the composer.json, and I think to not have that available by default seems a little disappointing, especially since for every dev site I set up I'd then have to require the composer-patches package and make sure it's configured to work properly. Not including it by default could potential result in more support/feature queries because people using Drupal with Composer have come to expect the ability to easily apply patches, e.g. "I added patches to my composer.json but it's not find them" and "I included the dependency but patches aren't applying correctly and are failing with error messages", etc.
Perhaps we could have a no-dev/minimal/strict template which doesn't include this dependency and configuration, we already have a standard and minimal installation profile (although based on other comments it looks like that might already be the approach?)
Re #94
Does that cause problems though for setups where a mono-repo is used? For example in dev or test environments where the entire site (including contrib modules and Composer packages) is committed to one mono-repo then pulled down on the live site, this practice is used to ensure stability and consistency between dev, test and live.
Comment #96
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commented#95: Yes, "must" was too strong of a word. Some workflows commit everything. I still think that ignoring composer artifacts by default is the best policy, as your diffs are minimal in PRs in that instance. We are discussing options in #composer (Drupal slack), e.g perhaps we could have two example gitignore files, and let the user choose which one to rename to .gitignore.
We are going to stick with minimal-feature templates for the initial commit, and can discuss adding features in follow-on issues.
Comment #97
mbayntonRe: #95
Yes. But you're not even .gitignore-ing /vendor if you're in that boat. I'd accept as sufficiently established best practice in the php ecosystem not committing
/vendor/*
to git. The paths not literally being "vendor
" here is just a product of `composer/installers` being nice enough to lay out composer-sourced things in a Drupal-specific way, but to my mind the principle is the same. I'm personally comfortable with having the "official"/"recommended" default adhering to this best practice.Although re: #94:
We should think about for tarball-shipping purposes first removing this .gitignore that assumes Composer management. Or maybe renaming to example.composer.gitignore or something.
Comment #98
MixologicI think the 'dont commit vendor' mantra isn't actually true in a lot of cases. Because the much much more important mantra of "dont run composer in production" takes precedence, and thus, somehow, you need to get a packaged vendor directory to production.
Some people have a CI build step that creates a deployable artifact, like a tarball or zipfile of the site to be deployed.
Many others, drupal.org included, have a 'site repository' that contains the entire site in git that is used for deployment purposes similar to what is described in #95
So, in those situations, absolutely, commit vendor. Its the right thing to do. This is why Im hesitant to actually agree that this is a universal best practice. What we're effectively saying is "we dont expect you to commit vendor or composer created parts of your site. We assume you're deployment strategy involves building a deployment artifact" - I don't think we can make that assumption. Nor can we assume they even *have* a deployment strategy. They might just have a simple host where they go ahead and do run composer in production, because it's totally fine if their local rockhounding club's website is down or breaks. But they keep it all in git just so they can rollback /keep track of what they did to their site.
I *do* think we can provide all of those features in the .gitignore file either commented out, or provided as an example.gitignore with explanation as to why you would want them, and I think its valueable.. I just dont think it should be the "default, you must turn it off if you dont want this" - or if it should be, I don't think we need to decide that here.
Regarding additional improved features like 'being able to patch out of the box' - that requires core to decide whether or not cweagans/composer-patches is a dependency that is something that should be part of the default experience for everybody.
Again, that might be exactly what we want, but we just don't know whether or not thats true, and we don't need to yet. We can get these templates in now without it, and discuss in a followup.
However, this is where we could also leverage other features of composer - we could put a
suggests
in for cweagans/composer-patches that tells users 'if you need to patch your site, try cweagans/composer-patches' - same for drush and console.Comment #99
grasmash CreditAttribution: grasmash commented+1 to everything @mixologic said.
Comment #100
mbayntonOkay, sounds like there's established but opposing schools of thought here. Maybe in that case making core things start manifesting a preference for one or the other isn't the best.
Maybe we don't have to. Limited to the context of this morning's .gitignore discussions, all that's at issue is what the `composer create-project` user initially should have in their new, owned-by-them tree, right? We could avoid becoming opinionated on that in a few ways, like 1) giving up and not having a file called .gitignore, perhaps offering a few 'example.thisorthat.gitignore' files in the project root, or 2) asking the user which school of thought they prefer through the the `core-composer-scaffold` plugin, and giving them the appropriate pre-prepared .gitignore.
1) is simple but litters dud (ineffectual, crufty) files about in what ought to be a clean starting state for a project
2) looks pretty easy to accomplish; there's an event unique to `create-project` dispatched by composer that we can just listen for. Super rough POC here. We'd want to use Composer's I/O, setup options so it could be specified non-interactively, move things out of handler directly, probably use
Drupal\Composer\Plugin\Scaffold\ManageGitIgnore
somehow etc if people like this idea. The lack of interaction presently makes me wonder if there's already been a deliberate decision not to do interaction as part of our `create-project`, so I just threw super quick thing together.Comment #101
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedPrompting, if done, should be a follow-on issue.
I had a strong opinion about an hour ago that the legacy / traditional project should have a minimal .gitignore, and the recommended project should ignore everything placed by Composer. At this point, though, especially after #98, I think that we should commit here with no .gitignore, or perhaps with a couple of .gitignore examples, and leave the decision as to whether to do anything different as follow-on work.
I updated the Issue Summary with the things that still need to be done here, including follow-on issues that need to be created.
Comment #102
Ghost of Drupal PastThe level of collaboration and understanding of each other in this issue is just breathtaking. Thanks everyone.
Comment #103
MixologicI like the idea behind #100.2, seems like a reasonable way to offer some setup choices. It makes me wonder if we could ask whether they want a relocated docroot also, but I have a feeling that theres a bunch of chicken and egg scenarios where that comes from the root composer.json extra etc.
Granted adding some interaction *does* add some complexity. As soon as this goes in somebody will want those questions in another language. Somebody ought to design a standard way that our command prompts interface with the user so that every command doesn't feel like its a different product (colors, formatting etc). Getting the wordsmithing correct so that people get what we're asking.
But as far as I know, we haven't really come up against too much "we should get user input to proceed" until now, so its not a deliberate decision *not* to have interaction. Most choices so far have been more of a 'offer up multiple products and the the user choose the right one' - i.e pinned-dev-dependencies vs just dev-dependencies.
But yeah, we could prompt as part of follow on as well.
Comment #104
mbaynton+1 on prompting as a follow-up. I also recognized the docroot bit was a candidate for solving with prompting and was essentially previously discussed in #18, so was unsure how opposed to it folks were. I think it's fine for the docroot part to be worthy of separate templates though, that's a lot more foundational to what you're going to get overall. Prompting may be better for little details.
I started working on dealing with gitignores in the interim by offering two examples files (I think removing things is easier for people than locating the correct thing to include) but ran out of time. This is incomplete because for drupal/recommended-project there's an example.gitignore in web/, (it's always been there, not a new thing with this patch), but I think having that still there plus two in the project root is too much cruft. We should relocate it to the project root and fix up its contents for the relocated docroot. If that turns out to be too ambitious, let's remove all gitignoring from the project templates and accept the web/example.gitignore's presence.
Comment #105
mbayntonComment #106
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedI like #104, but I think that we should move it to a followup issue so that there is time to discuss it adequately without blocking this issue from being committed.
Comment #107
mbayntonOkay so yank both the .gitignores?
No need to follow up on prompting and nuanced example files, is there?
Comment #108
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedI think we could have one issue to discuss what to do with .gitignore, including the possibility to prompt or not prompt, but yes, I think we should defer all decisions about what to do with .gitignore to a follow-up issue, and just leave it out here. This is consistent with the current strategy of drupal/drupal and the download archives to simply not have an active .gitignore to start.
Comment #109
apadernoComment #110
AaronMcHaleI agree with @Mixologic in #98
When you have a multi-environment setup with a mission critical web application you run composer commands in dev/test/staging, never in production, because you need to be absolutely sure that when it works in test/staging it'll work in production and that there's no risk of a nasty surprise.
Nice idea, but do we also want to find a way to ensure it's configured correctly, for example:
Including these configuration by default or adding it programtically reduces the risk of people running into issues that result in support tickets for us. (Also makes my life as a developer that little bit easier)
Re #100
That sounds like an interesting idea and worth exploring.
That being said, I'm currently wondering why we even need to provide a .gitignore in the first place, is it just to be helpful and support these different scenarios already described, or is there a more technical reason?
Re #101
I think that partly hints at an answer to my question above, so if there's no technical reason to include a .gitignore, let's just discuss more in a follow-up.
Re #102
😃
Re #103
Another follow-up perhaps?
Re #104
👍
That's also the philosophy that Drupal Console seems to use when generating things, for example to generate an Entity Type there is two distinctly different commands, one for generating a Config Entity Type and the other for generating a Content Entity Type, the questions you get asked are mostly similar but are all relating to small details about the configuration of the Entity Type and what features it supports.
I like these descriptions, concise yet clear, +1
Re #106
+1 This issue is already very long, a follow-up would allow us to workshop a bit more as well.
Re #108
+1
Comment #111
mbayntonSo all needs doing not in follow-on issues is destroying two files. I am good at destroying things. :)
This is against #91, not my last patch.
Comment #112
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedCool, looks good. Let's make sure all the follow-on issues are created before setting RTBC. Haven't had much time this weekend, but I'll work on typing some up if that changes.
Comment #113
mbayntonX off .gitignore and .gitignore follow-up issue tasks. That issue is #3082958: Add gitignore(s) to Composer-ready project templates
Comment #114
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedUpdate issue summary with links to three of the follow-on issues. Memory limit investigation remains.
Comment #115
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedAdd cross-reference to final (for now) follow-on issue in summary.
All follow-on issues have been made, and all reviewer comments have been addressed, so back to RTBC.
Comment #116
AaronMcHaleSince we're talking about follow-ups, I'll just highlight part of my comment #110 which is quoting @Mixologic in #103,
I'm just highlighting this, since that concern was raised by @Mixologic I'm assuming it would be up to him if he feels that should be addressed in a follow-up.
Comment #117
j. ayen green CreditAttribution: j. ayen green commentedPerhaps a well-documented .gitignore with many popular settings (like .idea) all commented out, like many config defaults?
Comment #118
AaronMcHale@j. ayen green: we're continuing the .gitignore discussing on the issue #3082958: Add gitignore(s) to Composer-ready project templates, please do share your thoughts over there as well.
Comment #119
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedUpdate issue summary with result of memory investigation.
Comment #120
Mixologic+1 on RTBC.
I believe #116 isnt exactly a followup, more of a comment that "Interaction isnt 'simple' -> its UX, and thus should have some sort of design work" - so I believe we can cover that in the context of #118.
Comment #122
larowlanissue credits
Comment #124
larowlanCommitted ef3544a and pushed to 8.8.x. Thanks!
I concur
🎉
Composer intiative team: Now would be a good time to start thinking about a summary of all of the achievements in the 8.8 cycle that would go in the release notes, as I think just adding all the release note snippets together won't do it justice. Something that really fanfares all the big goals you've ticked off.
Congrats.
Comment #125
xjmNot the release notes, but rather the frontpage post. (Release notes are just for disruptions). Tagging accordingly!
Comment #126
Mile23You say that as if the initiative is finished. :-)
Next: #3047468: Create a tool to convert a non-Composer-based Drupal to a Composer-based one
Comment #127
jungleShould we add a guideline or documentation officially for how to switching from the 3rd party template drupal-composer/drupal-project to this one? I think there are a lot of drupal-composer/drupal-project users.
Comment #128
benjifisherFix a typo in the release-notes snippet.
Comment #129
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commented@jungle: We can keep track of documentation needs in #3082601: Update Composer documentation to match Drupal 8.8.0+ capabilities
Comment #130
Chi CreditAttribution: Chi commentedRe #127. Composer templates work as starter kits. The are only used for creating new projects. Once you've run
composer create-project
command the only way to switch to other template is removing everything and starting from scratch. So that existing sites created withdrupal-composer/drupal-project
don't have to update anything.Comment #131
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commented@chi: That is not quite true in this instance. Drupal 8.8.x introduces a new scaffold component. The new scaffold code has some new features that are useful for site builders, but beyond that, will also greatly reduce the load on drupal.org when a new Drupal version comes out. We therefore want to encourage users of the existing scaffold component to start using the new scaffold component. In addition, the files that drupal-composer/drupal-scaffold is downloading will be removed in Drupal 9, so we expect everyone to migrate before then.
Migrating should be a simple matter of renaming some components. There's a start (a composer.json for new projects) at https://github.com/drupal-composer/drupal-project/pull/522
Comment #133
joachim CreditAttribution: joachim as a volunteer commentedNeeds a follow-up to update documentation!
Comment #134
Mile23It's the related issue: #3082601: Update Composer documentation to match Drupal 8.8.0+ capabilities
Comment #135
NaheemSays CreditAttribution: NaheemSays commentedWhat are the chances of #3086489: Exclude development libraries from templates' composer.json by default being committed before the release of Drupal 8.8? IMO it will fix a lot of issues for less experienced users and will also simplify documentation with having the same steps for all composer supported versions of drupal instead of different instructions before and after it lands.
Comment #136
Mile23It might help to mention that on the other issue rather than this closed one.
Comment #137
GuillaumeDuveauI can see why Drupal wants to maintain https://github.com/drupal/recommended-project and https://github.com/drupal/legacy-project.
What I can't understand is why they are officially recommended by Drupal. They don't even have a README.
https://github.com/drupal-composer/drupal-project is light years ahead and should be officially recommended in my opinion.
Comment #138
Chi CreditAttribution: Chi commentedThey do
https://git.drupalcode.org/project/drupal/-/blob/8.8.x/composer/Template...