Merge branch '4.4'

* 4.4:
  conflict with FrameworkBundle < 4.4
  [DoctrineBridge] Reopen DoctrineDataCollector to extensibility
  [HttpClient] fix support for NTLM auth
This commit is contained in:
Nicolas Grekas 2019-11-06 15:14:36 +01:00
commit 98b457aa36
5 changed files with 7 additions and 6 deletions

View File

@ -68,7 +68,6 @@ DoctrineBridge
* Deprecated `RegistryInterface`, use `Doctrine\Common\Persistence\ManagerRegistry`.
* Added a new `getMetadataDriverClass` method to replace class parameters in `AbstractDoctrineExtension`. This method
will be abstract in Symfony 5 and must be declared in extending classes.
* Marked the `DoctrineDataCollector` class as `@final`.
Filesystem
----------

View File

@ -16,7 +16,6 @@ CHANGELOG
* deprecated `RegistryInterface`, use `Doctrine\Common\Persistence\ManagerRegistry`
* added support for invokable event listeners
* added `getMetadataDriverClass` method to deprecate class parameters in service configuration files
* Marked the `DoctrineDataCollector` class as `@final`.
4.3.0
-----

View File

@ -23,8 +23,6 @@ use Symfony\Component\HttpKernel\DataCollector\DataCollector;
* DoctrineDataCollector.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @final since Symfony 4.4
*/
class DoctrineDataCollector extends DataCollector
{
@ -54,8 +52,10 @@ class DoctrineDataCollector extends DataCollector
/**
* {@inheritdoc}
*
* @param \Throwable|null $exception
*/
public function collect(Request $request, Response $response, \Exception $exception = null)
public function collect(Request $request, Response $response/*, \Throwable $exception = null*/)
{
$queries = [];
foreach ($this->loggers as $name => $logger) {

View File

@ -412,7 +412,9 @@ final class CurlResponse implements ResponseInterface
}
}
if ($statusCode < 300 || 400 <= $statusCode || null === $location || curl_getinfo($ch, CURLINFO_REDIRECT_COUNT) === $options['max_redirects']) {
if (401 === $statusCode && isset($options['auth_ntlm']) && 0 === strncasecmp($headers['www-authenticate'][0] ?? '', 'NTLM ', 5)) {
// Continue with NTLM auth
} elseif ($statusCode < 300 || 400 <= $statusCode || null === $location || curl_getinfo($ch, CURLINFO_REDIRECT_COUNT) === $options['max_redirects']) {
// Headers and redirects completed, time to get the response's content
$multi->handlesActivity[$id][] = new FirstChunk();

View File

@ -38,6 +38,7 @@
},
"conflict": {
"symfony/event-dispatcher": "<4.4",
"symfony/framework-bundle": "<4.4",
"symfony/http-kernel": "<4.4"
},
"suggest": {