Magento2: Magento 2.3.3: symfony/service-contracts dependency is defined twice in the composer.lock

Created on 9 Oct 2019  路  10Comments  路  Source: magento/magento2

Preconditions (*)

  1. Magento 2.3.3

Additional details

  1. detailed explanation https://github.com/magento/magento2/issues/24937#issuecomment-540164906
  2. https://github.com/magento/magento2/blob/2.3.3/composer.lock#L9196
    https://github.com/magento/magento2/blob/2.3.3/composer.lock#L9254

Steps to reproduce (*)

  1. Download Magento 2.3.3
    -- as arch from https://github.com/magento/magento2/releases/tag/2.3.3
    -- or
    git clone https://github.com/magento/magento2.git git checkout tags/2.3.3
  2. Run composer install

Expected result (*)

  1. Installing packages

Actual result (*)

  1. /public$ composer install
    Loading composer repositories with package information
    Installing dependencies (including require-dev) from lock file
    Your requirements could not be resolved to an installable set of packages.

    Problem 1

    • The requested package symfony/service-contracts v1.1.6 is satisfiable by symfony/service-contracts[v1.1.6] but these conflict with your requirements or minimum-stability.
Composer Confirmed Format is valid Ready for Work Reproduced on 2.3.x

Most helpful comment

@jorgb90: I can confirm this is indeed an issue when downloading this from the GitHub releases.
It is however not a problem when setting up Magento using composer or when downloading the archive from https://magento.com/tech-resources/download#download2321, which is a more recommended way of installing Magento.

The problem with the GitHub release is that for some bizarro reason, the symfony/service-contracts dependency is defined twice in the composer.lock file each time with a different version, which is really really strange.

Screenshot 2019-10-09 at 21 55 03

However, to fix your problem, you can simply run composer update instead of composer install which will remove the duplicated symfony/service-contracts dependency from the composer.lock file and also update some other dependencies.

Update: you can also just run composer update symfony/service-contracts which also seems to solve the problem, but then without updating the other dependencies.

All 10 comments

Hi @jorgb90. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • [ ] Summary of the issue
  • [ ] Information on your environment
  • [ ] Steps to reproduce
  • [ ] Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.3-develop instance - upcoming 2.3.x release

For more details, please, review the Magento Contributor Assistant documentation.

@jorgb90 do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • [ ] yes
  • [ ] no

Hi @sudheers-kensium. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

  • [ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.
  • [ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • [ ] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • [ ] 4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!

  • [ ] 5. Add label Issue: Confirmed once verification is complete.

  • [ ] 6. Make sure that automatic system confirms that report has been added to the backlog.

I am closing this issue as I am not able to reproduce it on vanilla 2.3.3 on Php 7.2.
Please, can you check the 3rd party module dependencies for any conflicts.
Thanks

@milindsingh There are no 3rd party modules.. I just download the 2.3.3 zip release from GitHub, unzip it and run composer install. In a clean directory of course.

@jorgb90: I can confirm this is indeed an issue when downloading this from the GitHub releases.
It is however not a problem when setting up Magento using composer or when downloading the archive from https://magento.com/tech-resources/download#download2321, which is a more recommended way of installing Magento.

The problem with the GitHub release is that for some bizarro reason, the symfony/service-contracts dependency is defined twice in the composer.lock file each time with a different version, which is really really strange.

Screenshot 2019-10-09 at 21 55 03

However, to fix your problem, you can simply run composer update instead of composer install which will remove the duplicated symfony/service-contracts dependency from the composer.lock file and also update some other dependencies.

Update: you can also just run composer update symfony/service-contracts which also seems to solve the problem, but then without updating the other dependencies.

:white_check_mark: Confirmed by @sdzhepa
Thank you for verifying the issue. Based on the provided information internal tickets MC-21670 were created

Issue Available: @sdzhepa, _You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself._

@hostep Thanks for looking into it!

@magento I am working on it.

Hi @vivekkumar-webkul. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:

  • [ ] 1. Add/Edit Component: XXXXX label(s) to the ticket, indicating the components it may be related to.
  • [ ] 2. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!

  • [ ] 3. If the issue is not relevant or is not reproducible any more, feel free to close it.


This should already be fixed and delivered into 2.3-develop.

Was this page helpful?
0 / 5 - 0 ratings