- Issue created by @RoSk0
- 🇳🇿New Zealand RoSk0 Wellington
When I tried to replicate this issue on a pure core 10.3 , unfortunately I don't have access to PHP 8.3 to testing on Drupal 11, the behaviour was different - requiring
main-settings
library scaffoldssettings.php
as expected, however requiringcustom-settings
library scaffolds thesettings-custom.php
and completely ignores the mainsettings.php
- there is even no mention of it in the output related to thecustom-settings
library ... Feels like that file is completely ignored.However if I remove
main-settings
library and leavesettings.php
in place -custom-settings
library appends to it as expected:Scaffolding files for library/custom-settings: - NOTICE Modifying existing file at [web-root]/sites/default/settings.php. Examine the contents and ensure that it came out correctly. - Append to [web-root]/sites/default/settings.php from assets/settings-php-include.txt
- Status changed to Closed: works as designed
8 months ago 3:08am 2 May 2024 - 🇳🇿New Zealand RoSk0 Wellington
I've already was burnt by the order once and somehow managed to forgot about it - order of the packages in the `allowed-packages` list is very important!
My libraries was ordered incorrectly in the top level
composer.json
:"drupal-scaffold": { "allowed-packages": [ "library/custom-settings", "library/main-settings" ], }
and it should be
"drupal-scaffold": { "allowed-packages": [ "library/main-settings", "library/custom-settings" ], }
.
All of this is properly documented in the README.md "Allowed packages" section.