Skip to content

Commit d5dfd4f

Browse files
Switching composer links to api documentation instead of source where possible
1 parent 075a141 commit d5dfd4f

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

docs/class_descriptions.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,23 @@ Because the plugin is hooking into the native `composer require` functionality d
2727

2828
#### [**AccessibleRootPackageLoader**](../src/Magento/ComposerRootUpdatePlugin/ComposerReimplementation/AccessibleRootPackageLoader.php)
2929

30-
**Composer class:** [RootPackageLoader](https://github.com/composer/composer/blob/master/src/Composer/Package/Loader/RootPackageLoader.php)
30+
**Composer class:** [RootPackageLoader](https://getcomposer.org/apidoc/master/Composer/Package/Loader/RootPackageLoader.htmlp)
3131

3232
- **`extractStabilityFlags()`** -- see [RootPackageLoader::extractStabilityFlags()](https://github.com/composer/composer/blob/master/src/Composer/Package/Loader/RootPackageLoader.php)
3333
- 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
3434
- **Reason for cloning:** The original method is private
3535

3636
#### [**ExtendableRequireCommand**](../src/Magento/ComposerRootUpdatePlugin/ComposerReimplementation/ExtendableRequireCommand.php)
3737

38-
**Composer class:** [RequireCommand](https://github.com/composer/composer/blob/master/src/Composer/Command/RequireCommand.php)
38+
**Composer class:** [RequireCommand](https://getcomposer.org/apidoc/master/Composer/Command/RequireCommand.html)
3939

40-
- **`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)
4141
- Checks the accessibility of the `composer.json` file and parses out relevant base information that is needed before starting the plugin's processing
4242
- **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)
4444
- Interactively asks for the `composer require` arguments if they are not passed to the CLI command call
4545
- **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)
4747
- Reverts the `composer.json` file to its original state from before the plugin's changes if the command fails
4848
- **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
4949

@@ -55,9 +55,9 @@ Classes in this namespace tie into the Composer library's code that handles plug
5555

5656
#### [**Commands\MageRootRequireCommand**](../src/Magento/ComposerRootUpdatePlugin/Plugin/Commands/MageRootRequireCommand.php)
5757

58-
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.
5959

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.
6161

6262
- **`configure()`**
6363
- 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
9393
This class is Composer's entry point into the plugin's functionality and the definition supplied to the plugin registry.
9494

9595
- **`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)
9797
- **`getCapabilities()`**
9898
- Tells Composer that the plugin includes CLI commands and defines the [CommandProvider](#commandprovider) that supplies the command objects
9999
- **`getSubscribedEvents()`**
@@ -169,7 +169,7 @@ This class runs [DeltaResolver::resolveRootDeltas()](#deltaresolver) if an updat
169169

170170
#### [**RootPackageRetriever**](../src/Magento/ComposerRootUpdatePlugin/Updater/RootPackageRetriever.php)
171171

172-
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).
173173

174174
- **`getOriginalRootPackage()`**
175175
- 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
182182
- **`parseOriginalVersionAndEditionFromLock()`**
183183
- Inspect the `composer.lock` file for the currently-installed Magento product package and parse out the edition and version for use by `getOriginalRootPackage()`
184184
- **`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
186186

187187
***
188188

@@ -195,7 +195,7 @@ This namespace contains utility classes shared across the rest of the plugin's c
195195
Command-line logger with interaction methods.
196196

197197
- **`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
199199
- **`ask()`**
200200
- 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
201201
- **`log()`**
@@ -212,6 +212,6 @@ Common package-related utility functions.
212212
- **`getMagentoProductEdition()`**
213213
- Extracts the edition (`community` or `enterprise`) from a Magento product package name
214214
- **`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
216216
- **`isConstraintStrict()`**
217217
- Checks if a version constraint is strict or if it allows multiple versions (such as `~1.0` or `>= 1.5.3`)

docs/process_flows.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ There are four paths through the plugin code that cover two main pieces of funct
1919

2020
1. Composer boilerplate and plugin setup
2121
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()`
2424
4. `CommandProvider::getCommands()` supplies Composer with an instance of [MageRootRequireCommand](class_descriptions.md#commandsmagerootrequirecommand)
2525
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
2727
- 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
2828
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`
2929
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
3333
5. `MageRootRequireCommand::execute()` checks the `composer require` arguments for a `magento/product` package, and if it finds one it calls `MageRootRequireCommand::runUpdate()`
3434
6. `MageRootRequireCommand::runUpdate()` calls [MagentoRootUpdater::runUpdate()](class_descriptions.md#magentorootupdater)
3535
7. `MageRootRequireCommand::runUpdate()` calls [DeltaResolver::resolveRootDeltas()](class_descriptions.md#deltaresolver)
36-
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
3737
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
3838
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()`)
3939
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
5252

5353
1. Composer boilerplate and plugin setup
5454
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
5757
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
5959
3. Composer checks the listeners registered to the triggered event and calls `PluginDefinition::packageUpdate()`
6060
4. `PluginDefinition::packageUpdate()` calls [WebSetupWizardPluginInstaller::packageEvent()](class_descriptions.md#websetupwizardplugininstaller)
6161
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
8888

8989
1. Composer boilerplate and plugin setup
9090
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()`
9393
4. `CommandProvider::getCommands()` supplies Composer with an instance of [UpdatePluginNamespaceCommands](class_descriptions.md#commandsupdatepluginnamespacecommands)
9494
5. Composer calls `UpdatePluginNamespaceCommands::configure()` to obtain the command's name, description, options, and help text
9595
6. Composer adds `UpdatePluginNamespaceCommands` to the registry under the name `magento-update-plugin`

0 commit comments

Comments
 (0)