From 812619cec588487c9b46c89f0303bbe653f41d74 Mon Sep 17 00:00:00 2001 From: Thomas Calvet Date: Fri, 17 Dec 2021 18:14:27 +0100 Subject: [PATCH] [FrameworkBundle] Add @return TestContainer to KernelTestCase::getContainer() --- .github/expected-missing-return-types.diff | 43 +++++++++++++++++++ .../FrameworkBundle/Test/KernelTestCase.php | 2 + 2 files changed, 45 insertions(+) diff --git a/.github/expected-missing-return-types.diff b/.github/expected-missing-return-types.diff index 44b63da9aa28f..594290521dab2 100644 --- a/.github/expected-missing-return-types.diff +++ b/.github/expected-missing-return-types.diff @@ -16,6 +16,17 @@ index 1750d55ee2..c18494167a 100644 + ] }, +diff --git a/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php b/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php +index d68ae4c8b3..8e980a9e70 100644 +--- a/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php ++++ b/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php +@@ -88,5 +88,5 @@ abstract class KernelTestCase extends TestCase + * @return TestContainer + */ +- protected static function getContainer(): ContainerInterface ++ protected static function getContainer(): TestContainer + { + if (!static::$booted) { diff --git a/src/Symfony/Component/BrowserKit/AbstractBrowser.php b/src/Symfony/Component/BrowserKit/AbstractBrowser.php index 697e34cb77..9a1e4c5618 100644 --- a/src/Symfony/Component/BrowserKit/AbstractBrowser.php @@ -1019,3 +1030,35 @@ index d6dcdf178f..0ab8d9c10e 100644 + public function getTargets(): string|array { return self::PROPERTY_CONSTRAINT; +diff --git a/src/Symfony/Component/Workflow/Event/Event.php b/src/Symfony/Component/Workflow/Event/Event.php +index cd7fab7896..b340eba38e 100644 +--- a/src/Symfony/Component/Workflow/Event/Event.php ++++ b/src/Symfony/Component/Workflow/Event/Event.php +@@ -42,5 +42,5 @@ class Event extends BaseEvent + * @return Marking + */ +- public function getMarking() ++ public function getMarking(): Marking + { + return $this->marking; +@@ -50,5 +50,5 @@ class Event extends BaseEvent + * @return object + */ +- public function getSubject() ++ public function getSubject(): object + { + return $this->subject; +@@ -58,5 +58,5 @@ class Event extends BaseEvent + * @return Transition|null + */ +- public function getTransition() ++ public function getTransition(): ?Transition + { + return $this->transition; +@@ -71,5 +71,5 @@ class Event extends BaseEvent + * @return string + */ +- public function getWorkflowName() ++ public function getWorkflowName(): string + { + return $this->workflow->getName(); diff --git a/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php b/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php index ba02c761d73dc..d68ae4c8b3ba5 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php +++ b/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php @@ -84,6 +84,8 @@ protected static function bootKernel(array $options = []): KernelInterface * used by other services. * * Using this method is the best way to get a container from your test code. + * + * @return TestContainer */ protected static function getContainer(): ContainerInterface {