Updates to vendors etc

This commit is contained in:
Chris Hunt
2025-07-11 15:57:48 +01:00
parent d972cbcd0a
commit 8fb6438254
8043 changed files with 248005 additions and 189479 deletions

View File

@@ -25,21 +25,22 @@ use Symfony\Component\HttpFoundation\Response;
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @method Request getRequest()
* @method Response getResponse()
* @template-extends AbstractBrowser<Request, Response>
*/
class HttpKernelBrowser extends AbstractBrowser
{
protected $kernel;
private bool $catchExceptions = true;
/**
* @param array $server The server parameters (equivalent of $_SERVER)
*/
public function __construct(HttpKernelInterface $kernel, array $server = [], ?History $history = null, ?CookieJar $cookieJar = null)
{
public function __construct(
protected HttpKernelInterface $kernel,
array $server = [],
?History $history = null,
?CookieJar $cookieJar = null,
) {
// These class properties must be set before calling the parent constructor, as it may depend on it.
$this->kernel = $kernel;
$this->followRedirects = false;
parent::__construct($server, $history, $cookieJar);
@@ -47,20 +48,16 @@ class HttpKernelBrowser extends AbstractBrowser
/**
* Sets whether to catch exceptions when the kernel is handling a request.
*
* @return void
*/
public function catchExceptions(bool $catchExceptions)
public function catchExceptions(bool $catchExceptions): void
{
$this->catchExceptions = $catchExceptions;
}
/**
* @param Request $request
*
* @return Response
*/
protected function doRequest(object $request)
protected function doRequest(object $request): Response
{
$response = $this->kernel->handle($request, HttpKernelInterface::MAIN_REQUEST, $this->catchExceptions);
@@ -73,10 +70,8 @@ class HttpKernelBrowser extends AbstractBrowser
/**
* @param Request $request
*
* @return string
*/
protected function getScript(object $request)
protected function getScript(object $request): string
{
$kernel = var_export(serialize($this->kernel), true);
$request = var_export(serialize($request), true);
@@ -112,10 +107,7 @@ EOF;
return $code.$this->getHandleScript();
}
/**
* @return string
*/
protected function getHandleScript()
protected function getHandleScript(): string
{
return <<<'EOF'
$response = $kernel->handle($request);