Skip to content

Commit

Permalink
Merge branch 'master' into possibility-to-use-service-as-preson_fn
Browse files Browse the repository at this point in the history
  • Loading branch information
zinkovskiy committed Feb 15, 2024
2 parents 63e0453 + ed4e189 commit 1a936d6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 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;
}
}
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@
"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",
"ext-json": "*",
"symfony/serializer": "^5.4|^6.2|^7.0",
"symfony/security-core": "^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 1a936d6

Please sign in to comment.