From cbea04db9f6ccc31cd75dbd72cd1524571fbae76 Mon Sep 17 00:00:00 2001 From: Maxime Veber Date: Wed, 7 Oct 2020 14:16:33 +0200 Subject: [PATCH] Remove support for Behat Sf Extension The problem here is that the symfony extension for behat is not maintained and not compatible with new versions of Symfony. It has been officialized here: https://github.com/Behat/Symfony2Extension/pull/152#issuecomment-698408775 The new correct way to use behat with Symfony is to use the package symfony extension from the FriendsOfBehat organization. - https://github.com/FriendsOfBehat/SymfonyExtension - https://github.com/symfony/recipes-contrib/tree/master/friends-of-behat/symfony-extension/2.0 --- behat/symfony2-extension/2.1/behat.yml.dist | 12 ----- .../2.1/features/bootstrap/FeatureContext.php | 48 ------------------- .../2.1/features/bootstrap/bootstrap.php | 11 ----- .../2.1/features/demo.feature | 12 ----- behat/symfony2-extension/2.1/manifest.json | 8 ---- behat/symfony2-extension/2.1/post-install.txt | 2 - 6 files changed, 93 deletions(-) delete mode 100644 behat/symfony2-extension/2.1/behat.yml.dist delete mode 100644 behat/symfony2-extension/2.1/features/bootstrap/FeatureContext.php delete mode 100644 behat/symfony2-extension/2.1/features/bootstrap/bootstrap.php delete mode 100644 behat/symfony2-extension/2.1/features/demo.feature delete mode 100644 behat/symfony2-extension/2.1/manifest.json delete mode 100644 behat/symfony2-extension/2.1/post-install.txt diff --git a/behat/symfony2-extension/2.1/behat.yml.dist b/behat/symfony2-extension/2.1/behat.yml.dist deleted file mode 100644 index b4de76f6..00000000 --- a/behat/symfony2-extension/2.1/behat.yml.dist +++ /dev/null @@ -1,12 +0,0 @@ -default: - suites: - default: - contexts: - - FeatureContext: - kernel: '@kernel' - - extensions: - Behat\Symfony2Extension: - kernel: - bootstrap: features/bootstrap/bootstrap.php - class: App\Kernel diff --git a/behat/symfony2-extension/2.1/features/bootstrap/FeatureContext.php b/behat/symfony2-extension/2.1/features/bootstrap/FeatureContext.php deleted file mode 100644 index 36378b59..00000000 --- a/behat/symfony2-extension/2.1/features/bootstrap/FeatureContext.php +++ /dev/null @@ -1,48 +0,0 @@ -kernel = $kernel; - } - - /** - * @When a demo scenario sends a request to :path - */ - public function aDemoScenarioSendsARequestTo(string $path) - { - $this->response = $this->kernel->handle(Request::create($path, 'GET')); - } - - /** - * @Then the response should be received - */ - public function theResponseShouldBeReceived() - { - if ($this->response === null) { - throw new \RuntimeException('No response received'); - } - } -} diff --git a/behat/symfony2-extension/2.1/features/bootstrap/bootstrap.php b/behat/symfony2-extension/2.1/features/bootstrap/bootstrap.php deleted file mode 100644 index c6d7aa06..00000000 --- a/behat/symfony2-extension/2.1/features/bootstrap/bootstrap.php +++ /dev/null @@ -1,11 +0,0 @@ -bootEnv(dirname(__DIR__, 2).'/.env'); -} diff --git a/behat/symfony2-extension/2.1/features/demo.feature b/behat/symfony2-extension/2.1/features/demo.feature deleted file mode 100644 index 295db96e..00000000 --- a/behat/symfony2-extension/2.1/features/demo.feature +++ /dev/null @@ -1,12 +0,0 @@ -# This file contains a user story for demonstration only. -# Learn how to get started with Behat and BDD on Behat's website: -# http://behat.org/en/latest/quick_start.html - -Feature: - In order to prove that the Behat Symfony extension is correctly installed - As a user - I want to have a demo scenario - - Scenario: It receives a response from Symfony's kernel - When a demo scenario sends a request to "/" - Then the response should be received diff --git a/behat/symfony2-extension/2.1/manifest.json b/behat/symfony2-extension/2.1/manifest.json deleted file mode 100644 index 73d92320..00000000 --- a/behat/symfony2-extension/2.1/manifest.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "copy-from-recipe": { - "behat.yml.dist": "behat.yml.dist", - "features/": "features/" - }, - "aliases": ["behat"], - "gitignore": ["behat.yml"] -} diff --git a/behat/symfony2-extension/2.1/post-install.txt b/behat/symfony2-extension/2.1/post-install.txt deleted file mode 100644 index 174c1204..00000000 --- a/behat/symfony2-extension/2.1/post-install.txt +++ /dev/null @@ -1,2 +0,0 @@ - Next for Behat/SymfonyExtension - Run vendor/bin/behat to run the demo tests.