Skip to content

Commit bf8b0f7

Browse files
committed
Merge branch '2.1' into 2.2
* 2.1: fixed a circular call (closes symfony#6864) Correct comment in NativeSessionStorage regarding session.save_handler [Security] Add PHPDoc to AuthenticationEvents
2 parents 81aed8f + 04cb480 commit bf8b0f7

File tree

3 files changed

+27
-6
lines changed

3 files changed

+27
-6
lines changed

src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -958,23 +958,25 @@ private function getDefinitionsFromArguments(array $arguments)
958958
*
959959
* @return Boolean
960960
*/
961-
private function hasReference($id, array $arguments, $deep = false)
961+
private function hasReference($id, array $arguments, $deep = false, $visited = array())
962962
{
963963
foreach ($arguments as $argument) {
964964
if (is_array($argument)) {
965-
if ($this->hasReference($id, $argument, $deep)) {
965+
if ($this->hasReference($id, $argument, $deep, $visited)) {
966966
return true;
967967
}
968968
} elseif ($argument instanceof Reference) {
969969
if ($id === (string) $argument) {
970970
return true;
971971
}
972972

973-
if ($deep) {
973+
if ($deep && !isset($visited[(string) $argument])) {
974+
$visited[(string) $argument] = true;
975+
974976
$service = $this->container->getDefinition((string) $argument);
975977
$arguments = array_merge($service->getMethodCalls(), $service->getArguments(), $service->getProperties());
976978

977-
if ($this->hasReference($id, $arguments, $deep)) {
979+
if ($this->hasReference($id, $arguments, $deep, $visited)) {
978980
return true;
979981
}
980982
}

src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,9 +332,9 @@ public function setOptions(array $options)
332332
* Registers save handler as a PHP session handler.
333333
*
334334
* To use internal PHP session save handlers, override this method using ini_set with
335-
* session.save_handlers and session.save_path e.g.
335+
* session.save_handler and session.save_path e.g.
336336
*
337-
* ini_set('session.save_handlers', 'files');
337+
* ini_set('session.save_handler', 'files');
338338
* ini_set('session.save_path', /tmp');
339339
*
340340
* @see http://php.net/session-set-save-handler

src/Symfony/Component/Security/Core/AuthenticationEvents.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,26 @@
1313

1414
final class AuthenticationEvents
1515
{
16+
/**
17+
* The AUTHENTICATION_SUCCESS event occurs after a user is authenticated
18+
* by one provider.
19+
*
20+
* The event listener method receives a
21+
* Symfony\Component\Security\Core\Event\AuthenticationEvent instance.
22+
*
23+
* @var string
24+
*/
1625
const AUTHENTICATION_SUCCESS = 'security.authentication.success';
1726

27+
/**
28+
* The AUTHENTICATION_FAILURE event occurs after a user cannot be
29+
* authenticated by any of the providers.
30+
*
31+
* The event listener method receives a
32+
* Symfony\Component\Security\Core\Event\AuthenticationFailureEvent
33+
* instance.
34+
*
35+
* @var string
36+
*/
1837
const AUTHENTICATION_FAILURE = 'security.authentication.failure';
1938
}

0 commit comments

Comments
 (0)