Skip to content

Commit 3e6bfa1

Browse files
committed
Fix phpunit deprecations
1 parent 8e0d013 commit 3e6bfa1

File tree

2 files changed

+12
-20
lines changed

2 files changed

+12
-20
lines changed

composer.json

+7-8
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,17 @@
1616
}
1717
],
1818
"require": {
19-
"php": "^7.4|^8.0",
20-
"phplrt/source-contracts": "^3.6",
21-
"symfony/deprecation-contracts": "^2.5|^3.0",
22-
"symfony/polyfill-php80": "^1.29"
19+
"php": "^8.1",
20+
"phplrt/source-contracts": "^4.0",
21+
"symfony/deprecation-contracts": "^2.5|^3.0"
2322
},
2423
"autoload": {
2524
"psr-4": {
2625
"Phplrt\\Source\\": "src"
2726
}
2827
},
2928
"require-dev": {
30-
"phpunit/phpunit": "^9.6|^10.0",
29+
"phpunit/phpunit": "^10.5|^11.0",
3130
"psr/http-message": "^1.0|^2.0",
3231
"httpsoft/http-message": "^1.1",
3332
"phpstan/extension-installer": "^1.4",
@@ -40,12 +39,12 @@
4039
}
4140
},
4241
"provide": {
43-
"phplrt/source-contracts-implementation": "^3.6"
42+
"phplrt/source-contracts-implementation": "^4.0"
4443
},
4544
"extra": {
4645
"branch-alias": {
47-
"dev-master": "3.x-dev",
48-
"dev-main": "3.x-dev"
46+
"dev-master": "4.x-dev",
47+
"dev-main": "4.x-dev"
4948
}
5049
},
5150
"config": {

tests/Unit/FileTest.php

+5-12
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,27 @@
66

77
use Phplrt\Contracts\Source\FileInterface;
88
use Phplrt\Contracts\Source\ReadableInterface;
9+
use PHPUnit\Framework\Attributes\DataProvider;
910

1011
class FileTest extends TestCase
1112
{
12-
/**
13-
* @dataProvider provider
14-
*/
13+
#[DataProvider('provider')]
1514
public function testSources(\Closure $factory): void
1615
{
1716
$readable = $factory();
1817

1918
$this->assertSame($this->getSources(), $readable->getContents());
2019
}
2120

22-
/**
23-
* @dataProvider provider
24-
*/
21+
#[DataProvider('provider')]
2522
public function testCloneable(\Closure $factory): void
2623
{
2724
$readable = $factory();
2825

2926
$this->assertSame($this->getSources(), (clone $readable)->getContents());
3027
}
3128

32-
/**
33-
* @dataProvider provider
34-
*/
29+
#[DataProvider('provider')]
3530
public function testSerializable(\Closure $factory): void
3631
{
3732
$readable = $factory();
@@ -48,9 +43,7 @@ public static function filesDataProvider(): array
4843
return \array_filter(static::provider(), $filter);
4944
}
5045

51-
/**
52-
* @dataProvider filesDataProvider
53-
*/
46+
#[DataProvider('filesDataProvider')]
5447
public function testPathname(\Closure $factory): void
5548
{
5649
/** @var ReadableInterface $readable */

0 commit comments

Comments
 (0)