This repository has been archived by the owner on Mar 7, 2023. It is now read-only.
forked from wikimedia/composer-merge-plugin
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor first install of merged requirements
Adds tracking of merged requirements to `ExtraPackage` and `MergePlugin` to control if `MergePlugin::onPostInstallOrUpdate()` needs to trigger a `composer update` to install or update new requirements. The merged requirements are now assigned to `Installer::setUpdateAllowList()` to restrict the update operation to those new requirements. This prevents all other packages (such as root requirements) from being updated. This solution provides consistent support of both the first-install feature and subsequent changes to merge-patterns between Composer 1 and 2. Added: - Property `ExtraPackage::$mergedRequirements` (and getter method) to track new requirements during merging process of `ExtraPackage::mergeOrDefer()`. - Property `MergePlugin::$updateAllowList` (and getter method) to track all new requirements during merging process of `MergePlugin::mergeFile()`. - Conditional statement in `MergePlugin::onPostInstallOrUpdate()` to skip first-install if there are no extra requirements. Changed: - Replaced `PluginState::forceUpdate()` conditional statement in `MergePlugin::onPostInstallOrUpdate()` with `Installer::setUpdateAllowList()` FIxed: - Property tags for `$loaded` and `$loadedNoDev` in `MergePlugin`
- Loading branch information
Showing
2 changed files
with
54 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters