File tree Expand file tree Collapse file tree 11 files changed +106
-71
lines changed Expand file tree Collapse file tree 11 files changed +106
-71
lines changed Original file line number Diff line number Diff line change 16
16
17
17
strategy :
18
18
matrix :
19
- php_version : ['8.1', '8.2']
19
+ php_version : ['8.1', '8.2', '8.3' ]
20
20
21
21
steps :
22
22
- uses : actions/checkout@v3
Original file line number Diff line number Diff line change 11
11
"type" : " library" ,
12
12
"require" : {
13
13
"php" : " ^8.1" ,
14
- "illuminate/collections" : " ^8 .0|^9 .0|^10 .0" ,
15
- "illuminate/http" : " ^8 .0|^9 .0|^10 .0" ,
16
- "illuminate/support" : " ^8 .0|^9 .0|^10 .0"
14
+ "illuminate/collections" : " ^9 .0|^10 .0|^11 .0" ,
15
+ "illuminate/http" : " ^9 .0|^10 .0|^11 .0" ,
16
+ "illuminate/support" : " ^9 .0|^10 .0|^11 .0"
17
17
},
18
18
"require-dev" : {
19
19
"phpunit/phpunit" : " ^9.5|^10.0" ,
20
- "orchestra/testbench" : " ^7.0|^8.0" ,
20
+ "orchestra/testbench" : " ^7.0|^8.0|^9.0|^10.0 " ,
21
21
"phpstan/phpstan" : " ^1.9.18"
22
22
},
23
23
"license" : " MIT" ,
Original file line number Diff line number Diff line change @@ -6,4 +6,7 @@ parameters:
6
6
- tests/app/migrations.php
7
7
- tests/app/routes.php
8
8
level : 6
9
- checkGenericClassInNonGenericObjectType : false
9
+
10
+ ignoreErrors :
11
+ -
12
+ identifier : missingType.generics
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
2
<phpunit xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
3
- xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/10.0 /phpunit.xsd"
3
+ xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/10.5 /phpunit.xsd"
4
4
bootstrap =" vendor/autoload.php"
5
5
executionOrder =" depends,defects"
6
6
failOnRisky =" true"
7
- failOnWarning =" true" >
8
- <testsuites >
9
- <testsuite name =" Unit" >
10
- <directory >tests/Unit</directory >
11
- </testsuite >
12
- <testsuite name =" Feature" >
13
- <directory >tests/Feature</directory >
14
- </testsuite >
15
- </testsuites >
16
- <coverage >
17
- <include >
18
- <directory suffix =" .php" >src</directory >
19
- </include >
20
- </coverage >
21
- <php >
22
- <env name =" DB_CONNECTION" value =" sqlite" />
23
- <env name =" DB_DATABASE" value =" :memory:" />
24
- </php >
7
+ failOnWarning =" true"
8
+ >
9
+ <testsuites >
10
+ <testsuite name =" Unit" >
11
+ <directory >tests/Unit</directory >
12
+ </testsuite >
13
+ <testsuite name =" Feature" >
14
+ <directory >tests/Feature</directory >
15
+ </testsuite >
16
+ </testsuites >
17
+ <php >
18
+ <env name =" DB_CONNECTION" value =" sqlite" />
19
+ <env name =" DB_DATABASE" value =" :memory:" />
20
+ </php >
21
+ <source >
22
+ <include >
23
+ <directory suffix =" .php" >src</directory >
24
+ </include >
25
+ </source >
25
26
</phpunit >
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
2
<phpunit xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
3
- xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/10.0 /phpunit.xsd"
3
+ xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/10.5 /phpunit.xsd"
4
4
bootstrap =" vendor/autoload.php"
5
5
executionOrder =" depends,defects"
6
6
failOnRisky =" true"
7
- failOnWarning =" true" >
8
- <testsuites >
9
- <testsuite name =" Unit" >
10
- <directory >tests/Unit</directory >
11
- </testsuite >
12
- <testsuite name =" Feature" >
13
- <directory >tests/Feature</directory >
14
- </testsuite >
15
- </testsuites >
16
- <coverage >
17
- <include >
18
- <directory suffix =" .php" >src</directory >
19
- </include >
20
- </coverage >
21
- <php >
22
- <env name =" DB_CONNECTION" value =" sqlite" />
23
- <env name =" DB_DATABASE" value =" :memory:" />
24
- </php >
7
+ failOnWarning =" true"
8
+ >
9
+ <testsuites >
10
+ <testsuite name =" Unit" >
11
+ <directory >tests/Unit</directory >
12
+ </testsuite >
13
+ <testsuite name =" Feature" >
14
+ <directory >tests/Feature</directory >
15
+ </testsuite >
16
+ </testsuites >
17
+ <php >
18
+ <env name =" DB_CONNECTION" value =" sqlite" />
19
+ <env name =" DB_DATABASE" value =" :memory:" />
20
+ </php >
21
+ <source >
22
+ <include >
23
+ <directory suffix =" .php" >src</directory >
24
+ </include >
25
+ </source >
25
26
</phpunit >
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <phpunit xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
3
+ xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/10.5/phpunit.xsd"
4
+ bootstrap =" vendor/autoload.php"
5
+ executionOrder =" depends,defects"
6
+ failOnRisky =" true"
7
+ failOnWarning =" true"
8
+ >
9
+ <testsuites >
10
+ <testsuite name =" Unit" >
11
+ <directory >tests/Unit</directory >
12
+ </testsuite >
13
+ <testsuite name =" Feature" >
14
+ <directory >tests/Feature</directory >
15
+ </testsuite >
16
+ </testsuites >
17
+ <php >
18
+ <env name =" DB_CONNECTION" value =" sqlite" />
19
+ <env name =" DB_DATABASE" value =" :memory:" />
20
+ </php >
21
+ <source >
22
+ <include >
23
+ <directory suffix =" .php" >src</directory >
24
+ </include >
25
+ </source >
26
+ </phpunit >
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
2
<phpunit xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
3
- xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/10.0 /phpunit.xsd"
3
+ xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/10.5 /phpunit.xsd"
4
4
bootstrap =" vendor/autoload.php"
5
5
executionOrder =" depends,defects"
6
6
failOnRisky =" true"
7
- failOnWarning =" true" >
8
- <testsuites >
9
- <testsuite name =" Unit" >
10
- <directory >tests/Unit</directory >
11
- </testsuite >
12
- <testsuite name =" Feature" >
13
- <directory >tests/Feature</directory >
14
- </testsuite >
15
- </testsuites >
16
- <coverage >
17
- <include >
18
- <directory suffix =" .php" >src</directory >
19
- </include >
20
- </coverage >
21
- <php >
22
- <env name =" DB_CONNECTION" value =" sqlite" />
23
- <env name =" DB_DATABASE" value =" :memory:" />
24
- </php >
7
+ failOnWarning =" true"
8
+ >
9
+ <testsuites >
10
+ <testsuite name =" Unit" >
11
+ <directory >tests/Unit</directory >
12
+ </testsuite >
13
+ <testsuite name =" Feature" >
14
+ <directory >tests/Feature</directory >
15
+ </testsuite >
16
+ </testsuites >
17
+ <php >
18
+ <env name =" DB_CONNECTION" value =" sqlite" />
19
+ <env name =" DB_DATABASE" value =" :memory:" />
20
+ </php >
21
+ <source >
22
+ <include >
23
+ <directory suffix =" .php" >src</directory >
24
+ </include >
25
+ </source >
25
26
</phpunit >
Original file line number Diff line number Diff line change @@ -144,9 +144,9 @@ public function forRelation(string $relation): self
144
144
public function toArray (mixed $ request , bool $ included = true ): array
145
145
{
146
146
$ value = $ this ->whenIncluded && !$ included
147
- ? new MissingValue
148
- : value ($ this ->value )
149
- ?? new MissingValue ;
147
+ ? null
148
+ : value ($ this ->value );
149
+ $ value ??= new MissingValue ;
150
150
151
151
if ($ this ->asCollection && !is_subclass_of ($ this ->resource , ResourceCollection::class)) {
152
152
$ resource = $ this ->resource ::collection ($ value );
Original file line number Diff line number Diff line change @@ -23,10 +23,13 @@ protected function defineRoutes($router)
23
23
include __DIR__ . '/../app/routes.php ' ;
24
24
}
25
25
26
- protected function afterRefreshingDatabase ()
26
+ protected function beforeRefreshingDatabase ()
27
27
{
28
28
$ this ->loadMigrationsFrom (__DIR__ . '/../app/migrations.php ' );
29
+ }
29
30
31
+ protected function afterRefreshingDatabase ()
32
+ {
30
33
self ::loadSeed ();
31
34
}
32
35
Original file line number Diff line number Diff line change @@ -126,11 +126,11 @@ public function testShowMultipleFailures()
126
126
$ response ->assertUnprocessable ();
127
127
$ response ->assertJsonValidationErrors (['include ' => [
128
128
'The selected include is invalid. ' ,
129
- '"posts" doesn \'t have relationship "one" ' ,
130
- '"user" doesn \'t have relationship "two" ' ,
129
+ '"posts" doesn \'t have relationship "one". ' ,
130
+ '"user" doesn \'t have relationship "two". ' ,
131
131
], 'fields ' => [
132
132
'The selected fields is invalid. ' ,
133
- '"user" doesn \'t have relationship "one_field" ' ,
133
+ '"user" doesn \'t have fields "one_field". ' ,
134
134
'"unknown" doesn \'t exists. ' ,
135
135
]]);
136
136
}
You can’t perform that action at this time.
0 commit comments