From b056e9b5f0e1034346db084366d11ed27da8b053 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Chru=C5=9Bciel?= Date: Mon, 9 Sep 2019 19:43:48 +0200 Subject: [PATCH] [HotFix] Force object typehint --- .../Environment/Handler/ContextServiceEnvironmentHandler.php | 5 ++++- src/Driver/SymfonyDriver.php | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Context/Environment/Handler/ContextServiceEnvironmentHandler.php b/src/Context/Environment/Handler/ContextServiceEnvironmentHandler.php index 5fe4ab8..1493794 100644 --- a/src/Context/Environment/Handler/ContextServiceEnvironmentHandler.php +++ b/src/Context/Environment/Handler/ContextServiceEnvironmentHandler.php @@ -65,7 +65,10 @@ final class ContextServiceEnvironmentHandler implements EnvironmentHandler continue; } - $symfonyContexts[$serviceId] = get_class($this->getContainer()->get($serviceId)); + /** @var object $service */ + $service = $this->getContainer()->get($serviceId); + + $symfonyContexts[$serviceId] = get_class($service); } $delegatedSuite = $this->cloneSuiteWithoutContexts($suite, array_keys($symfonyContexts)); diff --git a/src/Driver/SymfonyDriver.php b/src/Driver/SymfonyDriver.php index dbbc18a..6141925 100644 --- a/src/Driver/SymfonyDriver.php +++ b/src/Driver/SymfonyDriver.php @@ -22,6 +22,7 @@ final class SymfonyDriver extends BrowserKitDriver )); } + /** @var object $testClient */ $testClient = $kernel->getContainer()->get('test.client'); if (!$testClient instanceof Client) {