Merge branch '3.2' into 3.3
* 3.2: [Form][FrameworkBundle] Remove non-existing arg for data_collector.form [Cache] fix Redis scheme detection
This commit is contained in:
commit
8d58b50ffd
@ -26,7 +26,6 @@
|
||||
<service id="data_collector.form" class="Symfony\Component\Form\Extension\DataCollector\FormDataCollector" public="true">
|
||||
<tag name="data_collector" template="@WebProfiler/Collector/form.html.twig" id="form" priority="310" />
|
||||
<argument type="service" id="data_collector.form.extractor" />
|
||||
<argument>false</argument>
|
||||
</service>
|
||||
</services>
|
||||
</container>
|
||||
|
@ -90,6 +90,11 @@ trait RedisTrait
|
||||
$params['dbindex'] = $m[1];
|
||||
$params['path'] = substr($params['path'], 0, -strlen($m[0]));
|
||||
}
|
||||
if (isset($params['host'])) {
|
||||
$scheme = 'tcp';
|
||||
} else {
|
||||
$scheme = 'unix';
|
||||
}
|
||||
$params += array(
|
||||
'host' => isset($params['host']) ? $params['host'] : $params['path'],
|
||||
'port' => isset($params['host']) ? 6379 : null,
|
||||
@ -120,7 +125,7 @@ trait RedisTrait
|
||||
throw new InvalidArgumentException(sprintf('Redis connection failed (%s): %s', $e, $dsn));
|
||||
}
|
||||
} elseif (is_a($class, \Predis\Client::class, true)) {
|
||||
$params['scheme'] = isset($params['host']) ? 'tcp' : 'unix';
|
||||
$params['scheme'] = $scheme;
|
||||
$params['database'] = $params['dbindex'] ?: null;
|
||||
$params['password'] = $auth;
|
||||
$redis = new $class((new Factory())->create($params));
|
||||
|
Reference in New Issue
Block a user