Merge branch '2.3' into 2.7
Conflicts: src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php src/Symfony/Component/Security/Tests/Core/SecurityContextTest.php
This commit is contained in:
commit
b362c961f7
@ -683,7 +683,7 @@ class FrameworkExtension extends Extension
|
||||
if (class_exists('Symfony\Component\Security\Core\Exception\AuthenticationException')) {
|
||||
$r = new \ReflectionClass('Symfony\Component\Security\Core\Exception\AuthenticationException');
|
||||
|
||||
$dirs[] = dirname($r->getFilename()).'/../Resources/translations';
|
||||
$dirs[] = dirname($r->getFileName()).'/../Resources/translations';
|
||||
}
|
||||
$overridePath = $container->getParameter('kernel.root_dir').'/Resources/%s/translations';
|
||||
foreach ($container->getParameter('kernel.bundles') as $bundle => $class) {
|
||||
|
@ -34,7 +34,10 @@ abstract class AbstractRememberMeServices implements RememberMeServicesInterface
|
||||
const COOKIE_DELIMITER = ':';
|
||||
|
||||
protected $logger;
|
||||
protected $options;
|
||||
protected $options = array(
|
||||
'secure' => false,
|
||||
'httponly' => true,
|
||||
);
|
||||
private $providerKey;
|
||||
private $key;
|
||||
private $userProviders;
|
||||
@ -65,7 +68,7 @@ abstract class AbstractRememberMeServices implements RememberMeServicesInterface
|
||||
$this->userProviders = $userProviders;
|
||||
$this->key = $key;
|
||||
$this->providerKey = $providerKey;
|
||||
$this->options = $options;
|
||||
$this->options = array_merge($this->options, $options);
|
||||
$this->logger = $logger;
|
||||
}
|
||||
|
||||
|
@ -91,11 +91,8 @@ class AbstractRememberMeServicesTest extends \PHPUnit_Framework_TestCase
|
||||
$request = new Request();
|
||||
$response = new Response();
|
||||
$token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface');
|
||||
|
||||
$service->logout($request, $response, $token);
|
||||
|
||||
$cookie = $request->attributes->get(RememberMeServicesInterface::COOKIE_ATTR_NAME);
|
||||
|
||||
$this->assertInstanceOf('Symfony\Component\HttpFoundation\Cookie', $cookie);
|
||||
$this->assertTrue($cookie->isCleared());
|
||||
$this->assertSame($options['name'], $cookie->getName());
|
||||
@ -286,13 +283,6 @@ class AbstractRememberMeServicesTest extends \PHPUnit_Framework_TestCase
|
||||
$userProvider = $this->getProvider();
|
||||
}
|
||||
|
||||
if (!isset($options['secure'])) {
|
||||
$options['secure'] = false;
|
||||
}
|
||||
if (!isset($options['httponly'])) {
|
||||
$options['httponly'] = true;
|
||||
}
|
||||
|
||||
return $this->getMockForAbstractClass('Symfony\Component\Security\Http\RememberMe\AbstractRememberMeServices', array(
|
||||
array($userProvider), 'fookey', 'fookey', $options, $logger,
|
||||
));
|
||||
|
@ -313,13 +313,6 @@ class PersistentTokenBasedRememberMeServicesTest extends \PHPUnit_Framework_Test
|
||||
$userProvider = $this->getProvider();
|
||||
}
|
||||
|
||||
if (!isset($options['secure'])) {
|
||||
$options['secure'] = false;
|
||||
}
|
||||
if (!isset($options['httponly'])) {
|
||||
$options['httponly'] = true;
|
||||
}
|
||||
|
||||
return new PersistentTokenBasedRememberMeServices(array($userProvider), 'fookey', 'fookey', $options, $logger, new SecureRandom(sys_get_temp_dir().'/_sf2.seed'));
|
||||
}
|
||||
|
||||
|
@ -266,13 +266,6 @@ class TokenBasedRememberMeServicesTest extends \PHPUnit_Framework_TestCase
|
||||
$userProvider = $this->getProvider();
|
||||
}
|
||||
|
||||
if (!isset($options['secure'])) {
|
||||
$options['secure'] = false;
|
||||
}
|
||||
if (!isset($options['httponly'])) {
|
||||
$options['httponly'] = true;
|
||||
}
|
||||
|
||||
$service = new TokenBasedRememberMeServices(array($userProvider), 'fookey', 'fookey', $options, $logger);
|
||||
|
||||
return $service;
|
||||
|
Reference in New Issue
Block a user