Skip to content
This repository was archived by the owner on Jul 26, 2018. It is now read-only.

Commit 4024da7

Browse files
committed
bug #4 Some changes/bug fixes (kbond)
This PR was squashed before being merged into the master branch (closes #4). Discussion ---------- Some changes/bug fixes 1. `Extension::addClassesToCompile()` is deprecated in Symfony 3.3 2. Calling `UsernamePasswordToken::setAuthenticated()` throws a `\LogicException` [ref](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Security/Core/Authentication/Token/UsernamePasswordToken.php#L52) Commits ------- 723178b Some changes/bug fixes
2 parents da844ac + 723178b commit 4024da7

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

DependencyInjection/EasySecurityExtension.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ public function load(array $configs, ContainerBuilder $container)
2626
$loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
2727
$loader->load('services.xml');
2828

29-
$this->addClassesToCompile(array(
30-
'EasyCorp\\Bundle\\EasySecurityBundle\\Security\\Security',
31-
));
29+
if (PHP_VERSION_ID < 70000) {
30+
$this->addClassesToCompile(array(
31+
'EasyCorp\\Bundle\\EasySecurityBundle\\Security\\Security',
32+
));
33+
}
3234
}
3335
}

Security/Security.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ public function isAuthenticated($user = null)
219219
public function login(UserInterface $user, $firewallName = 'main')
220220
{
221221
$token = new UsernamePasswordToken($user, $user->getPassword(), $firewallName, $user->getRoles());
222-
$token->setAuthenticated(true);
223222
$this->tokenStorage->setToken($token);
224223

225224
$this->session->set('_security_'.$firewallName, serialize($token));

0 commit comments

Comments
 (0)