Download the PHP package magenxcommerce/composer-root-update-plugin without Composer

On this page you can find all versions of the php package magenxcommerce/composer-root-update-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package composer-root-update-plugin

Overview

Purpose of plugin

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.

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.

Getting Started

System requirements

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.

Installation

To install the plugin, run the following commands in the Magento root directory.

composer require magento/composer-root-update-plugin ~1.1 --no-update
composer update 

Usage

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.

If the composer require command for the target Magento package fails, one of the following may be necessary.

Installations that started with another Magento product

If the local Magento installation has previously been updated from a previous Magento product version or edition without the plugin installed, the root composer.json file may still have values from the earlier package that need to be updated to the current Magento requirement before updating to the target Magento product.

In this case, run the following command with the appropriate values to correct the existing composer.json file before proceeding with the expected composer require command for the target Magento product.

composer require <current_Magento_package> <current_version> --base-magento-edition '<Open Source|Commerce>' --base-magento-version <original_Magento_version>

These options are not valid for Magento Cloud installations.

Conflicting custom values

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.

To resolve these conflicts interactively, re-run the composer require command with the --interactive-magento-conflicts option.

To override all conflicting custom values with the expected Magento values, re-run the composer require command with the --use-default-magento-values option.

Bypassing the plugin

To run the native composer require command without the plugin's updates, use the --skip-magento-root-plugin option.

Refreshing the plugin for the Web Setup Wizard

If the var directory in the Magento root folder has been cleared, the plugin may need to be re-installed there to function when updating Magento through the Web Setup Wizard.

To reinstall the plugin in var, run the following command in the Magento root directory.

composer magento-update-plugin install

Example use case: Upgrading from Magento 2.2.8 to Magento 2.3.1

Without magento/composer-root-update-plugin:

In the project directory for a Magento Open Source 2.2.8 installation, a user tries to run the composer require and composer update commands for Magento Open Source 2.3.1 with these results:

This error occurs because the "require-dev" section in the composer.json file for magento/project-community-edition 2.2.8 conflicts with the dependencies for the new 2.3.1 version of magento/product-community-edition. The 2.2.8 composer.json file has a "require-dev" entry for sebastian/phpcpd: 2.0.4, which depends on symfony/console: ~2.7|^3.0, but the magento/magento2-base package required by magento/product-community-edition 2.3.1 depends on symfony/console: ~4.1.0, which does not overlap with the versions allowed by the ~2.7|^3.0 constraint.

Because the sebastian/phpcpd requirement exists in the root composer.json file instead of one of the child dependencies of magento/product-community-edition 2.2.8, it does not get updated by Composer when the magento/product-community-edition version changes.

In the composer.json file for magento/project-community-edition 2.3.1, that sebastian/phpcpd entry in "require-dev" has changed to ~3.0.0, which is compatible with the symfony/console versions allowed by magento/magento2-base 2.3.1. However, without this plugin, Composer does not know that the value needs to change because the commands to upgrade Magento use the magento/product-community-edition metapackage and not the root magento/project-community-edition project package.

This is only one of the changes to the root project composer.json file between Magento 2.2.8 and 2.3.1. There are several others, and future Magento versions can (and likely will) require further updates to the file.

The changes to the root project composer.json files can be done manually by the user without the plugin, but the values that need to change can differ depending on the Magento versions involved and user-customized values may already override the Magento defaults. This means the exact upgrade steps necessary can be different for every user and determining the correct changes to make manually for a given user's configuration may be error-prone.

For reference, these are the "require" and "require-dev" sections for default installations (no user customizations) of Magento Open Source versions 2.2.8 and 2.3.1. It is important to note that these sections of composer.json are not the only ones that can change between versions. The "autoload" and "conflict" sections, for example, can also affect Magento functionality and need to be kept up-to-date with the installed Magento versions.

With magento/composer-root-update-plugin:

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.

As is normal for composer require, magento/composer-root-update-plugin is added to the composer.json file. The plugin also installs itself in the directory used by the Magento Web Setup Wizard during dependency validation.

With the plugin installed, the user proceeds with the composer require command for Magento Open Source 2.3.1 (--verbose mode used here for demonstration).

The plugin detects the user's request for the 2.3.1 version of magento/product-community-edition and looks up the composer.json file for the corresponding magento/project-community-edition 2.3.1 root project package. It finds the values that are different between 2.2.8 and 2.3.1 and updates the local composer.json file accordingly, then lets Composer proceed with the normal composer require functionality.

With the root composer.json file updated for Magento Open Source 2.3.1, the user proceeds with the composer update command:

With the updated values from Magento Open Source 2.3.1, the symfony/console conflict no longer exists and the update occurs as expected.

For reference, these are the "require" and "require-dev" sections from the composer.json file after composer require magento/product-community-edition 2.3.1 --no-update runs with the plugin on a Magento Open Source 2.2.8 installation. They contain exactly the same entries as the default Magento Open Source 2.3.1 root composer.json file (with the addition of the magento/composer-root-update-plugin requirement).

License

Each Magento source file included in this distribution is licensed under OSL 3.0.

Open Software License (OSL 3.0).

Please see LICENSE.txt for the full text of the OSL 3.0 license or contact [email protected] for a copy.


All versions of composer-root-update-plugin with dependencies

PHP Build Version
Package Version
Requires composer/composer Version <=1.11 || >=2.0.0 <=2.1
composer-plugin-api Version ^1.0 || ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package magenxcommerce/composer-root-update-plugin contains the following files

Loading the files please wait ....