Skip to content
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

Add support for psr/http-message:^2.0 #150

Merged
merged 2 commits into from Oct 23, 2023
Merged

Add support for psr/http-message:^2.0 #150

merged 2 commits into from Oct 23, 2023

Conversation

W0rma
Copy link
Contributor

@W0rma W0rma commented Apr 27, 2023

Description

Release notes for psr/http-message:^2.0

Type of change

Please delete options that are not relevant.

  • Dependency update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

  • Unit tests
  • Spec Tests
  • Integration tests / Manual Tests

@RikudouSage
Copy link
Collaborator

It doesn't seem to pass tests.

@W0rma
Copy link
Contributor Author

W0rma commented May 5, 2023

It doesn't seem to pass tests.

Sorry, there was a typo.

Should be fixed now. I was able to run the test suite locally.

@RikudouSage
Copy link
Collaborator

Can you make it accept ^1.0 as well? Also remove the changes from StringStream, I feel like it adds unnecessary BC break, the only change that's needed is adding string return type to __toString().

@W0rma
Copy link
Contributor Author

W0rma commented May 12, 2023

Can you make it accept ^1.0 as well? Also remove the changes from StringStream

I've just removed my changes.

@RikudouSage
Copy link
Collaborator

As mentioned before, the only change that's needed is adding string return type to __toString(), otherwise it doesn't pass. If you rebase the current main branch, additional tests would be ran that should catch the error.

@Andreas-Halemba
Copy link

Are here any updates on this?

@W0rma
Copy link
Contributor Author

W0rma commented Oct 23, 2023

As mentioned before, the only change that's needed is adding string return type to __toString(), otherwise it doesn't pass.

@RikudouSage I have just rebased and the tests are still green.

I don't see how the requested change should be related to the changeset of this MR.

Please let me know if you still want me to change this method signature.

@RikudouSage
Copy link
Collaborator

Hm, that's weird, I'll check it out today.

@RikudouSage
Copy link
Collaborator

Hm, it seems to work because PHP internally adds string return type to the __toString() method, but I'd like it explicit anyway, because as of now it doesn't follow Liskov substitution principle, even though PHP changes it internally to be compatible.

I'm talking about the method \Unleash\Client\Helper\StringStream::__toString().

@W0rma
Copy link
Contributor Author

W0rma commented Oct 23, 2023

@RikudouSage I just added the return type as suggested.

Copy link
Collaborator

@RikudouSage RikudouSage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@RikudouSage RikudouSage merged commit d60019b into Unleash:main Oct 23, 2023
11 checks passed
@W0rma W0rma deleted the psr-http-message-v2 branch October 23, 2023 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants