Skip to content
This repository was archived by the owner on Aug 9, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 13 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,24 @@ on:
jobs:
tests:
name: "Run tests"
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
php-version: # https://www.php.net/supported-versions.php
- "8.1"
- "8.3"
- "8.4"
- "8.2"
- "8.2"
- "8.3"
- "8.4"
- "8.5"
symfony-version: # https://symfony.com/releases
- "5.4"
- "6.4"
- "7.0"
exclude:
# Symfony 7 requires PHP 8.2+
- php-version: '8.1'
symfony-version: '7.0'
- "7.4"
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
uses: "actions/checkout@v7"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
Expand All @@ -42,7 +41,7 @@ jobs:
- name: "Validate composer.json and composer.lock"
run: "composer validate --strict --no-interaction --ansi"
- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v3"
uses: "ramsey/composer-install@v4"
- name: "Install specific Symfony version"
run: "composer require --no-interaction symfony/console:^${{ matrix.symfony-version }} symfony/http-kernel:^${{ matrix.symfony-version }} symfony/framework-bundle:^${{ matrix.symfony-version }} symfony/yaml:^${{ matrix.symfony-version }} -W"
- name: "Run tests"
Expand All @@ -54,17 +53,17 @@ jobs:

static-analysis:
name: "Static analysis"
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-latest"
continue-on-error: true
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
uses: "actions/checkout@v7"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "8.0"
php-version: "8.5"
coverage: "none"
- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v3"
uses: "ramsey/composer-install@v4"
- name: "Run PHPStan"
run: "make phpstan"
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@
"matthiasnoback/symfony-config-test": "^4.0 || ^5.0",
"matthiasnoback/symfony-dependency-injection-test": "^4.0 || ^5.0",
"monolog/monolog": "~2.0",
"phpstan/phpstan": "@stable",
"phpstan/phpstan": "^2.0",
"phpunit/phpunit": "^9.5",
"symfony/framework-bundle": "^4.4 || ^5.3 || ^6.0 || ^7.0",
"symfony/proxy-manager-bridge": "^4.4 || ^5.3 || ^6.0",
"phpstan/phpstan-symfony": "^1.0",
"phpstan/phpstan-symfony": "^2.0",
"friendsofphp/php-cs-fixer": "^3.0"
},
"suggest": {
Expand Down
115 changes: 115 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
parameters:
ignoreErrors:
-
message: '#^Call to function method_exists\(\) with Symfony\\Component\\Console\\Input\\InputInterface and ''__toString'' will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 1
path: src/Command/CommandMetadataEnricher.php

-
message: '#^Cannot access offset ''enabled'' on mixed\.$#'
identifier: offsetAccess.nonOffsetAccessible
count: 1
path: src/DependencyInjection/BroadwayExtension.php

-
message: '#^Cannot access offset ''state_repository'' on mixed\.$#'
identifier: offsetAccess.nonOffsetAccessible
count: 1
path: src/DependencyInjection/BroadwayExtension.php

-
message: '#^Method Broadway\\Bundle\\BroadwayBundle\\DependencyInjection\\BroadwayExtension\:\:loadCommandBus\(\) has parameter \$config with no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
count: 1
path: src/DependencyInjection/BroadwayExtension.php

-
message: '#^Method Broadway\\Bundle\\BroadwayBundle\\DependencyInjection\\BroadwayExtension\:\:loadInternal\(\) has parameter \$mergedConfig with no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
count: 1
path: src/DependencyInjection/BroadwayExtension.php

-
message: '#^Method Broadway\\Bundle\\BroadwayBundle\\DependencyInjection\\BroadwayExtension\:\:loadSerializers\(\) has parameter \$config with no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
count: 1
path: src/DependencyInjection/BroadwayExtension.php

-
message: '#^Parameter \#1 \$config of method Broadway\\Bundle\\BroadwayBundle\\DependencyInjection\\BroadwayExtension\:\:loadCommandBus\(\) expects array, mixed given\.$#'
identifier: argument.type
count: 1
path: src/DependencyInjection/BroadwayExtension.php

-
message: '#^Parameter \#1 \$config of method Broadway\\Bundle\\BroadwayBundle\\DependencyInjection\\BroadwayExtension\:\:loadSerializers\(\) expects array, mixed given\.$#'
identifier: argument.type
count: 1
path: src/DependencyInjection/BroadwayExtension.php

-
message: '#^Parameter \#1 \$id of class Symfony\\Component\\DependencyInjection\\Alias constructor expects string, mixed given\.$#'
identifier: argument.type
count: 1
path: src/DependencyInjection/BroadwayExtension.php

-
message: '#^Parameter \#2 \$value of method Symfony\\Component\\DependencyInjection\\Container\:\:setParameter\(\) expects array\|bool\|float\|int\|string\|UnitEnum\|null, mixed given\.$#'
identifier: argument.type
count: 4
path: src/DependencyInjection/BroadwayExtension.php

-
message: '#^Parameter \#1 \$objectOrClass of class ReflectionClass constructor expects class\-string\<T of object\>\|T of object, mixed given\.$#'
identifier: argument.type
count: 1
path: src/DependencyInjection/CompilerPass.php

-
message: '#^Parameter \#2 \.\.\.\$values of function sprintf expects bool\|float\|int\|string\|null, mixed given\.$#'
identifier: argument.type
count: 1
path: src/DependencyInjection/CompilerPass.php

-
message: '#^Parameter \#1 \$objectOrClass of class ReflectionClass constructor expects class\-string\<T of object\>\|T of object, mixed given\.$#'
identifier: argument.type
count: 1
path: src/DependencyInjection/RegisterBusSubscribersCompilerPass.php

-
message: '#^Cannot access offset ''event'' on mixed\.$#'
identifier: offsetAccess.nonOffsetAccessible
count: 1
path: src/DependencyInjection/RegisterEventListenerCompilerPass.php

-
message: '#^Cannot access offset ''method'' on mixed\.$#'
identifier: offsetAccess.nonOffsetAccessible
count: 1
path: src/DependencyInjection/RegisterEventListenerCompilerPass.php

-
message: '#^Cannot access offset ''type'' on mixed\.$#'
identifier: offsetAccess.nonOffsetAccessible
count: 1
path: src/DependencyInjection/RegisterSagaCompilerPass.php

-
message: '#^Possibly invalid array key type mixed\.$#'
identifier: offsetAccess.invalidOffset
count: 1
path: src/DependencyInjection/RegisterSagaCompilerPass.php

-
message: '#^Method Broadway\\Bundle\\BroadwayBundle\\AppKernel\:\:registerBundles\(\) return type has no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
count: 1
path: test/AppKernel.php

-
message: '#^Method Broadway\\Bundle\\BroadwayBundle\\BroadwayBundleTest\:\:createKernel\(\) has parameter \$options with no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
count: 1
path: test/BroadwayBundleTest.php
10 changes: 5 additions & 5 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
includes:
- phpstan-baseline.neon
- vendor/phpstan/phpstan-symfony/extension.neon
parameters:
paths:
- .
excludePaths:
- Tests/
- vendor/
- var/
- Resources/doc/example/
checkMissingIterableValueType: false
- Tests/ (?)
- vendor/ (?)
- var/ (?)
- Resources/doc/example/ (?)
inferPrivatePropertyTypeFromConstructor: true