Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.
Problem/Motivation
We also might want to consider at some supporting any package if drupal/core-composer-scaffold provided a UI(PROBABLY MEANT API) like getAllScaffoldfiles() that would return all files across all packages that are allowed. Without this I don't think we can support it.
Link to the comment => https://www.drupal.org/project/automatic_updates/issues/3338346#comment-...
Comments
Comment #2
omkar.podey CreditAttribution: omkar.podey at Acquia commentedComment #3
omkar.podey CreditAttribution: omkar.podey at Acquia commentedCreated a core issue #3350176: Create something like getAllScaffoldfiles() in core-composer-scaffold. and blocking this one on that.
Comment #4
omkar.podey CreditAttribution: omkar.podey at Acquia commentedComment #5
tedbowComment #6
tedbowNeeds a summary update to bring in more context. You should have to read the other issue to understand the basics of this issue
Comment #7
chrisfromredfinI believe this is related, or even a duplicate of #3340355: [PP-1] Add support for scaffold files that aren't defined by Drupal core or the root composer.json, which DOES have a good issue summary.
The issue here is that in #3338346: Do not allow drupal/core-composer-scaffold to be used by packages other than core we restricted use of plugins that are allowed to scaffold files to only the implicit ones.
Now that we're maturing, I was looking at things like "what would it take to get this running on, say, Pantheon hosting?" For one, Pantheon has pantheon-systems/drupal-integrations, which simply scaffolds three files in the sites/default folder.
So while knowing those files (via #3350176: Create something like getAllScaffoldfiles() in core-composer-scaffold.) would be nice, I wonder if there's also an option here to simply say, as a site owner "I know the scaffolding afforded by this plugin is safe, let's allow it to do what it does."
I imagine we could do this in a similar way as the composer plugins validator does, by adding some additional configuration that can be set:
https://git.drupalcode.org/project/automatic_updates/-/blame/3.0.x/packa...
Comment #8
tobybellwood CreditAttribution: tobybellwood at amazee.io commentedThis would be ace - amazee.io & Lagoon hosters use https://github.com/amazeeio/drupal-integrations (or a variant) to lever in settings.php/Drush files.
Being able to document the plugin as "automatic updates safe" either upstream or in-project would make it easier. Until then, we run it once on composer install, and then `composer config extra.drupal-scaffold --unset` to stop it interfering with automatic updates.
The alternative would be a modification to composer-scaffold to disable it from autorunning selectively - meaning only `composer drupal:scaffold` will actually change the files on disk