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
-**`extractStabilityFlags()`** -- see [RootPackageLoader::extractStabilityFlags()](https://github.com/composer/composer/blob/master/src/Composer/Package/Loader/RootPackageLoader.php)
33
33
- Takes a package name, version, and minimum-stability setting and returns the stability level that should be used to find the package on a repository
34
34
-**Reason for cloning:** The original method is private
-**`parseComposerJsonFile()`** -- see [RequireCommand::execute()](https://github.com/composer/composer/blob/master/src/Composer/Command/RequireCommand.php)
40
+
-**`parseComposerJsonFile()`** -- see [RequireCommand::execute()](https://getcomposer.org/apidoc/master/Composer/Command/RequireCommand.html#method_execute)
41
41
- Checks the accessibility of the `composer.json` file and parses out relevant base information that is needed before starting the plugin's processing
42
42
-**Reason for cloning:** The native code exists directly in `RequireCommand::execute()` instead of its own function, but the base information it parses is required by the plugin before it runs as part of the original `RequireCommand` code
43
-
-**`getRequirementsInteractive()`** -- see [InitCommand::determineRequirements()](https://github.com/composer/composer/blob/master/src/Composer/Command/InitCommand.php)
43
+
-**`getRequirementsInteractive()`** -- see [InitCommand::determineRequirements()](https://getcomposer.org/apidoc/master/Composer/Command/InitCommand.html#method_determineRequirements)
44
44
- Interactively asks for the `composer require` arguments if they are not passed to the CLI command call
45
45
-**Reason for cloning:** The native command calls [InitCommand::findBestVersionAndNameForPackage()](https://github.com/composer/composer/blob/master/src/Composer/Command/InitCommand.php), which would try to validate the target Magento package's requirements before the plugin can process the relevant changes to make it compatible. The original `determineRequirements()` call is still made by `RequireCommand::execute()` after the plugin runs, so Composer's validation still happens as normal.
46
-
-**`revertMageComposerFile()`** -- see [RequireCommand::revertComposerFile()](https://github.com/composer/composer/blob/master/src/Composer/Command/RequireCommand.php)
46
+
-**`revertMageComposerFile()`** -- see [RequireCommand::revertComposerFile()](https://getcomposer.org/apidoc/master/Composer/Command/RequireCommand.html#method_revertComposerFile)
47
47
- Reverts the `composer.json` file to its original state from before the plugin's changes if the command fails
48
48
-**Reason for cloning:** The plugin makes changes before `RequireCommand` creates a backup, which means when it runs `revertComposerFile()`, the reverted file from the backup does not match the original state, so this function is needed to also revert the plugin's changes
49
49
@@ -55,9 +55,9 @@ Classes in this namespace tie into the Composer library's code that handles plug
This class is the entry point into the plugin's functionality from the `composer require` CLI command.
58
+
This class is the entrypoint into the plugin's functionality from the `composer require` CLI command.
59
59
60
-
Extends the native [RequireCommand](https://github.com/composer/composer/blob/master/src/Composer/Command/RequireCommand.php) functionality to add additional processing when run with a Magento product as one of the command's parameters.
60
+
Extends the native [RequireCommand](https://getcomposer.org/apidoc/master/Composer/Command/RequireCommand.html) functionality to add additional processing when run with a Magento product as one of the command's parameters.
61
61
62
62
-**`configure()`**
63
63
- Add the options and description for the plugin functionality to those already configured in `RequireCommand` and sets the new command's name to a dummy unique value so it passes Composer's command registry check
@@ -93,7 +93,7 @@ This is a Composer boilerplate class to let the Composer plugin library know abo
93
93
This class is Composer's entry point into the plugin's functionality and the definition supplied to the plugin registry.
94
94
95
95
-**`activate()`**
96
-
- Method must exist in any implementation of [PluginInterface](https://github.com/composer/composer/blob/master/src/Composer/Plugin/PluginInterface.php)
96
+
- Method must exist in any implementation of [PluginInterface](https://getcomposer.org/apidoc/master/Composer/Plugin/PluginInterface.html)
97
97
-**`getCapabilities()`**
98
98
- Tells Composer that the plugin includes CLI commands and defines the [CommandProvider](#commandprovider) that supplies the command objects
99
99
-**`getSubscribedEvents()`**
@@ -169,7 +169,7 @@ This class runs [DeltaResolver::resolveRootDeltas()](#deltaresolver) if an updat
This class contains methods to retrieve Composer [Package](https://github.com/composer/composer/blob/master/src/Composer/Package/Package.php) objects for the target Magento root project package, the original (default) Magento root project package for the currently-installed Magento version, and the currently-installed root project package (including all user customizations).
172
+
This class contains methods to retrieve Composer [Package](https://getcomposer.org/apidoc/master/Composer/Package/Package.html) objects for the target Magento root project package, the original (default) Magento root project package for the currently-installed Magento version, and the currently-installed root project package (including all user customizations).
173
173
174
174
-**`getOriginalRootPackage()`**
175
175
- Fetches the original (default) Magento root project package from the Composer repository
@@ -182,7 +182,7 @@ This class contains methods to retrieve Composer [Package](https://github.com/co
182
182
-**`parseOriginalVersionAndEditionFromLock()`**
183
183
- Inspect the `composer.lock` file for the currently-installed Magento product package and parse out the edition and version for use by `getOriginalRootPackage()`
184
184
-**`getRootLocker()`**
185
-
- Helper function to get the [Locker](https://github.com/composer/composer/blob/master/src/Composer/Package/Locker.php) object for the `composer.lock` file in the project root directory. If the current working directory is `var` (which is the case for the Web Setup Wizard), instead use the `composer.lock` file in the parent directory
185
+
- Helper function to get the [Locker](https://getcomposer.org/apidoc/master/Composer/Package/Locker.html) object for the `composer.lock` file in the project root directory. If the current working directory is `var` (which is the case for the Web Setup Wizard), instead use the `composer.lock` file in the parent directory
186
186
187
187
***
188
188
@@ -195,7 +195,7 @@ This namespace contains utility classes shared across the rest of the plugin's c
195
195
Command-line logger with interaction methods.
196
196
197
197
-**`getIO()`**
198
-
- Returns the [IOInterface](https://github.com/composer/composer/blob/master/src/Composer/IO/IOInterface.php) instance
198
+
- Returns the [IOInterface](https://getcomposer.org/apidoc/master/Composer/IO/IOInterface.html) instance
199
199
-**`ask()`**
200
200
- Asks the user a yes or no question and return the result. If the console interface has been configured as non-interactive, it does not ask and returns the default value
201
201
-**`log()`**
@@ -212,6 +212,6 @@ Common package-related utility functions.
212
212
-**`getMagentoProductEdition()`**
213
213
- Extracts the edition (`community` or `enterprise`) from a Magento product package name
214
214
-**`findRequire()`**
215
-
- Searches the `"require"` section of a [Composer](https://github.com/composer/composer/blob/master/src/Composer/Composer.php) object for a package link that fits the supplied name or matcher
215
+
- Searches the `"require"` section of a [Composer](https://getcomposer.org/apidoc/master/Composer/Composer.html) object for a package link that fits the supplied name or matcher
216
216
-**`isConstraintStrict()`**
217
217
- Checks if a version constraint is strict or if it allows multiple versions (such as `~1.0` or `>= 1.5.3`)
Copy file name to clipboardExpand all lines: docs/process_flows.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,11 +19,11 @@ There are four paths through the plugin code that cover two main pieces of funct
19
19
20
20
1. Composer boilerplate and plugin setup
21
21
1. Composer sees the `"type": "composer-plugin"` value in the [composer.json](../src/Magento/ComposerRootUpdatePlugin/composer.json) file for the plugin package
22
-
2. Composer reads the `"extra"->"class"` field to find the class that implements [PluginInterface](https://github.com/composer/composer/blob/master/src/Composer/Plugin/PluginInterface.php) ([PluginDefinition](class_descriptions.md#plugindefinition))
23
-
3.`PluginDefinition` implements [Capable](https://github.com/composer/composer/blob/master/src/Composer/Plugin/Capable.php), telling Composer that it provides some capability ([CommandProvider](class_descriptions.md#commandprovider)), which is supplied through `PluginDefinition::getCapabilities()`
22
+
2. Composer reads the `"extra"->"class"` field to find the class that implements [PluginInterface](https://getcomposer.org/apidoc/master/Composer/Plugin/PluginInterface.html) ([PluginDefinition](class_descriptions.md#plugindefinition))
23
+
3.`PluginDefinition` implements [Capable](https://getcomposer.org/apidoc/master/Composer/Plugin/Capable.html), telling Composer that it provides some capability ([CommandProvider](class_descriptions.md#commandprovider)), which is supplied through `PluginDefinition::getCapabilities()`
24
24
4.`CommandProvider::getCommands()` supplies Composer with an instance of [MageRootRequireCommand](class_descriptions.md#commandsmagerootrequirecommand)
25
25
5. Composer calls `MageRootRequireCommand::configure()` to obtain the command's name, description, options, and help text
26
-
-`MageRootRequireCommand` extends Composer's native [RequireCommand](https://github.com/composer/composer/blob/master/src/Composer/Command/RequireCommand.php) and adds its own values to those in the existing implementation
26
+
-`MageRootRequireCommand` extends Composer's native [RequireCommand](https://getcomposer.org/apidoc/master/Composer/Command/RequireCommand.html) and adds its own values to those in the existing implementation
27
27
- Composer contains a command registry and rejects any new commands that have a conflicting name with a command that is already registered, so `MageRootRequireCommand::configure()` temporarily changes the command's name from `require` to a dummy value to bypass the registry check
28
28
6. Composer calls `MageRootRequireCommand::setApplication()` after checking for naming conflicts but before adding the command to the registry, at which time the command name changes back to `require`
29
29
7. Composer adds `MageRootRequireCommand` to the registry, overwriting the native `RequireCommand` as the command associated with the name `require`
@@ -33,7 +33,7 @@ There are four paths through the plugin code that cover two main pieces of funct
33
33
5.`MageRootRequireCommand::execute()` checks the `composer require` arguments for a `magento/product` package, and if it finds one it calls `MageRootRequireCommand::runUpdate()`
8.`DeltaResolver::resolveRootDeltas()` uses [RootPackageRetriever](class_descriptions.md#rootpackageretriever) to obtain the Composer [Package](https://github.com/composer/composer/blob/master/src/Composer/Package/Package.php) objects for the root `composer.json` files from the default installation of the existing edition and version, the target edition and version supplied to the `composer require` call, and the user's current installation including any customizations they have made
36
+
8.`DeltaResolver::resolveRootDeltas()` uses [RootPackageRetriever](class_descriptions.md#rootpackageretriever) to obtain the Composer [Package](https://getcomposer.org/apidoc/master/Composer/Package/Package.html) objects for the root `composer.json` files from the default installation of the existing edition and version, the target edition and version supplied to the `composer require` call, and the user's current installation including any customizations they have made
37
37
9.`DeltaResolver::resolveRootDeltas()` iterates over the fields in `composer.json` to determine any values that need to be updated to match the root `composer.json` file of the new Magento edition/version
38
38
1. To find these values, it compares the values for each field in the default project for the installed edition/version with the project for the target edition/version (`DeltaResolver::findResolution()`)
39
39
2. If a value has changed in the target, it checks that field in the user's customized root `composer.json` file to see if it has been overwritten with a custom value
@@ -52,10 +52,10 @@ There are four paths through the plugin code that cover two main pieces of funct
52
52
53
53
1. Composer boilerplate and plugin setup
54
54
1. Composer sees the `"type": "composer-plugin"` value in the `composer.json` file for the plugin package
55
-
2. Composer reads the `"extra"->"class"` field to find the class that implements [PluginInterface](https://github.com/composer/composer/blob/master/src/Composer/Plugin/PluginInterface.php) ([PluginDefinition](class_descriptions.md#plugindefinition))
56
-
3.`PluginDefinition` implements [EventSubscriberInterface](https://github.com/composer/composer/blob/master/src/Composer/EventDispatcher/EventSubscriberInterface.php), telling Composer that it subscribes to events triggered by Composer operations
55
+
2. Composer reads the `"extra"->"class"` field to find the class that implements [PluginInterface](https://getcomposer.org/apidoc/master/Composer/Plugin/PluginInterface.html) ([PluginDefinition](class_descriptions.md#plugindefinition))
56
+
3.`PluginDefinition` implements [EventSubscriberInterface](https://getcomposer.org/apidoc/master/Composer/EventDispatcher/EventSubscriberInterface.html), telling Composer that it subscribes to events triggered by Composer operations
57
57
4.`PluginDefinition::getSubscribedEvents()` tells Composer to call the `PluginDefinition::packageUpdate()` function when the `POST_PACKAGE_INSTALL` or `POST_PACKAGE_UPDATE` events are triggered
58
-
2. Composer runs the [RequireCommand::execute()](https://github.com/composer/composer/blob/master/src/Composer/Command/RequireCommand.php) or [UpdateCommand::execute()](https://github.com/composer/composer/blob/master/src/Composer/Command/UpdateCommand.php) method as relevant, which results in Composer triggering either the `POST_PACKAGE_INSTALL` or `POST_PACKAGE_UPDATE` event
58
+
2. Composer runs the [RequireCommand::execute()](https://getcomposer.org/apidoc/master/Composer/Command/RequireCommand.html#method_execute) or [UpdateCommand::execute()](https://getcomposer.org/apidoc/master/Composer/Command/UpdateCommand.html#method_execute) method as relevant, which results in Composer triggering either the `POST_PACKAGE_INSTALL` or `POST_PACKAGE_UPDATE` event
59
59
3. Composer checks the listeners registered to the triggered event and calls `PluginDefinition::packageUpdate()`
5.`WebSetupWizardPluginInstaller::packageEvent()` checks the event to see if it was triggered by a change to the `magento/composer-root-update-plugin` package, and if so it calls `WebSetupWizardPluginInstaller::updateSetupWizardPlugin()`
@@ -88,8 +88,8 @@ There are four paths through the plugin code that cover two main pieces of funct
88
88
89
89
1. Composer boilerplate and plugin setup
90
90
1. Composer sees the `"type": "composer-plugin"` value in the [composer.json](../src/Magento/ComposerRootUpdatePlugin/composer.json) file for the plugin package
91
-
2. Composer reads the `"extra"->"class"` field to find the class that implements [PluginInterface](https://github.com/composer/composer/blob/master/src/Composer/Plugin/PluginInterface.php) ([PluginDefinition](class_descriptions.md#plugindefinition))
92
-
3.`PluginDefinition` implements [Capable](https://github.com/composer/composer/blob/master/src/Composer/Plugin/Capable.php), telling Composer that it provides some capability ([CommandProvider](class_descriptions.md#commandprovider)), which is supplied through `PluginDefinition::getCapabilities()`
91
+
2. Composer reads the `"extra"->"class"` field to find the class that implements [PluginInterface](https://getcomposer.org/apidoc/master/Composer/Plugin/PluginInterface.html) ([PluginDefinition](class_descriptions.md#plugindefinition))
92
+
3.`PluginDefinition` implements [Capable](https://getcomposer.org/apidoc/master/Composer/Plugin/Capable.html), telling Composer that it provides some capability ([CommandProvider](class_descriptions.md#commandprovider)), which is supplied through `PluginDefinition::getCapabilities()`
93
93
4.`CommandProvider::getCommands()` supplies Composer with an instance of [UpdatePluginNamespaceCommands](class_descriptions.md#commandsupdatepluginnamespacecommands)
94
94
5. Composer calls `UpdatePluginNamespaceCommands::configure()` to obtain the command's name, description, options, and help text
95
95
6. Composer adds `UpdatePluginNamespaceCommands` to the registry under the name `magento-update-plugin`
0 commit comments