Skip to content

Commit 019b0fb

Browse files
authored
Add PHP 8.1 to CI and bump dev dependencies (#475)
1 parent 453b097 commit 019b0fb

File tree

11 files changed

+19
-23
lines changed

11 files changed

+19
-23
lines changed

.github/workflows/coding-standards.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ jobs:
1313
coding-standards:
1414
name: "Coding Standards"
1515
uses: "doctrine/.github/.github/workflows/[email protected]"
16+
with:
17+
php-version: "8.1"

.github/workflows/continuous-integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ jobs:
1414
name: "PHPUnit"
1515
uses: "doctrine/.github/.github/workflows/[email protected]"
1616
with:
17-
php-versions: '["7.2", "7.3", "7.4", "8.0"]'
17+
php-versions: '["7.2", "7.3", "7.4", "8.0", "8.1"]'

.github/workflows/static-analysis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ jobs:
1313
static-analysis:
1414
name: "Static Analysis"
1515
uses: "doctrine/.github/.github/workflows/[email protected]"
16+
with:
17+
php-version: "8.1"

DependencyInjection/Configuration.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function getConfigTreeBuilder(): TreeBuilder
5959
->useAttributeAsKey('service')
6060
->defaultValue([])
6161
->validate()
62-
->ifTrue(static function ($v): bool {
62+
->ifTrue(static function (array $v): bool {
6363
return count(array_filter(array_keys($v), static function (string $doctrineService): bool {
6464
return strpos($doctrineService, 'Doctrine\Migrations\\') !== 0;
6565
})) !== 0;
@@ -74,7 +74,7 @@ public function getConfigTreeBuilder(): TreeBuilder
7474
->useAttributeAsKey('factory')
7575
->defaultValue([])
7676
->validate()
77-
->ifTrue(static function ($v): bool {
77+
->ifTrue(static function (array $v): bool {
7878
return count(array_filter(array_keys($v), static function (string $doctrineService): bool {
7979
return strpos($doctrineService, 'Doctrine\Migrations\\') !== 0;
8080
})) !== 0;

DependencyInjection/DoctrineMigrationsExtension.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ class DoctrineMigrationsExtension extends Extension
3737
* Responds to the migrations configuration parameter.
3838
*
3939
* @param mixed[][] $configs
40-
*
4140
* @psalm-param array<string, array<string, array<string, array<string, string>|string>|string>> $configs
4241
*/
4342
public function load(array $configs, ContainerBuilder $container): void

Tests/DependencyInjection/DoctrineCommandsTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ public function testCommandRegistered(string $name, string $instance): void
4747

4848
/**
4949
* @return string[][]
50-
*
5150
* @psalm-return list<array{string, class-string<DoctrineCommand>}>
5251
*/
5352
public function getCommands(): array

composer.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@
2626
"doctrine/migrations": "^3.2"
2727
},
2828
"require-dev": {
29-
"phpunit/phpunit": "^8.0|^9.0",
30-
"doctrine/coding-standard": "^8.0",
31-
"phpstan/phpstan": "^0.12",
32-
"phpstan/phpstan-deprecation-rules": "^0.12",
33-
"phpstan/phpstan-phpunit": "^0.12",
34-
"phpstan/phpstan-strict-rules": "^0.12",
29+
"phpunit/phpunit": "^8.5|^9.5",
30+
"doctrine/coding-standard": "^9",
31+
"phpstan/phpstan": "^1.4",
32+
"phpstan/phpstan-deprecation-rules": "^1",
33+
"phpstan/phpstan-phpunit": "^1",
34+
"phpstan/phpstan-strict-rules": "^1.1",
3535
"doctrine/orm": "^2.6",
3636
"doctrine/persistence": "^1.3||^2.0",
37-
"vimeo/psalm": "^4.11"
37+
"vimeo/psalm": "^4.22"
3838
},
3939
"autoload": {
4040
"psr-4": { "Doctrine\\Bundle\\MigrationsBundle\\": "" },

phpcs.xml.dist

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
<!-- Ignore warnings, show progress of the run and show sniff names -->
1010
<arg value="nps"/>
1111

12+
<config name="php_version" value="70200"/>
13+
1214
<file>DependencyInjection</file>
1315
<file>Tests</file>
1416

@@ -23,4 +25,3 @@
2325
</properties>
2426
</rule>
2527
</ruleset>
26-

phpstan.neon.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
parameters:
22
level: 7
3+
phpVersion: 80100
34
paths:
45
- %currentWorkingDirectory%/DependencyInjection
56
- %currentWorkingDirectory%/Tests

psalm-baseline.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<files psalm-version="4.19.0@a2ad69ae4f5ab1f7d225a8dc4e2ec2d9415ed599">
2+
<files psalm-version="4.22.0@fc2c6ab4d5fa5d644d8617089f012f3bb84b8703">
33
<file src="DependencyInjection/Configuration.php">
44
<UndefinedMethod occurrences="1">
55
<code>root</code>

0 commit comments

Comments
 (0)