框架升级及修复升级后的bug

This commit is contained in:
Dev
2026-10-16 18:13:09 +08:00
parent dafb0c96c0
commit 2d342bcbd7
537 changed files with 49836 additions and 40933 deletions
+15 -1
View File
@@ -11,6 +11,8 @@
namespace Symfony\Component\HttpClient;
use Psr\Log\LoggerAwareInterface;
use Psr\Log\LoggerInterface;
use Symfony\Component\HttpClient\Exception\InvalidArgumentException;
use Symfony\Contracts\HttpClient\HttpClientInterface;
use Symfony\Contracts\HttpClient\ResponseInterface;
@@ -22,7 +24,7 @@ use Symfony\Contracts\Service\ResetInterface;
*
* @author Anthony Martin <anthony.martin@sensiolabs.com>
*/
class ScopingHttpClient implements HttpClientInterface, ResetInterface
class ScopingHttpClient implements HttpClientInterface, ResetInterface, LoggerAwareInterface
{
use HttpClientTrait;
@@ -100,6 +102,18 @@ class ScopingHttpClient implements HttpClientInterface, ResetInterface
}
}
/**
* @deprecated since Symfony 7.1, configure the logger on the wrapped HTTP client directly instead
*/
public function setLogger(LoggerInterface $logger): void
{
trigger_deprecation('symfony/http-client', '7.1', 'Configure the logger on the wrapped HTTP client directly instead.');
if ($this->client instanceof LoggerAwareInterface) {
$this->client->setLogger($logger);
}
}
public function withOptions(array $options): static
{
$clone = clone $this;