php-http / client-common

Common HTTP Client implementations and tools for HTTPlug
http://httplug.io
MIT License
1.03k stars 54 forks source link

Breaking Change: php-http/client-common v2.7.0 and Removal of php-http/message-factory #229

Closed apoca closed 1 year ago

apoca commented 1 year ago

PHP version: 7.3.33

Description from version 2.6.1 to 2.7.0 we didn't expect any breaking changes!

We have encountered significant issues with the recent release of php-http/client-common v2.7.0, which includes a breaking change that has caused problems in our applications. Additionally, we noticed that the php-http/message-factory package has been removed, further exacerbating the situation.

The breaking change in php-http/client-common v2.7.0 has caused disruptions in our applications, leading to unexpected behavior and errors. This change has introduced compatibility issues and has forced us to refactor our codebase extensively. It has impacted the functionality of our applications, and we are currently unable to proceed with our development and deployment workflows.

Moreover, the removal of the php-http/message-factory package has worsened the situation. This package was relied upon by our applications and its absence has caused dependencies to break, resulting in unresolved class and method references. This removal has significantly affected the overall stability and operability of our applications.

How to reproduce

Possible Solution We kindly request the maintainers of the php-http/client-common package to address these concerns promptly. We urge you to reconsider the breaking change introduced in version 2.7.0 and to provide guidance on how to mitigate the impact of this change. Additionally, we would appreciate any information regarding the removal of php-http/message-factory and any alternative solutions or workarounds that can help restore compatibility with our applications.

Additional context We understand that maintaining and evolving packages can be challenging, and we appreciate the effort put into improving the php-http/client-common package. However, as this breaking change has negatively affected our applications and caused significant disruptions, we hope that the maintainers will prioritize resolving this issue and providing necessary support to the affected users.

Thank you for your attention to this matter. We are looking forward to a prompt resolution that will enable us to continue using php-http/client-common without these adverse effects.

Please let us know if you require any additional information or assistance in diagnosing and addressing this issue.

GrahamCampbell commented 1 year ago

This is not a breaking change. It is bad practice to rely on transitive dependencies - if you were using this, you need to require it yourself. Transitive dependencies are 100% not part of any semver BC promise.

apoca commented 1 year ago

The version going from version 2.6.1 to 2.7 is debatable and I didn't want to go too far there. Our system is effectively an old system. Let's revert to the previous version and think about how we're going to do it going forward. thanks.

GrahamCampbell commented 1 year ago

You can just add the dependency on your side, and it will work still.

ambroisemaupate commented 1 year ago

This is a breaking change as we are not using directly php-http/client-common in our application but sentry/sentry-symfony package which requires sentry/sentry which requires php-http/client-common (^1.5|^2.0).

https://github.com/getsentry/sentry-php/issues/1533

This kind of change should not occur on a minor version upgrade.

GrahamCampbell commented 1 year ago

I see. This is a bug in sentry.

GrahamCampbell commented 1 year ago

They call it a temporary fix, but the code they added should have been there, always. 🤷

apoca commented 1 year ago

This is a breaking change as we are not using directly php-http/client-common in our application but sentry/sentry-symfony package which requires sentry/sentry which requires php-http/client-common (^1.5|^2.0).

https://github.com/getsentry/sentry-php/issues/1533

This kind of change should not occur on a minor version upgrade.

Yes, and I am using in production sentry also ... Thanks for your reply!

ambroisemaupate commented 1 year ago

Hopefully sentry just reverted and requires php-http/message-factory back.

Package operations: 1 install, 1 update, 0 removals
  - Downloading php-http/message-factory (1.1.0)
  - Downloading sentry/sentry (3.18.2)
  - Installing php-http/message-factory (1.1.0): Extracting archive
  - Upgrading sentry/sentry (3.18.1 => 3.18.2): Extracting archive
GrahamCampbell commented 1 year ago

This issue can be closed.