Skip to content

Commit 2703f48

Browse files
committed
Bump psr/http-message version
1 parent 694016e commit 2703f48

File tree

5 files changed

+24
-24
lines changed

5 files changed

+24
-24
lines changed

Tests/Fixtures/Message.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function getProtocolVersion(): string
4242
*
4343
* @return static
4444
*/
45-
public function withProtocolVersion($version)
45+
public function withProtocolVersion($version): MessageInterface
4646
{
4747
throw new \BadMethodCallException('Not implemented.');
4848
}
@@ -72,7 +72,7 @@ public function getHeaderLine($name): string
7272
*
7373
* @return static
7474
*/
75-
public function withHeader($name, $value)
75+
public function withHeader($name, $value): MessageInterface
7676
{
7777
$this->headers[$name] = (array) $value;
7878

@@ -84,7 +84,7 @@ public function withHeader($name, $value)
8484
*
8585
* @return static
8686
*/
87-
public function withAddedHeader($name, $value)
87+
public function withAddedHeader($name, $value): MessageInterface
8888
{
8989
throw new \BadMethodCallException('Not implemented.');
9090
}
@@ -94,7 +94,7 @@ public function withAddedHeader($name, $value)
9494
*
9595
* @return static
9696
*/
97-
public function withoutHeader($name)
97+
public function withoutHeader($name): MessageInterface
9898
{
9999
unset($this->headers[$name]);
100100

@@ -111,7 +111,7 @@ public function getBody(): StreamInterface
111111
*
112112
* @return static
113113
*/
114-
public function withBody(StreamInterface $body)
114+
public function withBody(StreamInterface $body): MessageInterface
115115
{
116116
throw new \BadMethodCallException('Not implemented.');
117117
}

Tests/Fixtures/Response.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function getStatusCode(): int
3636
/**
3737
* @return static
3838
*/
39-
public function withStatus($code, $reasonPhrase = '')
39+
public function withStatus($code, $reasonPhrase = ''): ResponseInterface
4040
{
4141
throw new \BadMethodCallException('Not implemented.');
4242
}

Tests/Fixtures/ServerRequest.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function getRequestTarget(): string
5555
*
5656
* @return static
5757
*/
58-
public function withRequestTarget($requestTarget)
58+
public function withRequestTarget($requestTarget): ServerRequestInterface
5959
{
6060
throw new \BadMethodCallException('Not implemented.');
6161
}
@@ -70,7 +70,7 @@ public function getMethod(): string
7070
*
7171
* @return static
7272
*/
73-
public function withMethod($method)
73+
public function withMethod($method): ServerRequestInterface
7474
{
7575
throw new \BadMethodCallException('Not implemented.');
7676
}
@@ -80,7 +80,7 @@ public function withMethod($method)
8080
*
8181
* @return UriInterface
8282
*/
83-
public function getUri()
83+
public function getUri(): UriInterface
8484
{
8585
return $this->uri;
8686
}
@@ -90,7 +90,7 @@ public function getUri()
9090
*
9191
* @return static
9292
*/
93-
public function withUri(UriInterface $uri, $preserveHost = false)
93+
public function withUri(UriInterface $uri, $preserveHost = false): ServerRequestInterface
9494
{
9595
throw new \BadMethodCallException('Not implemented.');
9696
}
@@ -110,7 +110,7 @@ public function getCookieParams(): array
110110
*
111111
* @return static
112112
*/
113-
public function withCookieParams(array $cookies)
113+
public function withCookieParams(array $cookies): ServerRequestInterface
114114
{
115115
throw new \BadMethodCallException('Not implemented.');
116116
}
@@ -125,7 +125,7 @@ public function getQueryParams(): array
125125
*
126126
* @return static
127127
*/
128-
public function withQueryParams(array $query)
128+
public function withQueryParams(array $query): ServerRequestInterface
129129
{
130130
throw new \BadMethodCallException('Not implemented.');
131131
}
@@ -140,7 +140,7 @@ public function getUploadedFiles(): array
140140
*
141141
* @return static
142142
*/
143-
public function withUploadedFiles(array $uploadedFiles)
143+
public function withUploadedFiles(array $uploadedFiles): ServerRequestInterface
144144
{
145145
throw new \BadMethodCallException('Not implemented.');
146146
}
@@ -160,7 +160,7 @@ public function getParsedBody()
160160
*
161161
* @return static
162162
*/
163-
public function withParsedBody($data)
163+
public function withParsedBody($data): ServerRequestInterface
164164
{
165165
throw new \BadMethodCallException('Not implemented.');
166166
}
@@ -185,7 +185,7 @@ public function getAttribute($name, $default = null)
185185
*
186186
* @return static
187187
*/
188-
public function withAttribute($name, $value)
188+
public function withAttribute($name, $value): ServerRequestInterface
189189
{
190190
throw new \BadMethodCallException('Not implemented.');
191191
}
@@ -195,7 +195,7 @@ public function withAttribute($name, $value)
195195
*
196196
* @return static
197197
*/
198-
public function withoutAttribute($name)
198+
public function withoutAttribute($name): ServerRequestInterface
199199
{
200200
throw new \BadMethodCallException('Not implemented.');
201201
}

Tests/Fixtures/Uri.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function getFragment(): string
9898
*
9999
* @return static
100100
*/
101-
public function withScheme($scheme)
101+
public function withScheme($scheme): UriInterface
102102
{
103103
throw new \BadMethodCallException('Not implemented.');
104104
}
@@ -108,7 +108,7 @@ public function withScheme($scheme)
108108
*
109109
* @return static
110110
*/
111-
public function withUserInfo($user, $password = null)
111+
public function withUserInfo($user, $password = null): UriInterface
112112
{
113113
throw new \BadMethodCallException('Not implemented.');
114114
}
@@ -118,7 +118,7 @@ public function withUserInfo($user, $password = null)
118118
*
119119
* @return static
120120
*/
121-
public function withHost($host)
121+
public function withHost($host): UriInterface
122122
{
123123
throw new \BadMethodCallException('Not implemented.');
124124
}
@@ -128,7 +128,7 @@ public function withHost($host)
128128
*
129129
* @return static
130130
*/
131-
public function withPort($port)
131+
public function withPort($port): UriInterface
132132
{
133133
throw new \BadMethodCallException('Not implemented.');
134134
}
@@ -138,7 +138,7 @@ public function withPort($port)
138138
*
139139
* @return static
140140
*/
141-
public function withPath($path)
141+
public function withPath($path): UriInterface
142142
{
143143
throw new \BadMethodCallException('Not implemented.');
144144
}
@@ -148,7 +148,7 @@ public function withPath($path)
148148
*
149149
* @return static
150150
*/
151-
public function withQuery($query)
151+
public function withQuery($query): UriInterface
152152
{
153153
throw new \BadMethodCallException('Not implemented.');
154154
}
@@ -158,7 +158,7 @@ public function withQuery($query)
158158
*
159159
* @return static
160160
*/
161-
public function withFragment($fragment)
161+
public function withFragment($fragment): UriInterface
162162
{
163163
throw new \BadMethodCallException('Not implemented.');
164164
}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
],
1818
"require": {
1919
"php": ">=7.2.5",
20-
"psr/http-message": "^1.0",
20+
"psr/http-message": "^1.0 || ^2.0",
2121
"symfony/http-foundation": "^5.4 || ^6.0"
2222
},
2323
"require-dev": {

0 commit comments

Comments
 (0)