diff --git a/.gitattributes b/.gitattributes index 3f33ddc..c60a4b0 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,6 +2,7 @@ /.php-cs-fixer.* export-ignore /CHANGELOG.md export-ignore /docs/ export-ignore +/phpstan*.neon export-ignore /phpunit.xml.dist export-ignore /LICENSE export-ignore /README.md export-ignore diff --git a/composer.json b/composer.json index edfee04..20850c8 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,8 @@ ], "require": { "php": "^7.3 || ^8.0", - "symfony/form": "^4.4 || ^5.0 || ^6.0" + "symfony/form": "^4.4 || ^5.0 || ^6.0", + "symfony/framework-bundle": "^4.4 || ^5.0 || ^6.0" }, "require-dev": { "phpunit/phpunit": "^9.5", @@ -20,7 +21,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.x-dev" } }, "autoload": { diff --git a/phpstan.neon b/phpstan.neon new file mode 100644 index 0000000..776ccd8 --- /dev/null +++ b/phpstan.neon @@ -0,0 +1,4 @@ +parameters: + level: max + paths: + - src diff --git a/src/Form/Messenger/AbstractBusType.php b/src/Form/Messenger/AbstractBusType.php index 920f8b8..9ab9854 100644 --- a/src/Form/Messenger/AbstractBusType.php +++ b/src/Form/Messenger/AbstractBusType.php @@ -46,7 +46,7 @@ public function handle(FormEvent $event, object $command): void $prev = $exception->getPrevious(); if ($prev instanceof \DomainException || $prev instanceof \InvalidArgumentException) { $event->getForm()->addError(new FormError($prev->getMessage())); - } else { + } elseif (null !== $prev) { throw $prev; } } catch (\DomainException | \InvalidArgumentException $exception) {