From 4e6f7418931a7cd9d9d53af71f54db99f2ac8d1a Mon Sep 17 00:00:00 2001 From: Constant Bouquet Date: Wed, 20 Mar 2024 10:12:04 +0100 Subject: [PATCH] Add symfony 7 support --- .scenarios.lock/symfony6/composer.json | 2 +- .scenarios.lock/symfony7/composer.json | 62 +++++++++++++++++++ composer.json | 7 ++- docker-compose.yml | 11 +++- src/ServiceContainer/PantherConfiguration.php | 2 +- 5 files changed, 80 insertions(+), 4 deletions(-) create mode 100644 .scenarios.lock/symfony7/composer.json diff --git a/.scenarios.lock/symfony6/composer.json b/.scenarios.lock/symfony6/composer.json index c042ccb..53ee655 100644 --- a/.scenarios.lock/symfony6/composer.json +++ b/.scenarios.lock/symfony6/composer.json @@ -32,7 +32,7 @@ "require-dev": { "dbrekelmans/bdi": "^1.0", "g1a/composer-test-scenarios": "^3.0", - "matthiasnoback/symfony-config-test": "^4.1", + "matthiasnoback/symfony-config-test": "^4.1|^5.1", "phpunit/phpunit": "~7.5|~9.3", "roave/security-advisories": "dev-master" }, diff --git a/.scenarios.lock/symfony7/composer.json b/.scenarios.lock/symfony7/composer.json new file mode 100644 index 0000000..5d0e512 --- /dev/null +++ b/.scenarios.lock/symfony7/composer.json @@ -0,0 +1,62 @@ +{ + "name": "robertfausk/behat-panther-extension", + "type": "behat-extension", + "description": "Symfony Panther extension for Behat", + "keywords": [ + "behat", + "gherkin", + "cucumber", + "symfony", + "panther", + "web", + "test", + "browser", + "chrome", + "firefox", + "gui" + ], + "license": "MIT", + "authors": [ + { + "name": "Robert Freigang", + "email": "robertfreigang@gmx.de" + } + ], + "require": { + "symfony/config": "^7.0", + "php": ">=7.2", + "behat/behat": "^3.0.5", + "robertfausk/mink-panther-driver": "^1.0", + "friends-of-behat/mink-extension": "^2.3.0" + }, + "require-dev": { + "dbrekelmans/bdi": "^1.0", + "g1a/composer-test-scenarios": "^3.0", + "matthiasnoback/symfony-config-test": "^4.1", + "phpunit/phpunit": "~7.5|~9.3", + "roave/security-advisories": "dev-master" + }, + "autoload": { + "psr-4": { + "Robertfausk\\Behat\\PantherExtension\\": "../../src/" + } + }, + "autoload-dev": { + "psr-4": { + "Tests\\": "../../tests/" + } + }, + "config": { + "sort-packages": true, + "allow-plugins": { + "g1a/composer-test-scenarios": true, + "pyrech/composer-changelogs": true + }, + "vendor-dir": "../../vendor" + }, + "extra": { + "branch-alias": { + "dev-main": "1.1.x-dev" + } + } +} diff --git a/composer.json b/composer.json index d3f02ce..b75ee2a 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,7 @@ "php": ">=7.2", "behat/behat": "^3.0.5", "robertfausk/mink-panther-driver": "^1.0", - "symfony/config": "^3.4|^4.0|^5.0|^6.0", + "symfony/config": "^3.4|^4.0|^5.0|^6.0|^7.0", "friends-of-behat/mink-extension": "^2.3.0" }, "require-dev": { @@ -58,6 +58,11 @@ "dev-main": "1.1.x-dev" }, "scenarios": { + "symfony7": { + "require": { + "symfony/config": "^7.0" + } + }, "symfony6": { "require": { "symfony/config": "^6.0" diff --git a/docker-compose.yml b/docker-compose.yml index 478980c..593fb07 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -51,6 +51,15 @@ services: build: context: . args: - - PHP_VERSION=8.2-rc + - PHP_VERSION=8.2 + volumes: + - .:/var/www/html + + php8.3: + tty: true + build: + context: . + args: + - PHP_VERSION=8.3 volumes: - .:/var/www/html diff --git a/src/ServiceContainer/PantherConfiguration.php b/src/ServiceContainer/PantherConfiguration.php index a128f74..9c94642 100644 --- a/src/ServiceContainer/PantherConfiguration.php +++ b/src/ServiceContainer/PantherConfiguration.php @@ -15,7 +15,7 @@ class PantherConfiguration implements ConfigurationInterface /** * @inheritDoc */ - public function getConfigTreeBuilder() + public function getConfigTreeBuilder(): TreeBuilder { $treeBuilder = new TreeBuilder('panther'); if (\method_exists($treeBuilder, 'getRootNode')) {