apigee / apigee-client-php

Client library to make API calls to Apigee Edge Management API
Apache License 2.0
27 stars 30 forks source link

Unable to install 3.0.6 on Drupal 10.3.2 or on any version that requires symfony/serializer:>6.4.6 #373

Closed mxr576 closed 2 months ago

mxr576 commented 3 months ago

Description

There was an issue with Symfony Serializer 6.4.7 but that was a long time ago and since https://github.com/apigee/apigee-client-php/commit/3073f76dff563f7de88487697a6b218b7d6adc1f was merged Symfony released several patch versions for 6.4.x branch and 6.4.9 has the issue fixed: https://github.com/symfony/symfony/pull/57580

Because drupal/core-recommended locks on specific version of dependencies, the Apigee Edge Drupal module cannot be installed on Drupal 10.3.2 (or on any other version) that requires a never version of Symfony Serializer.

Next time before a release, it should checked if there is a never version from the dependency that was locked to a specific version range or a conflict rule was added and whether that version addresses the reason behind the version lock or not.

Steps to Reproduce

composer create-project drupal/recommended-project:~10.3.0

$ composer req drupal/apigee_edge:~3.0.8
./composer.json has been updated

  Problem 1
    - Root composer.json requires drupal/apigee_edge ~3.0.8 -> satisfiable by drupal/apigee_edge[3.0.8].
    - apigee/apigee-client-php 3.0.6 conflicts with symfony/serializer >6.4.6.
    - drupal/core-recommended 10.3.2 requires symfony/serializer ~v6.4.7 -> satisfiable by symfony/serializer[v6.4.10].
    - drupal/apigee_edge 3.0.8 requires apigee/apigee-client-php ~3.0.6 -> satisfiable by apigee/apigee-client-php[3.0.6].
    - drupal/core-recommended is locked to version 10.3.2 and an update of this package was not requested.

Actual Behavior

What happened after the steps to reproduce.

Expected Behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Notes

Add any other context about the problem here.

Version Info

In what version or versions of this library can you reproduce this issue?

kedarkhaire commented 2 months ago

Hi @mxr576 We have a new update in symfony/serializer from v6.4.7. There is issue for some attributes of the object which are lost during denormalizing during the process. That is creating this issue. We are looking into it, if you also get some solution or if you have some plan of action for it, please update here, so that we can check it. P.S. I have added a temporary solution for the issue, we won't go in that way. Thanks!

kedarkhaire commented 2 months ago

I have doubts with the changes made with these PRs https://github.com/symfony/symfony/pull/57187/files & https://github.com/symfony/symfony/pull/57273/files

HollyWangUCLA commented 2 months ago

I run into the same issue, any workaround?

kedarkhaire commented 2 months ago

Hi @HollyWangUCLA Just remove these line of code from your composer.json "conflict": { "symfony/serializer": ">6.4.6" }, This will solve your issue. Thanks!

HollyWangUCLA commented 2 months ago

I don't have symfony/serializer in my conflict list. This is what I am having

"conflict": { "drupal/drupal": "*" },

So this is the command I used: 

% composer require drupal/core-recommended:10.3.0 drupal/core-composer-scaffold:10.3.0 drupal/core-project-message:10.3.0 symfony/serializer:v6.4.7 apigee/apigee-client-php:3.0.6 --update-with-all-dependencies apigee/apigee-client-php 3.0.6 conflicts with symfony/serializer v6.4.7. % composer why apigee/apigee-client-php drupal/apigee_edge 3.0.8 requires apigee/apigee-client-php (~3.0.6) % composer why symfony/serializer
apigee/apigee-client-php 3.0.6 requires symfony/serializer (^6.4.6)

kedarkhaire commented 2 months ago

Hi @HollyWangUCLA

Till we fix this issue, can you try using this, it wont create any error.

composer require drupal/core-recommended:10.3.0 drupal/core-composer-scaffold:10.3.0 drupal/core-project-message:10.3.0 apigee/apigee-client-php --update-with-all-dependencies

Thanks!

HollyWangUCLA commented 2 months ago

Hello, Thank you for your help. This is the result

` % composer require drupal/core-recommended:10.3.0 drupal/core-composer-scaffold:10.3.0 drupal/core-project-message:10.3.0 apigee/apigee-client-php --update-with-all-dependencies ./composer.json has been updated Running composer update drupal/core-recommended drupal/core-composer-scaffold drupal/core-project-message apigee/apigee-client-php --with-all-dependencies Gathering patches for root package. Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages.

Problem 1

You can also try re-running composer require with an explicit version constraint, e.g. "composer require apigee/apigee-client-php:*" to figure out if any version is installable, or "composer require apigee/apigee-client-php:^2.1" if you know which you need.

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

kedarkhaire commented 2 months ago

Hi @HollyWangUCLA Till we fix this issue, can you try to use apigee/apigee-client-php 3.0.5 That will allow to use latest version of symfony/serializer and others. Thanks!

HollyWangUCLA commented 2 months ago

Hello

  1. I tried to use apigee/apigee-client-php 3.0.5 but saw this error drupal/apigee_edge 3.0.8 requires apigee/apigee-client-php ~3.0.6

  2. I tried to lower drupal/apigee_edge to 3.0.7 but there are other conflicts

  3. this is current successful upgrade after lower the edge and catalog at the same time

composer require drupal/core-recommended:10.3.0 drupal/core-composer-scaffold:10.3.0 drupal/core-project-message:10.3.0 apigee/apigee-client-php:3.0.5 drupal/apigee_edge 3.0.7 drupal/apigee_api_catalog 3.0.6 --update-with-all-dependencies

kedarkhaire commented 2 months ago

Hi @HollyWangUCLA Please hold the update till this week. We are testing the solution for this issue in all aspects. Once we deploy it, we will update here and then you can update the required. Thanks!

HollyWangUCLA commented 2 months ago

cool, waiting for the update

shishir-intelli commented 2 months ago

@HollyWangUCLA , In the meantime, could you please check PR-376 by applying it as a patch in your composer file and let us know if it resolves your issue? Thanks!