Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Symfony 6 and PHPUnit 9. #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
],
"require": {
"php": ">=7.2.0",
"symfony/http-foundation": "~2.1|~3.0|~4.0|~5.0",
"symfony/http-kernel": "~2.1|~3.0|~4.0|~5.0"
"symfony/http-foundation": "~2.1|~3.0|~4.0|~5.0|~6.0",
"symfony/http-kernel": "~2.1|~3.0|~4.0|~5.0|~6.0"
},
"require-dev": {
"phpunit/phpunit": "~8.0",
"symfony/routing": "^5.0"
"phpunit/phpunit": "~9.0",
"symfony/routing": "^6.0"
},
"scripts": {
"test": "phpunit --coverage-text"
Expand Down
3 changes: 0 additions & 3 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
<testsuite name="unit">
<directory>./tests/unit/</directory>
</testsuite>
<testsuite name="integration">
<directory>./tests/integration/</directory>
</testsuite>
<testsuite name="functional">
<directory>./tests/functional/</directory>
</testsuite>
Expand Down
2 changes: 1 addition & 1 deletion src/Stack/StackedHttpKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function __construct(HttpKernelInterface $app, array $middlewares)
$this->middlewares = $middlewares;
}

public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true): Response
{
return $this->app->handle($request, $type, $catch);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function __construct()
$this->kernel = new HttpKernel($this->dispatcher, $controllerResolver, new RequestStack(), $argumentResolver);
}

public function handle(Request $request, int $type = HttpKernelInterface::MASTER_REQUEST, bool $catch = true)
public function handle(Request $request, int $type = HttpKernelInterface::MASTER_REQUEST, bool $catch = true): Response
{
return $this->kernel->handle($request);
}
Expand Down
3 changes: 2 additions & 1 deletion tests/functional/ApplicationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use PHPUnit\Framework\TestCase;
use Stack\Builder;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\HttpKernelInterface;

class ApplicationTest extends TestCase
Expand Down Expand Up @@ -45,7 +46,7 @@ public function __construct(HttpKernelInterface $app, $appendix)
$this->appendix = $appendix;
}

public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true): Response
{
$response = clone $this->app->handle($request, $type, $catch);
$response->setContent($response->getContent().$this->appendix);
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/Stack/BuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public function __construct(HttpKernelInterface $app, $appendix)
$this->appendix = $appendix;
}

public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true): Response
{
$response = clone $this->app->handle($request, $type, $catch);
$response->setContent($response->getContent().$this->appendix);
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/Stack/StackedHttpKernelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public function __construct(HttpKernelInterface $kernel = null)
$this->kernel = $kernel;
}

public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true): Response
{
$this->handleCallCount++;

Expand Down