From 4925cafdde8eac494f5de2ca26e12a6113594566 Mon Sep 17 00:00:00 2001 From: Simo Heinonen Date: Wed, 13 Dec 2023 15:48:21 +0200 Subject: [PATCH] Allow symfony 7 --- composer.json | 36 ++++++++++++++++++------------------ src/Model/User.php | 5 +---- src/Security/UserChecker.php | 10 ++-------- 3 files changed, 21 insertions(+), 30 deletions(-) diff --git a/composer.json b/composer.json index 7816ddb8c..99683afbf 100644 --- a/composer.json +++ b/composer.json @@ -24,22 +24,22 @@ "php": "^7.4 || ^8.0", "ext-dom": "*", "ext-json": "*", - "symfony/config": "^4.4 || ^5.0 || ^6.0", - "symfony/dependency-injection": "^4.4 || ^5.0 || ^6.0", + "symfony/config": "^4.4 || ^5.0 || ^6.0 || ^7.0", + "symfony/dependency-injection": "^4.4 || ^5.0 || ^6.0 || ^7.0", "symfony/deprecation-contracts": "^2.5 || ^3.5", - "symfony/event-dispatcher": "^4.4 || ^5.0 || ^6.0", + "symfony/event-dispatcher": "^4.4 || ^5.0 || ^6.0 || ^7.0", "symfony/event-dispatcher-contracts": "^1.1 || ^2.0 || ^3.0", - "symfony/form": "^4.4 || ^5.0 || ^6.0", - "symfony/framework-bundle": "^4.4 || ^5.0 || ^6.0", - "symfony/http-foundation": "^4.4 || ^5.0 || ^6.0", - "symfony/http-kernel": "^4.4 || ^5.0 || ^6.0", - "symfony/options-resolver": "^4.4 || ^5.0 || ^6.0", - "symfony/routing": "^4.4 || ^5.0 || ^6.0", - "symfony/security-bundle": "^4.4 || ^5.0 || ^6.0", - "symfony/security-core": "^4.4 || ^5.0 || ^6.0", - "symfony/translation": "^4.4 || ^5.0 || ^6.0", - "symfony/twig-bundle": "^4.4 || ^5.0 || ^6.0", - "symfony/validator": "^4.4 || ^5.0 || ^6.0", + "symfony/form": "^4.4 || ^5.0 || ^6.0 || ^7.0", + "symfony/framework-bundle": "^4.4 || ^5.0 || ^6.0 || ^7.0", + "symfony/http-foundation": "^4.4 || ^5.0 || ^6.0 || ^7.0", + "symfony/http-kernel": "^4.4 || ^5.0 || ^6.0 || ^7.0", + "symfony/options-resolver": "^4.4 || ^5.0 || ^6.0 || ^7.0", + "symfony/routing": "^4.4 || ^5.0 || ^6.0 || ^7.0", + "symfony/security-bundle": "^4.4 || ^5.0 || ^6.0 || ^7.0", + "symfony/security-core": "^4.4 || ^5.0 || ^6.0 || ^7.0", + "symfony/translation": "^4.4 || ^5.0 || ^6.0 || ^7.0", + "symfony/twig-bundle": "^4.4 || ^5.0 || ^6.0 || ^7.0", + "symfony/validator": "^4.4 || ^5.0 || ^6.0 || ^7.0", "twig/twig": "^1.34 || ^2.4 || ^3.0" }, "conflict": { @@ -51,11 +51,11 @@ "doctrine/doctrine-bundle": "^1.3 || ^2", "friendsofphp/php-cs-fixer": "^3.0.2, !=3.5.0", "swiftmailer/swiftmailer": "^4.3 || ^5.0 || ^6.0", - "symfony/console": "^4.4 || ^5.0 || ^6.0", - "symfony/mailer": "^4.4 || ^5.0 || ^6.0", - "symfony/mime": "^4.4 || ^5.0 || ^6.0", + "symfony/console": "^4.4 || ^5.0 || ^6.0 || ^7.0", + "symfony/mailer": "^4.4 || ^5.0 || ^6.0 || ^7.0", + "symfony/mime": "^4.4 || ^5.0 || ^6.0 || ^7.0", "symfony/phpunit-bridge": "^6.1", - "symfony/yaml": "^4.4 || ^5.0 || ^6.0" + "symfony/yaml": "^4.4 || ^5.0 || ^6.0 || ^7.0" }, "config": { "sort-packages": true diff --git a/src/Model/User.php b/src/Model/User.php index 3a3979b71..854ea82cc 100644 --- a/src/Model/User.php +++ b/src/Model/User.php @@ -183,10 +183,7 @@ public function addRole($role) return $this; } - /** - * @return void - */ - public function eraseCredentials() + public function eraseCredentials(): void { $this->plainPassword = null; } diff --git a/src/Security/UserChecker.php b/src/Security/UserChecker.php index 8bc0aa55a..f8f133b29 100644 --- a/src/Security/UserChecker.php +++ b/src/Security/UserChecker.php @@ -23,10 +23,7 @@ */ class UserChecker implements UserCheckerInterface { - /** - * @return void - */ - public function checkPreAuth(BaseUserInterface $user) + public function checkPreAuth(BaseUserInterface $user): void { if ($user instanceof UserInterface && !$user->isEnabled()) { $ex = new DisabledException('User account is disabled.'); @@ -35,10 +32,7 @@ public function checkPreAuth(BaseUserInterface $user) } } - /** - * @return void - */ - public function checkPostAuth(BaseUserInterface $user) + public function checkPostAuth(BaseUserInterface $user): void { } }