diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index afc726a..420b017 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -37,6 +37,10 @@ jobs: name: Composer validate run: composer validate --strict --ansi + - + name: Run Psalm + run: vendor/bin/psalm src --no-progress + - name: Run tests run: vendor/bin/behat -f progress --strict -vvv --no-interaction --colors diff --git a/composer.json b/composer.json index 75e38bd..58a4728 100644 --- a/composer.json +++ b/composer.json @@ -14,11 +14,8 @@ "behat/behat": "^3.4" }, "require-dev": { - "friends-of-behat/cross-container-extension": "^1.0", - "friends-of-behat/test-context": "^1.0" - }, - "suggest": { - "friends-of-behat/cross-container-extension": "^1.0" + "friends-of-behat/test-context": "^1.2", + "vimeo/psalm": "4.1.1" }, "autoload": { "psr-4": { diff --git a/features/not_crashing_behat_with_cross_container_extension.feature b/features/not_crashing_behat_with_cross_container_extension.feature deleted file mode 100644 index 6056f40..0000000 --- a/features/not_crashing_behat_with_cross_container_extension.feature +++ /dev/null @@ -1,17 +0,0 @@ -Feature: Usage of ServiceContainerExtension together with CrossContainerExtension - In order to reference cross-container services and parameters inside Behat container - As a Behat User - I need to use ServiceContainerExtension and CrossContainerExtension together - - Scenario: Not crashing Behat - Given a Behat configuration containing: - """ - default: - extensions: - FriendsOfBehat\ServiceContainerExtension: ~ - - FriendsOfBehat\CrossContainerExtension: ~ - """ - And a feature file with passing scenario - When I run Behat - Then it should pass diff --git a/psalm.xml b/psalm.xml new file mode 100644 index 0000000..3e4e3d0 --- /dev/null +++ b/psalm.xml @@ -0,0 +1,15 @@ + + + + + + + + + diff --git a/src/ServiceContainer/ServiceContainerExtension.php b/src/ServiceContainer/ServiceContainerExtension.php index b5a066f..fe42924 100644 --- a/src/ServiceContainer/ServiceContainerExtension.php +++ b/src/ServiceContainer/ServiceContainerExtension.php @@ -32,11 +32,6 @@ */ final class ServiceContainerExtension implements Extension { - /** - * @var CompilerPassInterface|null - */ - private $crossContainerProcessor; - /** * {@inheritdoc} */ @@ -50,12 +45,7 @@ public function getConfigKey(): string */ public function initialize(ExtensionManager $extensionManager): void { - /** @var CrossContainerExtension $extension */ - $extension = $extensionManager->getExtension('fob_cross_container'); - if (null !== $extension) { - $this->crossContainerProcessor = $extension->getCrossContainerProcessor(); - } } /** @@ -90,9 +80,7 @@ public function load(ContainerBuilder $container, array $config): void */ public function process(ContainerBuilder $container): void { - if (null !== $this->crossContainerProcessor) { - $this->crossContainerProcessor->process($container); - } + } private function createLoader(ContainerBuilder $container, array $config): LoaderInterface