Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow phpunit 11 #455

Merged
merged 2 commits into from
Jul 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .phive/phars.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="phpstan" version="1.10.22" installed="1.10.22" location="./tools/phpstan" copy="false"/>
<phar name="psalm" version="5.13.1" installed="5.13.1" location="./tools/psalm" copy="false"/>
<phar name="phpstan" version="1.11.7" installed="1.11.7" location="./tools/phpstan" copy="false"/>
<phar name="psalm" version="5.25.0" installed="5.25.0" location="./tools/psalm" copy="false"/>
</phive>
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
"require-dev": {
"cakephp/cakephp-codesniffer": "^5.0",
"phpunit/phpunit": "^10.1.0"
"phpunit/phpunit": "^10.1.0 || ^11.1.3"
},
"provide": {
"psr/clock-implementation": "1.0"
Expand Down
4 changes: 2 additions & 2 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
parameters:
level: 8
checkMissingIterableValueType: false
checkGenericClassInNonGenericObjectType: false
treatPhpDocTypesAsCertain: false
bootstrapFiles:
- tests/bootstrap.php
paths:
- src/
ignoreErrors:
- identifier: missingType.iterableValue
3 changes: 2 additions & 1 deletion tests/TestCase/Date/ConstructTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
use DateTimeImmutable;
use DateTimeZone;
use InvalidArgumentException;
use PHPUnit\Framework\Attributes\DataProvider;

/**
* Test constructors for Date objects.
Expand Down Expand Up @@ -68,9 +69,9 @@ public static function inputTimeProvider()
}

/**
* @dataProvider inputTimeProvider
* @return void
*/
#[DataProvider('inputTimeProvider')]
public function testConstructWithTimeParts($time)
{
$date = new ChronosDate($time);
Expand Down
3 changes: 2 additions & 1 deletion tests/TestCase/Date/DiffTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use Cake\Chronos\Test\TestCase\TestCase;
use Closure;
use DatePeriod;
use PHPUnit\Framework\Attributes\DataProvider;

class DiffTest extends TestCase
{
Expand Down Expand Up @@ -322,9 +323,9 @@ public static function diffForHumansProvider()
}

/**
* @dataProvider diffForHumansProvider
* @return void
*/
#[DataProvider('diffForHumansProvider')]
public function testDiffForHumansRelative($now, $date, $expected)
{
$this->assertSame($expected, $now->diffForHumans($date));
Expand Down
3 changes: 2 additions & 1 deletion tests/TestCase/DateTime/DiffTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
use Closure;
use DatePeriod;
use DateTimeZone;
use PHPUnit\Framework\Attributes\DataProvider;

class DiffTest extends TestCase
{
Expand Down Expand Up @@ -584,9 +585,9 @@ public static function diffForHumansProvider()
}

/**
* @dataProvider diffForHumansProvider
* @return void
*/
#[DataProvider('diffForHumansProvider')]
public function testDiffForHumansRelative($now, $date, $expected)
{
$this->assertSame($expected, $now->diffForHumans($date));
Expand Down
5 changes: 3 additions & 2 deletions tests/TestCase/DateTime/StringsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use Cake\Chronos\Chronos;
use Cake\Chronos\Test\TestCase\TestCase;
use DateTime;
use PHPUnit\Framework\Attributes\DataProvider;

class StringsTest extends TestCase
{
Expand Down Expand Up @@ -180,9 +181,9 @@ public static function toQuarterProvider()
/**
* testToQuarter method
*
* @dataProvider toQuarterProvider
* @return void
*/
#[DataProvider('toQuarterProvider')]
public function testToQuarter($date, $expected, $range = false)
{
$this->assertSame($expected, (new Chronos($date))->toQuarter($range));
Expand All @@ -206,9 +207,9 @@ public static function toWeekProvider()
/**
* testToWeek method
*
* @dataProvider toWeekProvider
* @return void
*/
#[DataProvider('toWeekProvider')]
public function testToWeek($date, $expected)
{
$this->assertSame($expected, (new Chronos($date))->toWeek());
Expand Down
Loading