Skip to content

Commit 167eb77

Browse files
committed
Allow PHPUnit 11 and parallel code style analysis
1 parent 429c9a0 commit 167eb77

File tree

4 files changed

+8
-15
lines changed

4 files changed

+8
-15
lines changed

PhpCsFixer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
$config = new PhpCsFixer\Config();
44

55
return $config
6+
->setParallelConfig(new PhpCsFixer\Runner\Parallel\ParallelConfig(4, 20))
67
->setRiskyAllowed(true)
78
->setIndent("\t")
89
->setLineEnding("\r\n")

composer.json

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,16 @@
1212
}
1313
],
1414
"require": {
15-
"php": ">=8.0 <8.4",
16-
"nikic/php-parser": "^5.0"
17-
},
18-
"autoload": {
19-
"psr-4": {"PHPFUI\\PHPUnitSyntaxCoverage\\": "src/PHPFUI/PHPUnitSyntaxCoverage/"}
15+
"php": ">=8.0 <8.4"
2016
},
2117
"autoload-dev": {
22-
"psr-4": {"badPHP\\": "tests/"}
18+
"psr-4": {"PHPFUI\\PHPUnitSyntaxCoverage\\": "src/PHPFUI/PHPUnitSyntaxCoverage/", "badPHP\\": "tests/"}
2319
},
2420
"require-dev": {
25-
"phpunit/phpunit": "<11.0",
21+
"nikic/php-parser": "^5.0",
22+
"phpunit/phpunit": "<12.0",
2623
"roave/security-advisories": "dev-latest",
27-
"friendsofphp/php-cs-fixer": "^3.0",
24+
"friendsofphp/php-cs-fixer": "^3.64",
2825
"symfony/translation-contracts": ">=2.3",
2926
"phpstan/phpstan": "^1.8"
3027
}

phpunit.xml.dist

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

33
<phpunit backupGlobals="false"
4-
backupStaticAttributes="false"
54
colors="true"
6-
convertErrorsToExceptions="true"
7-
convertNoticesToExceptions="true"
8-
convertWarningsToExceptions="true"
9-
convertDeprecationsToExceptions="true"
5+
stopOnDeprecation="true"
106
processIsolation="false"
117
stopOnFailure="false"
128
bootstrap="./tests/bootstrap.php"

tests/UnitTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,8 @@ public function testVendorDirectory() : void
4848
$this->skipNamespaceTesting();
4949
// Sloppy coding from various packages causes us to have to skip directories. If only they used PHPUnitSyntaxCoverage they would have detected these issues!
5050
$this->addSkipDirectory('DependencyInjection'); // these components don't work due to missing dependencies. Unbelievable for Symfony
51-
$this->addSkipDirectory('http-foundation');
52-
$this->addSkipDirectory('DataCollector');
5351
$this->addSkipDirectory('console');
52+
$this->addSkipDirectory('php-cs-fixer.d');
5453
$this->assertValidPHPDirectory(__DIR__ . '/../vendor', 'Vendor directory is not valid');
5554
}
5655
}

0 commit comments

Comments
 (0)