Purpose of plugin

Overview

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 metapackage requirement through the composer require-commerce command.

To accomplish this, it compares the default project composer.json file for the Magento Open Source or Adobe Commerce metapackage version in the current installation with the project composer.json file corresponding to the target metapackage. The command then applies any deltas found between the two files if they do not conflict with user customizations.

Getting Started

For system requirements and installation instructions, see README.md in the source directory.

Usage

For a usage overview and example use cases, see README.md in the source directory.

Developer documentation

Class descriptions, process flows, and any other developer documentation can be found in the docs directory.

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.

Comments
  • Strange warnings during Magento 2.4.0 installation

    Strange warnings during Magento 2.4.0 installation

    Hi!

    When setting up a clean Magento 2.4.0 installation using composer followed up by bin/magento setup:install ..., I'm getting the following output which seems to be caused by this module.

    ...
    [Progress: 653 / 1207]
    Module 'Magento_CmsUrlRewriteGraphQl':
    [Progress: 654 / 1207]
    Module 'Magento_ComposerRootUpdatePlugin':
    Installing data... Reading /project-root/composer.json
    Loading config file /project-root/composer.json
    Loading config file /project-root/auth.json
    Reading /project-root/auth.json
    Failed to initialize global composer: Composer could not find the config file: /project-root/var/composer_home/composer.json
    To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
    Reading /project-root/vendor/composer/installed.json
    Reading /project-root/composer.lock
    Checking for "magento/composer-root-update-plugin: 1.0.0" for the Web Setup Wizard...
    Reading /project-root/var/vendor/magento/composer-root-update-plugin/composer.json
    Loading config file /project-root/var/vendor/magento/composer-root-update-plugin/composer.json
    No Web Setup Wizard update needed for magento/composer-root-update-plugin; version 1.0.0 is already in /project-root/var.
    Upgrading data... Reading /project-root/composer.json
    Loading config file /project-root/composer.json
    Loading config file /project-root/auth.json
    Reading /project-root/auth.json
    Failed to initialize global composer: Composer could not find the config file: /project-root/var/composer_home/composer.json
    To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
    Reading /project-root/vendor/composer/installed.json
    Reading /project-root/composer.lock
    Checking for "magento/composer-root-update-plugin: 1.0.0" for the Web Setup Wizard...
    Reading /project-root/var/vendor/magento/composer-root-update-plugin/composer.json
    Loading config file /project-root/var/vendor/magento/composer-root-update-plugin/composer.json
    No Web Setup Wizard update needed for magento/composer-root-update-plugin; version 1.0.0 is already in /project-root/var.
    
    [Progress: 655 / 1207]
    Module 'Magento_User':
    ...
    [Progress: 951 / 1207]
    Module 'Magento_CmsUrlRewriteGraphQl':
    [Progress: 952 / 1207]
    Module 'Magento_ComposerRootUpdatePlugin':
    Running data recurring...Reading /project-root/composer.json
    Loading config file /project-root/composer.json
    Loading config file /project-root/auth.json
    Reading /project-root/auth.json
    Failed to initialize global composer: Composer could not find the config file: /project-root/var/composer_home/composer.json
    To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
    Reading /project-root/vendor/composer/installed.json
    Reading /project-root/composer.lock
    Checking for "magento/composer-root-update-plugin: 1.0.0" for the Web Setup Wizard...
    Reading /project-root/var/vendor/magento/composer-root-update-plugin/composer.json
    Loading config file /project-root/var/vendor/magento/composer-root-update-plugin/composer.json
    No Web Setup Wizard update needed for magento/composer-root-update-plugin; version 1.0.0 is already in /project-root/var.
    
    [Progress: 953 / 1207]
    Module 'Magento_User':
    ...
    

    Is this expected? Seems like a lot of noise.

    What's the deal with this warning?

    Failed to initialize global composer: Composer could not find the config file: /project-root/var/composer_home/composer.json
    To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
    
    not a bug 
    opened by hostep 28
  • Doesn't work with Composer 2

    Doesn't work with Composer 2

    Output when using Composer 2:

    Creating a "magento/project-community-edition" project at "/tmp/exampleproject"
    Installing magento/project-community-edition (2.4.1)
      - Downloading magento/project-community-edition (2.4.1)
      - Installing magento/project-community-edition (2.4.1): Extracting archive
    Created project in /tmp/exampleproject
    Loading composer repositories with package information
    Updating dependencies
    Your requirements could not be resolved to an installable set of packages.
    
      Problem 1
        - Root composer.json requires magento/composer-root-update-plugin ~1.0 -> satisfiable by magento/composer-root-update-plugin[1.0.0].
        - magento/composer-root-update-plugin 1.0.0 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
    
    
    resolved composer version 
    opened by marcinsdance 6
  • Code and tag 2.0.2 missing

    Code and tag 2.0.2 missing

    On a Magento Open Source 2.4.4 install, magento/composer-dependency-version-audit-plugin version 2.0.2 is installed.

    However, this repository hasn't been updated. The tag is missing, and, what's more, the code isn't there either.

    opened by Vinai 4
  • Fix composer requirement

    Fix composer requirement

    Composer version 1.10.20 (as defined in dependency) has a security vulnerability.

    composer/composer (1.10.20)

    • CVE-2021-29472: Missing argument delimiter can lead to command execution via VCS repository URLs or source download URLs on systems with Mercurial https://github.com/composer/composer/security/advisories/GHSA-h5h8-pc6h-jvvx

    This also fixes #23 (#24).

    opened by sippsolutions 4
  • Your requirements could not be resolved to an installable set of packages.

    Your requirements could not be resolved to an installable set of packages.

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

    ./composer.json has been updated

    composer update

    Problem 1 - The requested package magento/composer-root-update-plugin ~1.1 exists as magento/composer-root-update-plugin[1.0.0, 0.1.1, 0.1.0] but these are rejected by your constraint.

    Why do I get the following error?

    opened by jimmybsilva 4
  • "[Exception] Higher matching version ... was found in public repository" should be downgraded to a warning

    Steps to reproduce:

    • Try to install a package that has different versions between packagist.org and repo.magento.com - shipperhq/module-shipper is an example as of the time of writing

    Expected Result:

    • End users can download the newest version from packagist. A warning should be provided to check with the package maintainer that the version they've downloaded is correct.

    Actual Outcome:

    • End users get the error in the issue title and cannot proceed with install.

    Recommended Resolution

    • Downgrade this exception to a warning. Encourage the end user to reach out to the package maintainer to verify their version. Bonus points if Magento Marketplace just notifies the extension maintainer directly of the potential conflict or allows them to 'verify' the release is genuine.

    Reasoning

    It is a valid requirement for some extension providers to list their extensions in both the marketplace and in packagist. I think that discussion is out of the scope of this ticket anyway. It's technologically allowed regardless.

    This error message is fundamentally flawed for a few reasons however.

    First, packagist relies directly on the VCS repositories so it has access to new packages nearly instantaneously. However the Marketplaces EQP reviews can take several days to clear. This means there is potentially a SEVERAL DAY window where the package simply can't be installed. Now imagine if the package is under CI/CD and has a release cadance faster than the marketplace review. It will simply never be available.

    Secondly the messaging on this error is all wrong. The messaging as it is written will spook the end user and erode trust in the extension maintainer even if no malicious user exists. Also I would assert that these implementation details should be surfaced to the end user who has not control over them. Doesn't it make more sense to make a best effort to resolve the conflict and/or provide a warning and then tell the extension provider that you think their account has been hacked? The optics of this message are terrible for extension providers, eroding confidence in their end users.

    invalid 
    opened by TravisBernard 3
  • Composer requirement: Not available to set up on Composer 1.10.20 or 2.0.9

    Composer requirement: Not available to set up on Composer 1.10.20 or 2.0.9

    According requirements for Composer version: "composer/composer": "<=1.10.19 || >=2.0.0 <=2.0.8",

    It's strict requirements and require to create new package version for each patch Composer upgrade with important fixes.

    I suggest to change requirement to less strict and release new version in minor version change, like: "composer/composer": "< 1.11 || ~2.0.0",

    Please review suggestion or add 1.10.20 and 2.0.9 to supported version list. Thank you!

    resolved composer version 
    opened by vmalyk 3
  • Update Composer version constraint to allow for 1.10.21

    Update Composer version constraint to allow for 1.10.21

    In Composer 1.10.21 a patch was introduced for an issue related to the new OAuth token format that GitHub started using. https://github.com/composer/composer/commit/dc83ba93f3d8a35629f9a387632e8cd373a144d0

    opened by Serializator 2
  • Magento Cloud Docker incompatibility

    Magento Cloud Docker incompatibility

    The plugin is not compatible with the latest version of MCD

    Steps to reproduce

    TBA

    "magento/composer-root-update-plugin: 1.1.0" for the Web Setup Wizard...
    Reading /app/var/vendor/magento/composer-root-update-plugin/composer.json
    Loading config file /app/var/vendor/magento/composer-root-update-plugin/composer.json
    No Web Setup Wizard update needed for magento/composer-root-update-plugin; version 1.1.0 is already in /app/var.
    

    Root cause analysis

    • It looks like the plugin exits with non-zero code which later results in broken deployment
    resolved 
    opened by shiftedreality 2
  • Can not upgrade to 2.3.6

    Can not upgrade to 2.3.6

    composer require magento/product-enterprise-edition 2.3.6 --base-magento-edition Commerce --base-magento-version 2.3.5-p2
    

    Error:

      Problem 1
        - Can only install one of: magento/page-builder-commerce[1.3.3, 1.3.2].
        - Can only install one of: magento/page-builder-commerce[1.3.2, 1.3.3].
        - Can only install one of: magento/page-builder-commerce[1.3.3, 1.3.2].
        - magento/product-enterprise-edition 2.3.6 requires magento/page-builder-commerce 1.3.3 -> satisfiable by magento/page-builder-commerce[1.3.3].
        - Installation request for magento/product-enterprise-edition 2.3.6 -> satisfiable by magento/product-enterprise-edition[2.3.6].
        - Installation request for magento/page-builder-commerce (locked at 1.3.2, required as ~1.3.2) -> satisfiable by magento/page-builder-commerce[1.3.2].
    
    opened by larsroettig 2
  • Update Composer Requirement

    Update Composer Requirement

    The current version of Composer is 1.10.8. This repository specifically only supports Composer up to 1.10.6. Any reason? I do understand that you cannot easily support Composer 2, but shouldn't the latest Composer 1 version be supported? :)

    resolved composer version 
    opened by sprankhub 2
  • PHP 8.1 support

    PHP 8.1 support

    Deprecation Notice: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/xxx/public_html/vendor/magento/composer-root-update-plugin/Utils/PackageUtils.php:128

    opened by jorgb90 1
  • Fails to install Magento 2.4.4

    Fails to install Magento 2.4.4

    I'm hitting this error when trying to use require-commerce:

    app@5e70488a62a9:~/html$ composer require-commerce magento/product-enterprise-edition 2.4.4
    
    In RootPackageRetriever.php line 526:
                                                                                                                                                     
      [TypeError]                                                                                                                                    
      Return value of Magento\ComposerRootUpdatePlugin\Updater\RootPackageRetriever::getOriginalVersion() must be of the type string, null returned  
                                                                                                                                                     
    
    Exception trace:
      at /var/www/html/vendor/magento/composer-root-update-plugin/Updater/RootPackageRetriever.php:526
     Magento\ComposerRootUpdatePlugin\Updater\RootPackageRetriever->getOriginalVersion() at /var/www/html/vendor/magento/composer-root-update-plugin/Updater/RootProjectUpdater.php:81
     Magento\ComposerRootUpdatePlugin\Updater\RootProjectUpdater->runUpdate() at /var/www/html/vendor/magento/composer-root-update-plugin/Plugin/Commands/RequireCommerceCommand.php:231
     Magento\ComposerRootUpdatePlugin\Plugin\Commands\RequireCommerceCommand->runUpdate() at /var/www/html/vendor/magento/composer-root-update-plugin/Plugin/Commands/RequireCommerceCommand.php:162
     Magento\ComposerRootUpdatePlugin\Plugin\Commands\RequireCommerceCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php:298
     Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:1015
     Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:299
     Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:334
     Composer\Console\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:171
     Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:130
     Composer\Console\Application->run() at phar:///usr/local/bin/composer/bin/composer:88
     require() at /usr/local/bin/composer:29
    

    Composer version:

    app@5e70488a62a9:~/html$ composer --version
    Composer version 2.3.4 2022-04-07 21:16:35
    

    PHP version:

    app@5e70488a62a9:~/html$ php -v
    PHP 7.4.25 (cli) (built: Oct 22 2021 17:44:39) ( NTS )
    Copyright (c) The PHP Group
    Zend Engine v3.4.0, Copyright (c) Zend Technologies
        with Zend OPcache v7.4.25, Copyright (c), by Zend Technologies
        with the ionCube PHP Loader + ionCube24 v11.0.0, Copyright (c) 2002-2021, by ionCube Ltd.
        with Xdebug v3.1.1, Copyright (c) 2002-2021, by Derick Rethans
        with blackfire v1.68.1~linux-x64-non_zts74, https://blackfire.io, by Blackfire
    
    opened by ssx 1
  • should not trigger warning during install from composer.lock

    should not trigger warning during install from composer.lock

    as with direct download including a hash its already protected enough

    // just reporting as I saw multiple reports in various chats triggered by the new release of magento/composer

    reported here, because thats the repository linked from https://magento.com/blog/best-practices/adobe-releases-new-composer-plugin-magento-243-release if its belonging into a different, please advise/forward (does it belong to https://github.com/magento/composer-dependency-version-audit-plugin ?)

    opened by Flyingmana 0
  • PHP 8 support

    PHP 8 support

    When will it be possible to use composer with php 8 ? Its a hassle to change php version just to use the composer every time.

    magento/composer-root-update-plugin 2.0.0 requires php ~7.3.0||~7.4.0 -> your php version (8.0.13) does not satisfy that requirement.

    opened by frilogg 0
Releases(2.0.2)
  • 2.0.2(Apr 13, 2022)

  • 2.0.0(Nov 29, 2021)

    2.0.0 Changelog

    • Deprecated the functionality attached to composer require and re-implemented it on an original command, composer require-commerce to support Composer 2.1.6+
    • Removed Web Setup Wizard compatibility
    • Removed module registration as it was only used for the Web Setup Wizard
    • Dropped compatibility with PHP pre-7.3
    Source code(tar.gz)
    Source code(zip)
  • 1.1.2(Apr 30, 2021)

  • 1.1.1(Mar 29, 2021)

    Changelog:

    • Disabling Web Setup Wizard plugin installation for Magento Cloud Docker due to incompatibility
    • Updating composer/composer requirement to allow versions up to 1.10.20 and 2.0.11
    Source code(tar.gz)
    Source code(zip)
  • 1.1.0(Dec 21, 2020)

    Changelog:

    • Adding support for Magento Cloud
    • Adding support for Composer 2
    • Updating Composer requirement to support up to 1.10.19 and 2.0.8
    Source code(tar.gz)
    Source code(zip)
  • 1.0.0(May 29, 2020)

  • 0.1.0(May 24, 2019)

    Initial 0.1.0 release for community usage testing before 1.0.0 is finalized and the plugin as added to the Magento 2 default installations and upgrade tests and process documentation.

    Source code(tar.gz)
    Source code(zip)
Owner
Magento
Magento
Fresns core library: Cross-platform general-purpose multiple content forms social network service software

About Fresns Fresns is a free and open source social network service software, a general-purpose community product designed for cross-platform, and su

Fresns 82 Dec 31, 2022
A multi-purpose web-shell that simplifies running shell commands on webserver

This webshell can be used for multi-purposed especially most if you want to manage your web server but you are in an emergency , so why not use a webshell:)

urchinsec 5 Oct 13, 2022
A high-performance license server system service for creating and managing products, major versions, and software licenses for the purpose of selling installable software products.

A high-performance license server system service for creating and managing products, major versions, and software licenses for the purpose of selling installable software products. Comes with a SDK and command-line tool. Works anywhere that PHP runs.

CubicleSoft 32 Dec 5, 2022
The XP Framework is an all-purpose, object oriented PHP framework.

XP Framework Core This is the XP Framework's development checkout. Installation If you just want to use the XP Framework, grab a release using compose

XP-Framework 17 Dec 14, 2022
A bunch of general-purpose value objects you can use in your Laravel application.

Laravel Value Objects A bunch of general-purpose value objects you can use in your Laravel application. The package requires PHP ^8.0 and Laravel ^9.7

Michael Rubél 136 Jan 4, 2023
A plugin manager for PocketMine-MP downloads plugin from PocketMine-MP official plugin repository

oh-my-pmmp A plugin manager for PocketMine-MP Getting Started Prerequisites Your server MUST RUN the latest version of PocketMine. Installation From P

thebigcrafter 6 Jan 4, 2023
Integrates the ClassicPress Plugin Directory and any plugin stored in GitHub (tagged with classicpress-plugin) in the ClassicPress Admin

ClassicPress Plugin Directory Adds a new screen in a ClassicPress Install where you can browse, install, activate, deactivate, update, delete and pagi

TukuToi 3 Dec 27, 2022
This Pocketmine-MP plugin is a plugin including a complete faction system.

SimpleFaction Simple faction plugin replacing FactionsPro which is no longer updated. Commands Command Name Command Description Available for /f help

Ayzrix 33 Dec 19, 2022
SpawnInLobby Pocketmine-MP plugin. With this plugin the player will always join the game at the default world spawn point

SpawnInLobby Pocketmine-MP plugin. With this plugin the player will always join the game at the default world spawn point

null 1 Jan 7, 2022
Ratio plugin is a luck plugin. The more lucky you are, the more you win!

Ratio Ratio plugin is a luck plugin. The more lucky you are, the more you win Features When you break a block (Cobblestone), it gives/puts you somethi

Ali Tura Çetin 2 Apr 25, 2022
actionMaster is a new faction plugin that aims at flexibility and customization of the plugin by the user and the developers.

FactionMaster is a new faction plugin that aims at flexibility and customization of the plugin by the user and the developers. It includes all the basic functionality of a faction plugin and data storage in MySQL or SQLITE. This is done by adding an extension system and a translation system. FactionMaster has a will of accessibility to the players and especially not to have to remember a lot of commands to play, all is done via interface.

FactionMaster 21 Dec 26, 2022
Api.video-wordpress-plugin - The official api.video plugin for WordPress

api.video WordPress Plugin api.video is the video infrastructure for product builders. Lightning fast video APIs for integrating, scaling, and managin

api.video 5 Oct 19, 2022
Ied plugin composer - Inspired Plugin Composer: Create, publish and edit plugins from within Textpattern CMS.

ied_plugin_composer Create, publish and edit plugins from within Textpattern CMS. Creates a new page under the Extensions tab where you can edit and e

Stef Dawson 8 Oct 3, 2020
BetterMobs - a plugin Remixed, by MadoxMC, the original plugin is maked by tgwaste

BetterMobsOverworld BetterMobs is a plugin Remixed, by MadoxMC, the original plugin is maked by tgwaste. MadoxMC Just Edited This plugin to Make 3 Compatible Plugins to add Mobs on your Overworld Worlds, NetherWorlds & EndWorlds, MadoxMC Idea.

MadoxMC 4 Dec 15, 2022
BetterMobs is a plugin Remixed, by MadoxMC, the original plugin is maked by tgwaste.

BetterMobs is a plugin Remixed, by MadoxMC, the original plugin is maked by tgwaste. MadoxMC Just Edited This plugin to Make 3 Compatible Plugins to add Mobs on your Overworld Worlds, NetherWorlds & EndWorlds, MadoxMC Idea.

MadoxMC 10 Dec 15, 2022
Opinionated version of Wikimedia composer-merge-plugin to work in pair with Bamarni composer-bin-plugin.

Composer Inheritance Plugin Opinionated version of Wikimedia composer-merge-plugin to work in pair with bamarni/composer-bin-plugin. Usage If you are

Théo FIDRY 25 Dec 2, 2022
jMQTT is a plugin for Jeedom aiming to connect Jeedom to an MQTT broker to subscribe and publish messages

jMQTT is a plugin for Jeedom aiming to connect Jeedom to an MQTT broker to subscribe and publish messages

null 19 Dec 27, 2022
Formcreator is a plugin which allow creation of custom forms of easy access

Formcreator is a plugin which allow creation of custom forms of easy access. At the same time, the plugin allow the creation of one or more tickets when the form is filled.

GLPI plugins 135 Dec 22, 2022