8000 Merge branch '4.0' · symfony/symfony@ca53d3e · GitHub
[go: up one dir, main page]

Skip to content

Commit ca53d3e

Browse files
Merge branch '4.0'
* 4.0: fix merge
2 parents 8659ba9 + a24fa39 commit ca53d3e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/Symfony/Component/Cache/Traits/RedisTrait.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,11 @@ public static function createConnection($dsn, array $options = array())
120120
$redis = new $class();
121121

122122
$initializer = function ($redis) use ($connect, $params, $dsn, $auth) {
123-
@$redis->{$connect}($params['host'], $params['port'], $params['timeout'], $params['persistent_id'], $params['retry_interval']);
123+
try {
124+
@$redis->{$connect}($params['host'], $params['port'], $params['timeout'], $params['persistent_id'], $params['retry_interval']);
125+
} catch (\RedisException $e) {
126+
throw new InvalidArgumentException(sprintf('Redis connection failed (%s): %s', $e->getMessage(), $dsn));
127+
}
124128

125129
if (@!$redis->isConnected()) {
126130
$e = ($e = error_get_last()) && preg_match('/^Redis::p?connect\(\): (.*)/', $e['message'], $e) ? sprintf(' (%s)', $e[1]) : '';

src/Symfony/Component/Security/Core/Tests/Authentication/Provider/LdapBindAuthenticationProviderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function testEmptyPasswordShouldThrowAnException()
5252
public function testNullPasswordShouldThrowAnException()
5353
{
5454
$userProvider = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserProviderInterface')->getMock();
55-
$ldap = $this->getMockBuilder('Symfony\Component\Ldap\LdapClientInterface')->getMock();
55+
$ldap = $this->getMockBuilder('Symfony\Component\Ldap\LdapInterface')->getMock();
5656
$userChecker = $this->getMockBuilder('Symfony\Component\Security\Core\User\UserCheckerInterface')->getMock();
5757

5858
$provider = new LdapBindAuthenticationProvider($userProvider, $userChecker, 'key', $ldap);

0 commit comments

Comments
 (0)
0