Skip to content

refactor: remove depreacted ResponseInterface::getReason() #8841

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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions system/HTTP/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,21 +205,6 @@ public function getStatusCode(): int
return $this->statusCode;
}

/**
* Gets the response response phrase associated with the status code.
*
* @see http://tools.ietf.org/html/rfc7231#section-6
* @see http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
*
* @deprecated Use getReasonPhrase()
*
* @codeCoverageIgnore
*/
public function getReason(): string
{
return $this->getReasonPhrase();
}

/**
* Gets the response reason phrase associated with the status code.
*
Expand Down
10 changes: 0 additions & 10 deletions system/HTTP/ResponseInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,16 +135,6 @@ public function getStatusCode(): int;
*/
public function setStatusCode(int $code, string $reason = '');

/**
* Gets the response phrase associated with the status code.
*
* @see http://tools.ietf.org/html/rfc7231#section-6
* @see http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
*
* @deprecated Use getReasonPhrase()
*/
public function getReason(): string;

/**
* Gets the response reason phrase associated with the status code.
*
Expand Down
2 changes: 2 additions & 0 deletions user_guide_src/source/changelogs/v4.6.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ Removed Deprecated Items

- **API:** The deprecated ``failValidationError()`` method in ``CodeIgniter\API\ResponseTrait``
has been removed. Use ``failValidationErrors()`` instead.
- **HTTP:** The deprecated ``getReason()`` method in ``CodeIgniter\HTTP\Response``
and ``ResponseInterface`` has been removed. Use ``getReasonPhrase()`` instead.

************
Enhancements
Expand Down
Loading