File tree 7 files changed +14
-10
lines changed
7 files changed +14
-10
lines changed Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
2
<phive xmlns =" https://phar.io/phive" >
3
- <phar name =" phpstan" version =" 1.10.22 " installed =" 1.10.22 " location =" ./tools/phpstan" copy =" false" />
4
- <phar name =" psalm" version =" 5.13.1 " installed =" 5.13.1 " location =" ./tools/psalm" copy =" false" />
3
+ <phar name =" phpstan" version =" 1.11.7 " installed =" 1.11.7 " location =" ./tools/phpstan" copy =" false" />
4
+ <phar name =" psalm" version =" 5.25.0 " installed =" 5.25.0 " location =" ./tools/psalm" copy =" false" />
5
5
</phive >
Original file line number Diff line number Diff line change 30
30
},
31
31
"require-dev" : {
32
32
"cakephp/cakephp-codesniffer" : " ^5.0" ,
33
- "phpunit/phpunit" : " ^10.1.0"
33
+ "phpunit/phpunit" : " ^10.1.0 || ^11.1.3 "
34
34
},
35
35
"provide" : {
36
36
"psr/clock-implementation" : " 1.0"
Original file line number Diff line number Diff line change 1
1
parameters :
2
2
level : 8
3
- checkMissingIterableValueType : false
4
- checkGenericClassInNonGenericObjectType : false
5
3
treatPhpDocTypesAsCertain : false
6
4
bootstrapFiles :
7
5
- tests/bootstrap.php
8
6
paths :
9
7
- src/
8
+ ignoreErrors :
9
+ - identifier : missingType.iterableValue
Original file line number Diff line number Diff line change 20
20
use DateTimeImmutable ;
21
21
use DateTimeZone ;
22
22
use InvalidArgumentException ;
23
+ use PHPUnit \Framework \Attributes \DataProvider ;
23
24
24
25
/**
25
26
* Test constructors for Date objects.
@@ -68,9 +69,9 @@ public static function inputTimeProvider()
68
69
}
69
70
70
71
/**
71
- * @dataProvider inputTimeProvider
72
72
* @return void
73
73
*/
74
+ #[DataProvider('inputTimeProvider ' )]
74
75
public function testConstructWithTimeParts ($ time )
75
76
{
76
77
$ date = new ChronosDate ($ time );
Original file line number Diff line number Diff line change 19
19
use Cake \Chronos \Test \TestCase \TestCase ;
20
20
use Closure ;
21
21
use DatePeriod ;
22
+ use PHPUnit \Framework \Attributes \DataProvider ;
22
23
23
24
class DiffTest extends TestCase
24
25
{
@@ -322,9 +323,9 @@ public static function diffForHumansProvider()
322
323
}
323
324
324
325
/**
325
- * @dataProvider diffForHumansProvider
326
326
* @return void
327
327
*/
328
+ #[DataProvider('diffForHumansProvider ' )]
328
329
public function testDiffForHumansRelative ($ now , $ date , $ expected )
329
330
{
330
331
$ this ->assertSame ($ expected , $ now ->diffForHumans ($ date ));
Original file line number Diff line number Diff line change 20
20
use Closure ;
21
21
use DatePeriod ;
22
22
use DateTimeZone ;
23
+ use PHPUnit \Framework \Attributes \DataProvider ;
23
24
24
25
class DiffTest extends TestCase
25
26
{
@@ -584,9 +585,9 @@ public static function diffForHumansProvider()
584
585
}
585
586
586
587
/**
587
- * @dataProvider diffForHumansProvider
588
588
* @return void
589
589
*/
590
+ #[DataProvider('diffForHumansProvider ' )]
590
591
public function testDiffForHumansRelative ($ now , $ date , $ expected )
591
592
{
592
593
$ this ->assertSame ($ expected , $ now ->diffForHumans ($ date ));
Original file line number Diff line number Diff line change 18
18
use Cake \Chronos \Chronos ;
19
19
use Cake \Chronos \Test \TestCase \TestCase ;
20
20
use DateTime ;
21
+ use PHPUnit \Framework \Attributes \DataProvider ;
21
22
22
23
class StringsTest extends TestCase
23
24
{
@@ -180,9 +181,9 @@ public static function toQuarterProvider()
180
181
/**
181
182
* testToQuarter method
182
183
*
183
- * @dataProvider toQuarterProvider
184
184
* @return void
185
185
*/
186
+ #[DataProvider('toQuarterProvider ' )]
186
187
public function testToQuarter ($ date , $ expected , $ range = false )
187
188
{
188
189
$ this ->assertSame ($ expected , (new Chronos ($ date ))->toQuarter ($ range ));
@@ -206,9 +207,9 @@ public static function toWeekProvider()
206
207
/**
207
208
* testToWeek method
208
209
*
209
- * @dataProvider toWeekProvider
210
210
* @return void
211
211
*/
212
+ #[DataProvider('toWeekProvider ' )]
212
213
public function testToWeek ($ date , $ expected )
213
214
{
214
215
$ this ->assertSame ($ expected , (new Chronos ($ date ))->toWeek ());
You can’t perform that action at this time.
0 commit comments