Giter Club home page Giter Club logo

composer-root-update-plugin's People

Contributors

faizan-shk avatar glo71317 avatar pdohogne-magento avatar seldaek avatar sidolov avatar sippsolutions avatar slitviachenko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

composer-root-update-plugin's Issues

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.

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.

Magento 2.4.0 installation - replace not working in root composer

composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition . --no-install

add replace section to root composer.json

"replace": {
        "magento/module-marketplace": "*",
        "magento/module-backup": "*"

etc

composer install

packages installed.
how to properly manage packages now?

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.

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!

Can't install Version 1.0

I've been trying to install magento/composer-root-update-plugin via composer, but the version 1.0 isn't on repo.magento.com.
Manual installation won't work, because we need the composer.json from the src folder.
Can you please release 1.0 to the marketplace?

"[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.

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

Release 2.0.3 not available on repo.magento.com

Last week version 2.0.3 was released.
However, the package is not available on repo.magento.com:

% jq .repositories composer.json
{
  "0": {
    "type": "composer",
    "url": "https://repo.magento.com/"
  }
}

% composer show --format json --available magento/composer-root-update-plugin | jq -r .versions
[
  "2.0.2",
  "2.0.0",
  "1.1.2",
  "1.1.1",
  "1.1.0",
  "1.0.0",
  "0.1.1",
  "0.1.0"
]

What is the reason? When can we expect it to be available?
Was it tagged by mistake in the open source repo and will become available when Magento 2.4.6 is released?

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?

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

Does not work with zsh

i.e.

composer require magento/composer-root-update-plugin ~2.0 --no-update
zsh: no such user or named directory: 2.0

magento setup:compile error

Hello All,

I got a new issue during the magento compile:

i used to run compile
Screenshot (374)
php -dmemory_limit=4G bin/magento setup:di:compile in command prompt

C:\xampp\htdocs\magento>php -dmemory_limit=4G bin/magento setup:di:compile
Compilation was started.
Plugin list generation... 8/9 [========================>---] 88% 4 mins 372.0 MiB
In ErrorHandler.php line 61:

Warning: file_put_contents(C:/xampp/htdocs/magento/generated/metadata/primary|global|plugin-list.php): failed to op
en stream: No such file or directory
in C:\xampp\htdocs\magento\vendor\magento\framework\Interception*PluginListGen
erator.php on line 414
*

setup:di:compile

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

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 ?)

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

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? :)

New Release?

Last update was ~1 year ago and current develop branch solves composer 2.7
#39

Composer 2.1.8

The plugin doesn't seem to be compatible with 2.1.6 and up.
The plugin is not modifying composer.json unless I roll back to composer 2.1.5

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.