Fix composer installers from overwriting author intent #407
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Titania is brute-force overwriting the composer/installers settings of every submitted extension. This should not be happening, unless the parameter is not already present in the submitted extension.
So if a user submits an extension with
"composer/installers": "~2.0"
Titania is overwriting that and knocking it back down to"composer/installers": "~1.0.0"
. This is not good, and is also gonna guarantee no extensions will ever be installable via the phpBB4 extension catalog. 😂This change will only add
composer/installers
if not already present in the extension. Also, if the extension submitted is phpBB4 compatible, then it will use^1.0 || ^2.0
composer installers to ensure it shows up and is installable in the extension catalog (this is based on examining the ext's composer.json phpbb version constraints and the phpBB branch it was submitted to).