Skip to content
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
17 changes: 9 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,18 @@
],
"require": {
"php": ">=8.1",
"symfony/framework-bundle": "^5.4|^6.0|^7.0",
"symfony/dependency-injection": "^5.4|^6.0|^7.0",
"symfony/routing": "^5.4|^6.0|^7.0",
"symfony/http-foundation": "^5.4|^6.0|^7.0",
"league/oauth2-client": "^2.0"
"symfony/framework-bundle": "^6.4|^7.3",
"symfony/dependency-injection": "^6.4|^7.3",
"symfony/routing": "^6.4|^7.3",
"symfony/http-foundation": "^6.4|^7.3",
"league/oauth2-client": "^2.0",
"symfony/security-core": "^6.4|^7.3",
"symfony/security-http": "^6.4|^7.3"
},
"require-dev": {
"league/oauth2-facebook": "^1.1|^2.0",
"symfony/phpunit-bridge": "^5.4|^6.0|^7.0",
"symfony/security-guard": "^5.4",
"symfony/yaml": "^5.4|^6.0|^7.0"
"symfony/phpunit-bridge": "^7.3",
"symfony/yaml": "^6.4|^7.3"
},
"autoload": {
"psr-4": { "KnpU\\OAuth2ClientBundle\\": "src/" }
Expand Down
59 changes: 0 additions & 59 deletions src/Security/Authenticator/SocialAuthenticator.php

This file was deleted.

7 changes: 1 addition & 6 deletions src/Security/Helper/SaveAuthFailureMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\Security\Core\Exception\AuthenticationException;
use Symfony\Component\Security\Core\Security;
use Symfony\Component\Security\Http\SecurityRequestAttributes;

trait SaveAuthFailureMessage
Expand All @@ -24,10 +23,6 @@ protected function saveAuthenticationErrorToSession(Request $request, Authentica
throw new \LogicException('In order to save an authentication error, you must have a session available.');
}

$authenticationError = class_exists(Security::class)
? Security::AUTHENTICATION_ERROR
: SecurityRequestAttributes::AUTHENTICATION_ERROR;

$request->getSession()->set($authenticationError, $exception);
$request->getSession()->set(SecurityRequestAttributes::AUTHENTICATION_ERROR, $exception);
}
}
151 changes: 0 additions & 151 deletions tests/Security/Authenticator/SocialAuthenticatorTest.php

This file was deleted.

5 changes: 2 additions & 3 deletions tests/Security/Helper/SaveAuthFailureMessageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@

use KnpU\OAuth2ClientBundle\Security\Helper\SaveAuthFailureMessage;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\Security\Core\Exception\AuthenticationException;
use Symfony\Component\Security\Core\Security;
use Symfony\Component\Security\Http\SecurityRequestAttributes;

class SaveAuthFailureMessageTest extends TestCase
{
Expand All @@ -41,7 +40,7 @@ public function testShouldUpdateSessionErrorIfSessionExists()

$testFailureMessage->callSaveAuthenticationErrorToSession($request, $mockAuthException);
$session = $request->getSession();
$this->assertInstanceOf(AuthenticationException::class, $session->get(Security::AUTHENTICATION_ERROR));
$this->assertInstanceOf(AuthenticationException::class, $session->get(SecurityRequestAttributes::AUTHENTICATION_ERROR));
}
}

Expand Down
3 changes: 0 additions & 3 deletions tests/app/TestKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ public function registerContainerConfiguration(LoaderInterface $loader): void
'resource' => __DIR__ . '/routing.yml',
'utf8' => true,
],
// turn this off - otherwise we need doctrine/annotation
// the change that required this was in Symfony 3.2.0
'annotations' => Kernel::VERSION_ID >= 30200 ? false : [],
]);

$container->loadFromExtension('knpu_oauth2_client', [
Expand Down