Skip to content

Commit

Permalink
symfony7 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
dennispansegrau committed Jan 9, 2024
1 parent d9cb06f commit 7ea3e74
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
10 changes: 3 additions & 7 deletions Tests/Payload/GeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function testGetServerInfo(): void
*/
public function testGetRequestInfo(): void
{
$container = self::getContainer();
$container = static::$kernel->getContainer();
$generator = $this->getGenerator();

$request = $container->get('request_stack')->getCurrentRequest();
Expand Down Expand Up @@ -185,15 +185,11 @@ public function testGetExceptionPayload(): void
$this->assertEquals($serverInfo, $payload['server']);
}

protected static function getContainer(): ContainerInterface
{
return static::$container ?? static::$kernel->getContainer();
}

private function getGenerator(): Generator
{
$container = static::$kernel->getContainer();
/** @var $generator Generator */
$generator = self::getContainer()->get('test.' . Generator::class);
$generator = $container->get('test.' . Generator::class);
return $generator;
}
}
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@
"require": {
"php": ">=8.0.2",
"rollbar/rollbar": "^3.1|^4.0",
"symfony/dependency-injection": "^5.4|^6.2",
"symfony/config": "^5.4|^6.2",
"symfony/http-kernel": "^5.4|^6.2",
"symfony/dependency-injection": "^5.4|^6.2|^7.0",
"symfony/config": "^5.4|^6.2|^7.0",
"symfony/http-kernel": "^5.4|^6.2|^7.0",
"symfony/monolog-bundle": "^3.8",
"symfony/serializer": "^5.4|^6.2",
"symfony/serializer": "^5.4|^6.2|^7.0",
"ext-json": "*"
},
"require-dev": {
"phpunit/phpunit": "^9.6|^10.1",
"symfony/framework-bundle": "^5.4|^6.2",
"symfony/framework-bundle": "^5.4|^6.2|^7.0",
"squizlabs/php_codesniffer": "^3.7",
"matthiasnoback/symfony-dependency-injection-test": "^4.3"
},
Expand Down

0 comments on commit 7ea3e74

Please sign in to comment.