Skip to content

Upgrade to react/http instead of react/http-client which is deprecated. #42

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

Merged
merged 5 commits into from
Dec 17, 2020

Conversation

shulard
Copy link
Collaborator

@shulard shulard commented Dec 16, 2020

Q A
Bug fix? no
New feature? yes
BC breaks? yes
Deprecations? no
Related tickets fixes #41
License MIT

What's in this PR?

The adapter now rely on react/http instead of react/http-client. The Client external behaviour hasn't changed but all the inner logic is now rewritten.

Because react/http hasn't a compatible signature with react/http-client this is a BC Break and will require a new major version of the adapter.

Why?

react/http-client is now deprecated so we must move with the ecosystem.

Checklist

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

Since the react/http-client library is now deprecated we need to move forward with the ecosystem. We also use the new Psr7 factories from the nyholm/psr7 package.
@shulard shulard force-pushed the dependency/react-1.0 branch from e5e2d74 to 7cc09dd Compare December 16, 2020 11:48
@shulard shulard mentioned this pull request Dec 16, 2020
3 tasks
@dbu
Copy link
Contributor

dbu commented Dec 16, 2020

thanks! this seems good to me.

can you maybe adjust the style-ci configuration to the newest symfony ruleset (remove the explicit rule that is now in the symfony ruleset)?

should we bump this to a new major version? it could be unexpected to have the underlying react library change completely when upgrading.

@shulard
Copy link
Collaborator Author

shulard commented Dec 16, 2020

Ok I take a look at the style-ci configuration. For sure it must be a new major version for this adapter. If some users have tweaked the reactphp behaviour, their code will not work anymore.

@shulard shulard force-pushed the dependency/react-1.0 branch from da751e3 to b80ffda Compare December 16, 2020 15:38
Also upgrade all the test suite to match the new behaviour.
@shulard shulard force-pushed the dependency/react-1.0 branch from b80ffda to dcfab46 Compare December 16, 2020 15:40
@dbu
Copy link
Contributor

dbu commented Dec 17, 2020

please change composer.json where it says

    "extra": {
        "branch-alias": {
            "dev-master": "2.4-dev"

to say 3.x-dev

we did not release the last commit to master as 2.4 yet - it was the switch to httplug 2. however, i think the correct way is to get this merged as well, rather than a release 2.4 for the switch to httplug 2. do you agree?

@shulard shulard force-pushed the dependency/react-1.0 branch from dcfab46 to c8d7056 Compare December 17, 2020 10:03
@shulard
Copy link
Collaborator Author

shulard commented Dec 17, 2020

Ok, I've just updated the composer.json file…

Maybe we can release the two different tags. I think that users can have advantage to use the httplug 2 no ? Maybe we'll have to path the v2 branch at some time… It'll require a tiny changelog update for the v2.4.0 branch to be published.

@shulard shulard mentioned this pull request Dec 17, 2020
@dbu
Copy link
Contributor

dbu commented Dec 17, 2020

my thinking was that we could merge this and release as 3.0.0 immediately. i would not be aware of other BC breaking things we need to do. that would keep the number of different versions a bit lower. and it might be problematic for some when we switch to httplug 2 in a minor version...

@shulard
Copy link
Collaborator Author

shulard commented Dec 17, 2020

You're absolutely right 😄. I close the #44 and merge this one. Then I'll commit the changelog update on master for the v3.0.0 release 😉.

@shulard shulard merged commit c961c97 into php-http:master Dec 17, 2020
@dbu
Copy link
Contributor

dbu commented Dec 17, 2020

hooray, thanks!

@shulard shulard deleted the dependency/react-1.0 branch December 17, 2020 16:16
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.

Move forward and use react/http
2 participants