Skip to content

Allow configuration of php-http/socket-client >=2.0 with HttplugBundle #62

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

Closed
wants to merge 1 commit into from

Conversation

qkdreyer
Copy link
Contributor

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Related tickets N/A
Documentation N/A
License MIT

What's in this PR?

Allow configuration of php-http/socket-client >=2.0 with HttplugBundle

Why?

Configuring php-http/socket-client >=2.0 with HttplugBundle was impossible

Example Usage

N/A

Checklist

  • Updated CHANGELOG.md to describe BC breaks / deprecations | new feature | bugfix
  • Documentation pull request created (if not simply a bugfix)

To Do

N/A

@qkdreyer
Copy link
Contributor Author

Ping @joelwurtz @Nyholm

@Nyholm
Copy link
Member

Nyholm commented Aug 12, 2022

This is a BC break. We cannot change constructor arguments without creating a new major version.

Also, I would like to see tests to this PR.

@dbu
Copy link
Contributor

dbu commented Aug 19, 2022

i think we made a mistake with the constructor when creating version 2. in version 1, the signature was responsefactory, config. when moving to version 2, we seem to have wanted to prefer only passing 1 config array, but keep BC with version 1. but we moved the old signature config from 2nd to 3rd parameter, so we lost the config when using the old signature.

to be BC with all cases including the mistake, we should probably in the fallback take $config2 if not null and $config if $config2 is null. the deprecation remains the same.

@dbu
Copy link
Contributor

dbu commented Aug 19, 2022

trying my idea in #65

@dbu dbu closed this in #65 Aug 19, 2022
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

Successfully merging this pull request may close these issues.

3 participants