Skip to content

Commit

Permalink
Symfony 7 (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
MattApril committed May 30, 2024
1 parent b91944b commit 178c82c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions src/StackUnpoly.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/StackUnpolyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 178c82c

Please sign in to comment.