Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install CoreShop ^4.0 with Pimcore ^11.1 #2582

Closed
gander opened this issue Mar 12, 2024 · 9 comments
Closed

Cannot install CoreShop ^4.0 with Pimcore ^11.1 #2582

gander opened this issue Mar 12, 2024 · 9 comments

Comments

@gander
Copy link

gander commented Mar 12, 2024

Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no
  1. Install Pimcore ^11.1 Docker Based Installation
  2. Fullfill CoreShop php-xsl requirement:
services:
    php:
        build:
            dockerfile_inline: |
                FROM pimcore/pimcore:php8.2-debug-latest
                RUN apt-get update && apt-get install --yes gcc autoconf pkg-config make libxslt-dev
                RUN docker-php-ext-install xsl
  1. Try install CoreShop ^4.0:
docker compose exec php composer require coreshop/core-shop ^4.0

Error:

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

  Problem 1
    - coreshop/core-shop[4.0.0, ..., 4.0.4] require sebastian/diff ^4.0 | ^5.0 -> found sebastian/diff[4.0.0, ..., 4.0.6, 5.0.0, ..., 5.1.1] but the package is fixed to 6.0.1 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - Root composer.json requires coreshop/core-shop ^4.0 -> satisfiable by coreshop/core-shop[4.0.0, ..., 4.0.4].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Downgrading Pimcore dependency packages is not a solution. Moreover, these conflicts cannot be resolved with --with-all-dependencies

@lukadschaak
Copy link
Contributor

I do not have this problems with pimcore/pimcore:11.2.0 and coreshop/core-shop:4.0.4.

Setup is different (just to mention).

@jdreesen
Copy link
Contributor

There's something else blocking the update of sebastian/diff.
What does composer why sebastian/diff say?

@dpfaffenbauer
Copy link
Member

I will check if sebastian/diff:^6 is also compatible and allow it if so

@gander
Copy link
Author

gander commented Mar 14, 2024

Install Pimcore ^11.1

docker run --rm -v `pwd`:/var/www/html pimcore/pimcore:php8.2-latest composer create-project pimcore/skeleton my-project
cd my-project/
docker compose up -d
docker compose exec php vendor/bin/pimcore-install --mysql-host-socket=db --mysql-username=pimcore --mysql-password=pimcore --mysql-database=pimcore

Install CoreShop ^4.0

Try 1

docker compose exec php composer require coreshop/core-shop ^4.0
  Problem 1
    - coreshop/core-shop[4.0.0, ..., 4.0.4] require sebastian/diff ^4.0 | ^5.0 -> found sebastian/diff[4.0.0, ..., 4.0.6, 5.0.0, ..., 5.1.1] but the package is fixed to 6.0.1 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - Root composer.json requires coreshop/core-shop ^4.0 -> satisfiable by coreshop/core-shop[4.0.0, ..., 4.0.4].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Try 2

docker compose exec php composer require coreshop/core-shop ^4.0 --with-all-dependencies
  Problem 1
    - coreshop/core-shop[4.0.0, ..., 4.0.4] require sebastian/diff ^4.0 | ^5.0 -> found sebastian/diff[4.0.0, ..., 4.0.6, 5.0.0, ..., 5.1.1] but these were not loaded, likely because it conflicts with another require.
    - Root composer.json requires coreshop/core-shop ^4.0 -> satisfiable by coreshop/core-shop[4.0.0, ..., 4.0.4].

Check

docker compose exec php composer why sebastian/diff
codeception/codeception 5.1.2  requires sebastian/diff (^4.0.3 || ^5.0 || ^6.0) 
phpunit/phpunit         11.0.6 requires sebastian/diff (^6.0)                   
sebastian/comparator    6.0.0  requires sebastian/diff (^6.0)                   

Try 3

docker compose exec php composer remove --dev codeception/codeception codeception/module-symfony
docker compose exec php composer require coreshop/core-shop ^4.0
  Problem 1
    - coreshop/core-shop[4.0.0, ..., 4.0.4] require payum/payum ^1.7 -> satisfiable by payum/payum[1.7.0, ..., 1.7.4].
    - payum/payum[1.7.0, ..., 1.7.4] require league/uri ^6.4 -> found league/uri[6.4.0, ..., 6.8.0] but the package is fixed to 7.4.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - Root composer.json requires coreshop/core-shop ^4.0 -> satisfiable by coreshop/core-shop[4.0.0, ..., 4.0.4].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Try 4

docker compose exec php composer remove --dev codeception/codeception codeception/module-symfony
docker compose exec php composer require coreshop/core-shop ^4.0 --with-all-dependencies

Success !

Restore codeception

docker compose exec php composer require --dev codeception/codeception:^5.0.3 codeception/module-symfony:^3.1.0

@dpfaffenbauer wrote:

I will check if sebastian/diff:^6 is also compatible and allow it if so

I've followed these steps now, so unless they released a patch a second ago, it works as I showed.

@gander
Copy link
Author

gander commented Mar 14, 2024

Before:
obraz

After:
obraz

Yes, the "before" and "after" results appear to be the same, but the versions of some packages have changed as follows:

- league/uri                           7.4.0
+ league/uri                           6.8.0
- league/uri-interfaces                7.4.0
+ league/uri-interfaces                2.3.0
- psr/http-message                     2.0
+ psr/http-message                     1.1 
- sebastian/diff                       6.0.1
+ sebastian/diff                       5.1.1
- phpunit/phpunit                      11.0.6
+ phpunit/phpunit                      10.5.13

If I receive older packages, I may not have some functionality included in the Pimcore documentation

@gander
Copy link
Author

gander commented Mar 14, 2024

If it is written that package X requires package Y in a specific version, it is absolutely not possible to expect the user to resolve conflicts, nor is it acceptable for compatibility to rely on downgrading dependent packages to their older versions.

@gander
Copy link
Author

gander commented Mar 14, 2024

@lukadschaak wrote:

I do not have this problems with pimcore/pimcore:11.2.0 and coreshop/core-shop:4.0.4.

Setup is different (just to mention).

When I created this issue, it was still 11.1, but the extension of the problem description is already on 11.2. Without changes.

@dpfaffenbauer
Copy link
Member

The reason is phpunit and codeception, if you don't need that, you don't really rely on older versions. But: The solution is quite simple: We allow sebastian/diff in Version 6, it is compatible for what we need

@dpfaffenbauer
Copy link
Member

should be better now with the latest 4.x-dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants