Problem/Motivation
We can observe in drupal-composer/drupal-project that the files .gitattributes and .editorconfig are relocated to the project root:
"drupal-scaffold": {
"initial": {
".editorconfig": "../.editorconfig",
".gitattributes": "../.gitattributes"
}
}
This relocation makes sense, as these files work best when placed at the project root.
Proposed resolution
Define a new location in drupal/core-composer-scaffold, [project-root]
. Update the scaffold assets to place these two files at the project root rather than the web root.
Remaining tasks
Write up a change record.
User interface changes
None.
API changes
None.
Data model changes
None.
Release notes snippet
When building a Composer-managed Drupal site with drupal/recommended-project, the files .gitattributes and .editorconfig are now placed at the project root instead of the Drupal root.
Comment | File | Size | Author |
---|---|---|---|
#13 | interdiff-10-13.txt | 653 bytes | hussainweb |
#13 | 3084326-13.patch | 3.92 KB | hussainweb |
#5 | 3084326-5.patch | 6.53 KB | greg.1.anderson |
#5 | 3084326-2-to-5-interdiff.txt | 5.03 KB | greg.1.anderson |
#2 | 3084326.patch | 1.5 KB | greg.1.anderson |
Comments
Comment #2
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedHere's the patch.
Comment #3
MixologicAlso the right thing to do - drupal/drupal ships with these in the project root as well, so makes sense to put them there.
Comment #5
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedFix test failure.
Comment #6
Mixologicah. I guess I forgot we had test coverage for those. Sorry for the hasty RTBC.
Comment #7
alexpottUnder remaining tasks it says
Does this need a new CR or can an existing one be extended?
Comment #8
MixologicSince we've had templates in core for less than a week, I don't believe this is a significant enough change to warrant a new CR, I went ahead and added
to the existing CR: https://www.drupal.org/node/3082474
Comment #9
larowlanis it worth defaulting $expectedDestination to [web-root] as this is where the bulk of the items live and are likely to in the future - might save us a few cycles down the track
Comment #10
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedGood idea. I almost did that the first time around.
Comment #11
hussainweb> is it worth defaulting $expectedDestination to [web-root] as this is where the bulk of the items live and are likely to in the future
I am not very sure about this. Since this is a test method and not an API, I think it's worth being explicit rather than making it the default. I am not very strongly opinionated about this though.
Meanwhile, I am adding the param docblock for the new parameter in that method.
Comment #12
hussainwebOops... didn't mean to save again
Comment #13
hussainwebAdding the docblock on top of patch in #10 again.
Comment #14
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedReview comments addressed, and tests back to green. Thanks, @hussainweb
Comment #15
larowlanCommitted c7a1b02 and pushed to 8.8.x. Thanks!
Thanks folks