Skip to content

Commit c8f5e0a

Browse files
committed
Upgrade to PHPUnit 13
1 parent ff0536b commit c8f5e0a

20 files changed

Lines changed: 207 additions & 1002 deletions

.gitattributes

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,4 @@
55
/.gitignore export-ignore
66
/.php-cs-fixer.dist.php export-ignore
77
/phpstan.dist.neon export-ignore
8-
/phpstan-autoload.php export-ignore
9-
/phpunit.xml.dist export-ignore
10-
/phpunit-deprecation-baseline.json export-ignore
8+
/phpunit.dist.xml export-ignore

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ composer.lock
33
vendor/
44

55
# PHP Coding Standards Fixer
6-
.php-cs-fixer.php
76
.php-cs-fixer.cache
7+
.php-cs-fixer.php
88

99
# PHPStan
1010
phpstan.neon
1111

1212
# PHPUnit
13-
.phpunit.result.cache
13+
.phpunit.cache
1414
phpunit.xml

.php-cs-fixer.dist.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
->setUsingCache(true)
1313
->setRules([
1414
'@PHP8x1Migration' => true,
15-
'@PHPUnit10x0Migration:risky' => true,
15+
'@PHPUnit11x0Migration:risky' => true,
1616
'@Symfony' => true,
1717
'@Symfony:risky' => true,
1818
'declare_strict_types' => true,
1919
'heredoc_to_nowdoc' => true,
2020
'no_superfluous_phpdoc_tags' => true,
21-
'php_unit_test_case_static_method_calls' => ['call_type' => 'self'],
21+
'php_unit_test_case_static_method_calls' => ['call_type' => 'self', 'target' => '11.0'],
2222
'self_static_accessor' => true,
2323
'single_line_throw' => false,
2424
'trailing_comma_in_multiline' => [

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"symfony/yaml": "^6.4 || ^7.4 || ^8.0"
2828
},
2929
"require-dev": {
30-
"symfony/phpunit-bridge": "^8.0"
30+
"phpunit/phpunit": "^11.5 || ^12.5 || ^13.1"
3131
},
3232
"autoload": {
3333
"psr-4": {

phpstan-autoload.php

Lines changed: 0 additions & 42 deletions
This file was deleted.

phpstan.dist.neon

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ parameters:
33
paths:
44
- src
55
- tests
6-
bootstrapFiles:
7-
- phpstan-autoload.php
86
ignoreErrors:
97
-
108
message: '#^Call to an undefined method Symfony\\Component\\Config\\Definition\\Builder\\NodeDefinition\:\:children\(\)\.$#'

phpunit-deprecation-baseline.json

Lines changed: 0 additions & 757 deletions
This file was deleted.

phpunit.dist.xml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!-- https://phpunit.readthedocs.io/en/13.1/configuration.html -->
3+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
5+
beStrictAboutOutputDuringTests="true"
6+
bootstrap="vendor/autoload.php"
7+
cacheDirectory=".phpunit.cache"
8+
colors="true"
9+
failOnEmptyTestSuite="true"
10+
failOnIncomplete="true"
11+
failOnNotice="true"
12+
failOnPhpunitDeprecation="true"
13+
failOnPhpunitNotice="true"
14+
failOnRisky="true"
15+
failOnWarning="true"
16+
>
17+
<testsuites>
18+
<testsuite name="Bizkit VersioningBundle Test Suite">
19+
<directory>tests</directory>
20+
</testsuite>
21+
</testsuites>
22+
23+
<source>
24+
<include>
25+
<directory>src</directory>
26+
</include>
27+
<exclude>
28+
<directory>src/Exception</directory>
29+
</exclude>
30+
</source>
31+
</phpunit>

phpunit.xml.dist

Lines changed: 0 additions & 31 deletions
This file was deleted.

tests/Command/IncrementCommandTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,11 @@
1111
use Bizkit\VersioningBundle\VCS\GitHandler;
1212
use Bizkit\VersioningBundle\VCS\TaggingMode;
1313
use Bizkit\VersioningBundle\Writer\YamlFileWriter;
14+
use PHPUnit\Framework\Attributes\CoversClass;
1415
use Symfony\Component\Console\Tester\CommandTester;
1516
use Symfony\Component\Yaml\Yaml;
1617

17-
/**
18-
* @covers \Bizkit\VersioningBundle\Command\IncrementCommand
19-
*/
18+
#[CoversClass(IncrementCommand::class)]
2019
final class IncrementCommandTest extends TestCase
2120
{
2221
private string $validFile;

0 commit comments

Comments
 (0)