Skip to content

Commit 6309010

Browse files
authored
Merge pull request #6702 from kenjis/fix-MessageInterface
fix: add missing getProtocolVersion() in MessageInterface
2 parents 376b34a + b228f11 commit 6309010

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

system/HTTP/MessageInterface.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,19 @@
1414
use CodeIgniter\HTTP\Exceptions\HTTPException;
1515

1616
/**
17-
* Expected behavior of an HTTP request
17+
* Expected behavior of an HTTP message
1818
*/
1919
interface MessageInterface
2020
{
21+
/**
22+
* Retrieves the HTTP protocol version as a string.
23+
*
24+
* The string MUST contain only the HTTP version number (e.g., "1.1", "1.0").
25+
*
26+
* @return string HTTP protocol version.
27+
*/
28+
public function getProtocolVersion(): string;
29+
2130
/**
2231
* Sets the body of the current message.
2332
*

user_guide_src/source/changelogs/v4.3.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Others
5353
Interface Changes
5454
=================
5555

56-
- Added missing ``getBody()``, ``hasHeader()`` and ``getHeaderLine()`` method in ``MessageInterface``.
56+
- Added missing ``getProtocolVersion()``, ``getBody()``, ``hasHeader()`` and ``getHeaderLine()`` method in ``MessageInterface``.
5757
- Now ``RequestInterface`` extends ``MessageInterface``.
5858
- Now ``ResponseInterface`` extends ``MessageInterface``.
5959
- Added missing ``ResponseInterface::getCSP()`` (and ``Response::getCSP()``), ``ResponseInterface::getReasonPhrase()`` and ``ResponseInterface::getCookieStore()`` methods.

0 commit comments

Comments
 (0)