Skip to content

Commit

Permalink
Add PHP 8.1 to CI and bump dev dependencies (#475)
Browse files Browse the repository at this point in the history
  • Loading branch information
derrabus authored Mar 8, 2022
1 parent 453b097 commit 019b0fb
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 23 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ jobs:
coding-standards:
name: "Coding Standards"
uses: "doctrine/.github/.github/workflows/coding-standards.yml@1.4.1"
with:
php-version: "8.1"
2 changes: 1 addition & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ jobs:
name: "PHPUnit"
uses: "doctrine/.github/.github/workflows/continuous-integration.yml@1.4.1"
with:
php-versions: '["7.2", "7.3", "7.4", "8.0"]'
php-versions: '["7.2", "7.3", "7.4", "8.0", "8.1"]'
2 changes: 2 additions & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ jobs:
static-analysis:
name: "Static Analysis"
uses: "doctrine/.github/.github/workflows/static-analysis.yml@1.4.1"
with:
php-version: "8.1"
4 changes: 2 additions & 2 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function getConfigTreeBuilder(): TreeBuilder
->useAttributeAsKey('service')
->defaultValue([])
->validate()
->ifTrue(static function ($v): bool {
->ifTrue(static function (array $v): bool {
return count(array_filter(array_keys($v), static function (string $doctrineService): bool {
return strpos($doctrineService, 'Doctrine\Migrations\\') !== 0;
})) !== 0;
Expand All @@ -74,7 +74,7 @@ public function getConfigTreeBuilder(): TreeBuilder
->useAttributeAsKey('factory')
->defaultValue([])
->validate()
->ifTrue(static function ($v): bool {
->ifTrue(static function (array $v): bool {
return count(array_filter(array_keys($v), static function (string $doctrineService): bool {
return strpos($doctrineService, 'Doctrine\Migrations\\') !== 0;
})) !== 0;
Expand Down
1 change: 0 additions & 1 deletion DependencyInjection/DoctrineMigrationsExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class DoctrineMigrationsExtension extends Extension
* Responds to the migrations configuration parameter.
*
* @param mixed[][] $configs
*
* @psalm-param array<string, array<string, array<string, array<string, string>|string>|string>> $configs
*/
public function load(array $configs, ContainerBuilder $container): void
Expand Down
1 change: 0 additions & 1 deletion Tests/DependencyInjection/DoctrineCommandsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ public function testCommandRegistered(string $name, string $instance): void

/**
* @return string[][]
*
* @psalm-return list<array{string, class-string<DoctrineCommand>}>
*/
public function getCommands(): array
Expand Down
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
"doctrine/migrations": "^3.2"
},
"require-dev": {
"phpunit/phpunit": "^8.0|^9.0",
"doctrine/coding-standard": "^8.0",
"phpstan/phpstan": "^0.12",
"phpstan/phpstan-deprecation-rules": "^0.12",
"phpstan/phpstan-phpunit": "^0.12",
"phpstan/phpstan-strict-rules": "^0.12",
"phpunit/phpunit": "^8.5|^9.5",
"doctrine/coding-standard": "^9",
"phpstan/phpstan": "^1.4",
"phpstan/phpstan-deprecation-rules": "^1",
"phpstan/phpstan-phpunit": "^1",
"phpstan/phpstan-strict-rules": "^1.1",
"doctrine/orm": "^2.6",
"doctrine/persistence": "^1.3||^2.0",
"vimeo/psalm": "^4.11"
"vimeo/psalm": "^4.22"
},
"autoload": {
"psr-4": { "Doctrine\\Bundle\\MigrationsBundle\\": "" },
Expand Down
3 changes: 2 additions & 1 deletion phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
<!-- Ignore warnings, show progress of the run and show sniff names -->
<arg value="nps"/>

<config name="php_version" value="70200"/>

<file>DependencyInjection</file>
<file>Tests</file>

Expand All @@ -23,4 +25,3 @@
</properties>
</rule>
</ruleset>

1 change: 1 addition & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
parameters:
level: 7
phpVersion: 80100
paths:
- %currentWorkingDirectory%/DependencyInjection
- %currentWorkingDirectory%/Tests
Expand Down
2 changes: 1 addition & 1 deletion psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="4.19.0@a2ad69ae4f5ab1f7d225a8dc4e2ec2d9415ed599">
<files psalm-version="4.22.0@fc2c6ab4d5fa5d644d8617089f012f3bb84b8703">
<file src="DependencyInjection/Configuration.php">
<UndefinedMethod occurrences="1">
<code>root</code>
Expand Down
10 changes: 1 addition & 9 deletions psalm.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0"?>
<psalm
errorLevel="4"
phpVersion="8.1"
resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
Expand All @@ -15,13 +16,4 @@
<directory name="vendor" />
</ignoreFiles>
</projectFiles>

<issueHandlers>
<!-- This check is confused by Symfony's "mixed" property types. -->
<ReservedWord>
<errorLevel type="suppress">
<directory name="." />
</errorLevel>
</ReservedWord>
</issueHandlers>
</psalm>

0 comments on commit 019b0fb

Please sign in to comment.