File tree Expand file tree Collapse file tree 5 files changed +44
-36
lines changed Expand file tree Collapse file tree 5 files changed +44
-36
lines changed Original file line number Diff line number Diff line change 7
7
runs-on : ubuntu-latest
8
8
9
9
steps :
10
- - uses : actions/checkout@v2
10
+ - uses : actions/checkout@v3
11
11
12
12
- name : Cache Composer dependencies
13
- uses : actions/cache@v2
13
+ uses : actions/cache@v3
14
14
with :
15
15
path : /tmp/composer-cache
16
16
key : ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
17
17
18
- - uses : php-actions/composer@v5
18
+ - name : Composer
19
+ uses : php-actions/composer@v6
20
+ with :
21
+ php_version : ' 8.1'
19
22
20
23
- name : Archive build
21
24
run : mkdir /tmp/github-actions/ && tar -cvf /tmp/github-actions/build.tar ./
22
25
23
26
- name : Upload build archive for test runners
24
- uses : actions/upload-artifact@v2
27
+ uses : actions/upload-artifact@v3
25
28
with :
26
29
name : build-artifact
27
30
path : /tmp/github-actions
31
34
needs : [composer]
32
35
33
36
steps :
34
- - uses : actions/download-artifact@v2
37
+ - uses : actions/download-artifact@v3
35
38
with :
36
39
name : build-artifact
37
40
path : /tmp/github-actions
42
45
- name : PHP Unit tests
43
46
uses : php-actions/phpunit@v3
44
47
with :
45
- php_version : 8.0
48
+ php_version : ' 8.1 '
46
49
php_extensions : xdebug
47
50
memory_limit : 256M
48
51
configuration : test/phpunit/phpunit.xml
53
56
needs : [composer]
54
57
55
58
steps :
56
- - uses : actions/download-artifact@v2
59
+ - uses : actions/download-artifact@v3
57
60
with :
58
61
name : build-artifact
59
62
path : /tmp/github-actions
64
67
- name : PHP Static Analysis
65
68
uses : php-actions/phpstan@v3
66
69
with :
70
+ php_version : ' 8.1'
67
71
path : src/
68
72
level : 6
Original file line number Diff line number Diff line change 1
1
build :
2
2
environment :
3
- php : 8.0 .0
3
+ php : 8.1 .0
4
4
5
5
nodes :
6
6
analysis :
@@ -29,4 +29,4 @@ checks:
29
29
filter :
30
30
excluded_paths :
31
31
- test/*
32
- - vendor/*
32
+ - vendor/*
Original file line number Diff line number Diff line change 4
4
"license" : " MIT" ,
5
5
6
6
"require" : {
7
- "php" : " >=8.0 " ,
7
+ "php" : " >=8.1 " ,
8
8
"phpgt/input" : " ^v1" ,
9
9
"psr/http-message" : " ^v1.0.1" ,
10
10
"willdurand/negotiation" : " v3.1.0"
Original file line number Diff line number Diff line change 5
5
use Psr \Http \Message \StreamInterface ;
6
6
7
7
trait Message {
8
- protected Headers $ headers ;
8
+ public readonly Headers $ headers ;
9
9
protected string $ protocol ;
10
10
protected StreamInterface $ stream ;
11
11
@@ -17,7 +17,7 @@ trait Message {
17
17
* @return string HTTP protocol version.
18
18
*/
19
19
public function getProtocolVersion ():string {
20
- if (strstr ($ this ->protocol , "/ " )) {
20
+ if (str_contains ($ this ->protocol , "/ " )) {
21
21
return substr (
22
22
$ this ->protocol ,
23
23
strpos ($ this ->protocol , "/ " ) + 1
@@ -41,7 +41,7 @@ public function getProtocolVersion():string {
41
41
* @return static
42
42
* @throws InvalidProtocolHttpException
43
43
*/
44
- public function withProtocolVersion ($ version ) {
44
+ public function withProtocolVersion ($ version ): self {
45
45
if (!is_numeric ($ version )) {
46
46
throw new InvalidProtocolHttpException ($ version );
47
47
}
You can’t perform that action at this time.
0 commit comments