From e87d2adbd3190fdef9cfed46f2c35de1fd0fd920 Mon Sep 17 00:00:00 2001 From: Eduard Morcinek Date: Tue, 5 Dec 2023 10:49:57 +0100 Subject: [PATCH 1/2] add guzzle 7 support --- .gitignore | 1 + composer.json | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 4fbb073..94640f4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /vendor/ /composer.lock +.idea/ \ No newline at end of file diff --git a/composer.json b/composer.json index bc5af62..ec79c69 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "prayno/casauth-bundle", + "name": "edditor/casauth-bundle", "type": "symfony-bundle", "description": "Basic CAS (SSO) authenticator for Symfony 3, 4 and 5", "keywords": ["PRayno", "CAS", "SSO", "Symfony 3", "Guard", "Symfony 4", "Symfony 5"], @@ -16,7 +16,7 @@ "symfony/http-foundation": "^3.0|^4.0|^5.0", "symfony/http-kernel": "^3.0|^4.0|^5.0", "symfony/security-bundle": "^3.0|^4.0|^5.0", - "guzzlehttp/guzzle": "^6.2" + "guzzlehttp/guzzle": "^6.2|^7" }, "autoload": { "psr-0": { "PRayno\\CasAuthBundle": "" } From 935f1d6f2cdf51b595621f5e2e03e47ae62f65e5 Mon Sep 17 00:00:00 2001 From: Eduard Morcinek Date: Wed, 8 Oct 2025 14:35:21 +0200 Subject: [PATCH 2/2] fix!: use correct namespace for Event class BREAKING CHANGE: drop Symfony 3 support --- Event/CASAuthenticationFailureEvent.php | 3 +-- Security/CasAuthenticator.php | 2 +- composer.json | 14 +++++++------- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/Event/CASAuthenticationFailureEvent.php b/Event/CASAuthenticationFailureEvent.php index 7d40b6b..76b626a 100644 --- a/Event/CASAuthenticationFailureEvent.php +++ b/Event/CASAuthenticationFailureEvent.php @@ -5,8 +5,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\EventDispatcher\Event; - +use Symfony\Contracts\EventDispatcher\Event; class CASAuthenticationFailureEvent extends Event { diff --git a/Security/CasAuthenticator.php b/Security/CasAuthenticator.php index 2734d96..c3c3aca 100644 --- a/Security/CasAuthenticator.php +++ b/Security/CasAuthenticator.php @@ -137,7 +137,7 @@ public function onAuthenticationFailure(Request $request, AuthenticationExceptio $def_response = new JsonResponse($data, 403); $event = new CASAuthenticationFailureEvent($request,$exception, $def_response); - $this->eventDispatcher->dispatch(CASAuthenticationFailureEvent::POST_MESSAGE, $event); + $this->eventDispatcher->dispatch($event); return $event->getResponse(); } diff --git a/composer.json b/composer.json index ec79c69..a531ac2 100644 --- a/composer.json +++ b/composer.json @@ -1,8 +1,8 @@ { "name": "edditor/casauth-bundle", "type": "symfony-bundle", - "description": "Basic CAS (SSO) authenticator for Symfony 3, 4 and 5", - "keywords": ["PRayno", "CAS", "SSO", "Symfony 3", "Guard", "Symfony 4", "Symfony 5"], + "description": "Basic CAS (SSO) authenticator for Symfony 4 and 5", + "keywords": ["PRayno", "CAS", "SSO", "Guard", "Symfony 4", "Symfony 5"], "license": "MIT", "authors": [ { @@ -11,11 +11,11 @@ } ], "require": { - "symfony/config": "^3.0|^4.0|^5.0", - "symfony/dependency-injection": "^3.0|^4.0|^5.0", - "symfony/http-foundation": "^3.0|^4.0|^5.0", - "symfony/http-kernel": "^3.0|^4.0|^5.0", - "symfony/security-bundle": "^3.0|^4.0|^5.0", + "symfony/config": "^4.0|^5.0", + "symfony/dependency-injection": "^4.0|^5.0", + "symfony/http-foundation": "^4.0|^5.0", + "symfony/http-kernel": "^4.0|^5.0", + "symfony/security-bundle": "^4.0|^5.0", "guzzlehttp/guzzle": "^6.2|^7" }, "autoload": {