Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 300717

Prompt users when adding new requirements with scaffolded assets

$
0
0

Problem/Motivation

By default, the drupal/scaffold plugin will not scaffold files from a dependency unless it is whitelisted in the top-level composer.json file. This is done to avoid unexpected behavior or other problems with dependencies' behavior.

When a new dependency is added to a project (via composer require), and it contains assets that must be scaffolded, then a warning message is printed informing the user what must be done:

Package 'drupal/example-profile' has scaffold files. In order to function correctly, this project must be listed in the element 'extra.composer-scaffold.allowed-packages' in the root-level composer.json file.

The user must manually whitelist the dependency in order for it to be scaffolded.

Proposed resolution

The drupal/scaffold plugin could prompt the user and automatically add the dependency to the allowed packages.

Remaining tasks

1. At the moment, there are no projects that contain scaffold files. No action is needed here until some project (other than drupal/core) has files that need scaffolding.
2. Add patch to this issue implementing the prompt and automatic composer.json editing.


Viewing all articles
Browse latest Browse all 300717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>