Skip to content

Rename Response::getBody() to Response::getContent() #363

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
Art4 opened this issue Jan 18, 2024 · 0 comments · Fixed by #366
Closed

Rename Response::getBody() to Response::getContent() #363

Art4 opened this issue Jan 18, 2024 · 0 comments · Fixed by #366
Assignees
Labels
Milestone

Comments

@Art4
Copy link
Collaborator

Art4 commented Jan 18, 2024

The method signatures in Redmine\Http\Response are defined with the intention that an implementing class can implement the Response interface and also the PSR-7 \Psr\Http\Message\ResponseInterface.

However the Response::getBody(): string is not compatible with ResponseInterface::getBody(): StreamInterface. So we should rename our method. Because Redmine\Http\Response was not released yet (see #357) renaming it will not be a breaking change.

I propose the signature Response::getContent(): string.

Refs #341

@Art4 Art4 added the bug label Jan 18, 2024
@Art4 Art4 added this to the v2.5.0 milestone Jan 18, 2024
@Art4 Art4 changed the title Rename Response::getBody() Rename Response::getBody() to Response::getContent() Jan 19, 2024
@Art4 Art4 self-assigned this Jan 21, 2024
@Art4 Art4 linked a pull request Jan 23, 2024 that will close this issue
@Art4 Art4 closed this as completed in #366 Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant