You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/class_descriptions.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -131,6 +131,8 @@ This class manages the plugin's self-installation inside the `var` directory to
131
131
-**`packageEvent()`**
132
132
- When Composer installs or updates a required package, this method checks whether it was the plugin package that changed and calls `updateSetupWizardPlugin()` with the new version if so
133
133
- Triggered by the events defined in [PluginDefinition::getSubscribedEvents()](#plugindefinition)
134
+
-**`processEvent()`**
135
+
- Helper method used by `packageEvent()` to run `updateSetupWizardPlugin()` when an appropriate [PackageEvent](https://getcomposer.org/apidoc/master/Composer/Installer/PackageEvent.html) is fired
134
136
-**`doVarInstall()`**
135
137
- Checks the `composer.lock` file the plugin and calls `updateSetupWizardPlugin()` with the version found there
136
138
- Called by `composer magento-update-plugin install` and the Magento module setup classes ([InstallData](#installdatarecurringdataupgradedata), [RecurringData](#installdatarecurringdataupgradedata), [UpgradeData](#installdatarecurringdataupgradedata))
@@ -208,6 +210,12 @@ This class contains methods to retrieve Composer [Package](https://getcomposer.o
208
210
- Returns the existing root project package, including all user customizations
209
211
-**`fetchMageRootFromRepo()`**
210
212
- Given a Magento edition and version constraint, fetch the best-fit Magento root project package from the Composer repository or GitHub (in the case of cloud)
213
+
-**`findBestCandidate()`**
214
+
- Wrapper function around different versions of [VersionSelector::findBestCandidate()](https://getcomposer.org/apidoc/master/Composer/Package/Version/VersionSelector.html)
215
+
-**`findBestCandidateComposer1()`**
216
+
- Helper function to run [VersionSelector::findBestCandidate()](https://getcomposer.org/apidoc/master/Composer/Package/Version/VersionSelector.html) on Composer version 1.x.x
217
+
-**`findBestCandidateComposer2()`**
218
+
- Helper function to run [VersionSelector::findBestCandidate()](https://getcomposer.org/apidoc/master/Composer/Package/Version/VersionSelector.html) on Composer version 2.x.x
211
219
-**`parseVersionAndEditionFromLock()`**
212
220
- Inspect the `composer.lock` file for the currently-installed Magento product or cloud metapackage and parse out the edition and version for use by `getOriginalRootPackage()`
Copy file name to clipboardExpand all lines: src/Magento/ComposerRootUpdatePlugin/README.md
+13-11Lines changed: 13 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,24 +4,24 @@
4
4
5
5
The `magento/composer-root-update-plugin` Composer plugin resolves changes that need to be made to the root project `composer.json` file before updating to a new Magento product requirement.
6
6
7
-
This is accomplished by comparing the root `composer.json` file for the Magento project corresponding to the Magento version and edition in the current installation with the Magento project `composer.json` file for the target Magento product package when the `composer require` command runs and applying any deltas found between the two files if they do not conflict with the existing `composer.json` file in the Magento root directory.
7
+
This is accomplished by comparing the root `composer.json` file for the Magento project corresponding to the Magento version and edition in the current installation with the Magento project `composer.json` file for the target Magento product or cloud metapackage when the `composer require` command runs and applying any deltas found between the two files if they do not conflict with the existing `composer.json` file in the Magento root directory.
8
8
9
9
# Getting Started
10
10
11
11
## System requirements
12
12
13
-
The `magento/composer-root-update-plugin` package requires Composer version 1.8.0 or earlier. Compatibility with newer Composer versions will be tested and added in future plugin versions.
13
+
The `magento/composer-root-update-plugin` package requires Composer version 1.10.19 or earlier, or version 2.0.0 - 2.0.8. Compatibility with newer Composer versions will be tested and added in future plugin versions.
14
14
15
15
## Installation
16
16
17
17
To install the plugin, run the following commands in the Magento root directory.
The plugin adds functionality to the `composer require` command when a new Magento product package is required, and in most cases will not need additional options or commands run to function.
24
+
The plugin adds functionality to the `composer require` command when a new Magento product or cloud metapackage is required, and in most cases will not need additional options or commands run to function.
25
25
26
26
If the `composer require` command for the target Magento package fails, one of the following may be necessary.
27
27
@@ -33,9 +33,11 @@ In this case, run the following command with the appropriate values to correct t
These options are not valid for Magento Cloud installations.
37
+
36
38
## Conflicting custom values
37
39
38
-
If the `composer.json` file has custom changes that do not match the values the plugin expects according to the installed Magento product, the entries may need to be corrected to values compatible with the target Magento package.
40
+
If the `composer.json` file has custom changes that do not match the values the plugin expects according to the installed Magento metapackage, the entries may need to be corrected to values compatible with the target Magento version.
39
41
40
42
To resolve these conflicts interactively, re-run the `composer require` command with the `--interactive-magento-conflicts` option.
41
43
@@ -128,23 +130,23 @@ For reference, these are the `"require"` and `"require-dev"` sections for defaul
128
130
129
131
### With `magento/composer-root-update-plugin`:
130
132
131
-
In the project directory for a Magento Open Source 2.2.8 installation, a user runs `composer require magento/composer-root-update-plugin ~0.1 --no-update` and `composer update` before the Magento Open Source 2.3.1 upgrade commands.
133
+
In the project directory for a Magento Open Source 2.2.8 installation, a user runs `composer require magento/composer-root-update-plugin ~1.1 --no-update` and `composer update` before the Magento Open Source 2.3.1 upgrade commands.
0 commit comments