kbsali / php-redmine-api

A simple PHP Redmine API client, Object Oriented

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rename `Response::getBody()` to `Response::getContent()`

Art4 opened this issue · comments

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