Skip to content

Commit 370d696

Browse files
committed
Upgrade to PHPUnit 13
1 parent ff0536b commit 370d696

22 files changed

Lines changed: 209 additions & 1010 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

.github/workflows/code-quality.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,5 @@ jobs:
4444
with:
4545
composer-options: '--prefer-dist'
4646

47-
- name: Install PHPUnit Dependencies
48-
run: vendor/bin/simple-phpunit install
49-
5047
- name: Run PHPStan
5148
run: phpstan analyse --no-progress

.github/workflows/tests.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,8 @@ jobs:
5151
composer-options: '--prefer-dist'
5252
dependency-versions: ${{ matrix.dependencies }}
5353

54-
- name: Install PHPUnit Dependencies
55-
run: vendor/bin/simple-phpunit install
56-
5754
- name: Run PHPUnit
58-
run: vendor/bin/simple-phpunit -v --coverage-text --coverage-clover=coverage.xml
55+
run: vendor/bin/phpunit -v --coverage-text --coverage-clover=coverage.xml
5956

6057
- name: Upload Coverage to Codecov
6158
if: ${{ success() }}

.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: 2 additions & 2 deletions
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": "^10.5 || ^11.5 || ^12.5 || ^13.1"
3131
},
3232
"autoload": {
3333
"psr-4": {
@@ -42,7 +42,7 @@
4242
"scripts": {
4343
"run-checks": [
4444
"php-cs-fixer fix -vvv",
45-
"simple-phpunit",
45+
"phpunit",
4646
"phpstan analyse"
4747
]
4848
},

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>

0 commit comments

Comments
 (0)