From e24dddd491ae25f264dc1bf677fca86cd14ddde5 Mon Sep 17 00:00:00 2001 From: MattApril Date: Thu, 9 May 2024 14:09:29 -0400 Subject: [PATCH] Symfony 7 --- composer.json | 4 ++-- src/StackUnpoly.php | 4 ++-- tests/StackUnpolyTest.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index fdbc48f..24721e6 100755 --- a/composer.json +++ b/composer.json @@ -23,8 +23,8 @@ }, "require": { "php": "^8.0", - "symfony/http-foundation": "^4.4|^5.4|^6.0", - "symfony/http-kernel": "^4.4|^5.4|^6.0" + "symfony/http-foundation": "^5.4|^6.0|^7.0", + "symfony/http-kernel": "^5.4|^6.0|7.0" }, "require-dev": { "phpunit/phpunit": "^9.5" diff --git a/src/StackUnpoly.php b/src/StackUnpoly.php index deb83ee..9da7191 100644 --- a/src/StackUnpoly.php +++ b/src/StackUnpoly.php @@ -33,11 +33,11 @@ public function __construct(HttpKernelInterface $app, Unpoly $unpoly) /** * {@inheritdoc} */ - public function handle(Request $request, $type = self::MASTER_REQUEST, $catch = true): Response + public function handle(Request $request, $type = self::MAIN_REQUEST, $catch = true): Response { $response = $this->app->handle($request, $type, $catch); - if (self::MASTER_REQUEST === $type) { + if (self::MAIN_REQUEST === $type) { $this->unpoly->decorateResponse($request, $response); } diff --git a/tests/StackUnpolyTest.php b/tests/StackUnpolyTest.php index 290624f..cd50eef 100644 --- a/tests/StackUnpolyTest.php +++ b/tests/StackUnpolyTest.php @@ -23,7 +23,7 @@ public function testPassesResponseToUnpolyInstance() $unpoly->expects($this->once())->method('decorateResponse')->with($request, $response); $stack = new StackUnpoly($app, $unpoly); - $stack->handle($request, HttpKernelInterface::MASTER_REQUEST); + $stack->handle($request, HttpKernelInterface::MAIN_REQUEST); } public function testSkipsSubRequests()