When installed, this plugin will look for a "merge-plugin" key in the
composer configuration's "extra" section. The value of this setting can be
either a single value or an array of values. Each value is treated as
a glob() pattern identifying additional composer.json style configuration
files to merge into the configuration for the current compser execution.
The "require", "require-dev", "repositories", "extra" and "suggest" sections
of the found configuration files will be merged into the root package
configuration as though they were directly included in the top-level
composer.json file.
If included files specify conflicting package versions for "require" or
"require-dev", the normal Composer dependency solver process will be used
to attempt to resolve the conflict. Specifying the 'replace' key as true will
change this default behaviour so that the last-defined version of a package
will win, allowing for force-overrides of package defines.
By default the "extra" section is not merged. This can be enabled with the
'merge-extra' key by setting it to true. In normal mode, when the same key
is found in both the original and the imported extra section, the version
in the original config is used and the imported version is skipped. If
'replace' mode is active, this behaviour changes so the imported version of
the key is used, replacing the version in the original config.
onPostInstallOrUpdate()
публичный Метод
Handle an event callback following an install or update command. If our
plugin was installed during the run then trigger an update command to
process any merge-patterns in the current config.
onPostPackageInstall()
публичный Метод
Handle an event callback following installation of a new package by
checking to see if the package that was installed was our plugin.
public onPostPackageInstall ( Composer\Installer\PackageEvent $event ) |
$event |
Composer\Installer\PackageEvent |
|