diff --git a/composer.json b/composer.json index 8cf354e..a1984ca 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,8 @@ { "name": "numberninecms/chapterone", - "type": "symfony-bundle", "description": "ChapterOne is a full-featured starter theme for NumberNine CMS", + "license": "MIT", + "type": "symfony-bundle", "keywords": [ "numbernine", "theme", @@ -10,7 +11,6 @@ "blogging", "symfony" ], - "license": "MIT", "authors": [ { "name": "William Arin", @@ -27,24 +27,24 @@ "nikic/php-parser": "^4.10", "php-parallel-lint/php-parallel-lint": "^1.2", "phpro/grumphp": "^1.0.0", - "phpstan/phpstan": "^0.12.25", - "phpstan/phpstan-doctrine": "^0.12.13", - "phpstan/phpstan-phpunit": "^0.12.8", - "phpstan/phpstan-symfony": "^0.12.6", + "phpstan/phpstan": "^1.4.6", + "phpstan/phpstan-doctrine": "^1.2.10", + "phpstan/phpstan-phpunit": "^1.0.0", + "phpstan/phpstan-symfony": "^1.1.5", "phpunit/phpunit": "^9.4", "roave/security-advisories": "dev-latest", "squizlabs/php_codesniffer": "^3.5" }, - "config": { - "sort-packages": true - }, + "minimum-stability": "dev", + "prefer-stable": true, "autoload": { "psr-4": { "NumberNine\\ChapterOne\\": "src/" } }, - "minimum-stability": "dev", - "prefer-stable": true, + "config": { + "sort-packages": true + }, "scripts": { "test": "vendor/bin/grumphp run --no-interaction" } diff --git a/phpstan.neon b/phpstan.neon index 5c290df..869c2c2 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,16 +1,13 @@ includes: - vendor/phpstan/phpstan-symfony/extension.neon - vendor/phpstan/phpstan-symfony/rules.neon - - vendor/phpstan/phpstan-doctrine/extension.neon parameters: level: 8 paths: - src - excludes_analyse: + excludePaths: - src/Component/Product - src/DataFixtures - doctrine: - objectManagerLoader: build/phpstan/doctrine-orm-bootstrap.php checkGenericClassInNonGenericObjectType: false checkMissingIterableValueType: false diff --git a/src/Component/Account/RegistrationForm/RegistrationForm.php b/src/Component/Account/RegistrationForm/RegistrationForm.php index d16884d..9b4f9b7 100644 --- a/src/Component/Account/RegistrationForm/RegistrationForm.php +++ b/src/Component/Account/RegistrationForm/RegistrationForm.php @@ -64,8 +64,11 @@ protected function handleSubmittedAndValidForm(Request $request): Response $response = $this->userAuthenticator->authenticateUser($user); /** @var RegistrationFormSuccessEvent $registrationFormSuccessEvent */ - $registrationFormSuccessEvent = $this->eventDispatcher->dispatch(new RegistrationFormSuccessEvent($user, $response)); + $registrationFormSuccessEvent = $this->eventDispatcher->dispatch(new RegistrationFormSuccessEvent( + $user, + $response, + )); - return $registrationFormSuccessEvent->getResponse(); + return $registrationFormSuccessEvent->getResponse() ?? throw new \Exception(); } } diff --git a/src/Component/Content/Comments/Comments.php b/src/Component/Content/Comments/Comments.php index 64e6008..2ca2ee7 100644 --- a/src/Component/Content/Comments/Comments.php +++ b/src/Component/Content/Comments/Comments.php @@ -48,7 +48,7 @@ public function __construct( private FormFactoryInterface $formFactory, private TokenStorageInterface $tokenStorage, private EntityManagerInterface $entityManager, - private EventDispatcherInterface $eventDispatcher, + EventDispatcherInterface $eventDispatcher, ) { parent::__construct($formFactory, $eventDispatcher); }