[PP-1] Add support for scaffold files that aren't defined by Drupal core or the root composer.json

Created on 8 February 2023, almost 2 years ago
Updated 5 August 2024, 4 months ago

Problem/Motivation

I'm opening this as a follow-up to πŸ“Œ Dynamically copy scaffold file mapping when create fake_site fixture Fixed .

To keep scope and complexity manageable for a core-focused MVP, we intend to initially limit our support for the drupal/core-composer-scaffold plugin.

What it comes down to is this: Automatic Updates needs to know which files will be touched by the scaffold plugin. It doesn't really need to know how they'll be interacted with; just which files will be interacted with.

That's actually fairly easy to figure out. Anything listed in drupal/core's extra.drupal-scaffold.file-mapping will be touched, along with the file mappings in any packages listed in the root composer.json's extra.drupal-scaffold.allowed-packages list, plus anything in the root composer.json's extra.drupal-scaffold.file-mapping section.

But to keep things a little simpler, in πŸ“Œ Dynamically copy scaffold file mapping when create fake_site fixture Fixed , we're starting by only considering the file mappings from drupal/core and the root package.

Once that's done, though, we may want to support the file mappings defined by the packages listed in allowed-packages. Before we do that, we may wish to confirm with the maintainers of the scaffold plugin that file mappings are, truly, the only way to modify the scaffold plugin's behavior. If custom scaffolding logic can be injected in some way, this becomes a lot more complex and potentially impossible. (The good news is that my reading of the plugin suggests that it's not possible to inject custom logic into the scaffold plugin.)

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Postponed

Version

3.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024