yannickgranger / symfony-extension
Integrates Behat with Symfony. Supports Symfony 6.4/7.x/8.x and Behat 3/4. Features lazy driver kernel and improved architecture.
Installs: 27
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 68
Open Issues: 0
Language:Gherkin
Type:behat-extension
pkg:composer/yannickgranger/symfony-extension
Requires
- php: ^8.1
- behat/behat: ^3.22 || ^4.0
- symfony/dependency-injection: ^6.4 || ^7.0 || ^8.0
- symfony/http-kernel: ^6.4 || ^7.0 || ^8.0
Requires (Dev)
- behat/mink: ^1.9
- behat/mink-browserkit-driver: ^2.0
- behat/mink-selenium2-driver: ^1.3
- friends-of-behat/mink-extension: ^2.5
- friends-of-behat/page-object-extension: ^0.3.2
- friends-of-behat/service-container-extension: ^1.1
- sylius-labs/coding-standard: >=4.1.1, <=4.2.1
- symfony/browser-kit: ^6.4 || ^7.0 || ^8.0
- symfony/framework-bundle: ^6.4 || ^7.0 || ^8.0
- symfony/process: ^6.4 || ^7.0 || ^8.0
- symfony/yaml: ^6.4 || ^7.0 || ^8.0
- vimeo/psalm: ^6.0
Suggests
- behat/mink: ^1.9
- behat/mink-browserkit-driver: ^2.0
- friends-of-behat/mink-extension: ^2.5
- dev-master / 3.0.x-dev
- v3.0.0
- v2.6.2
- v2.6.1
- v2.6.0
- v2.5.0
- v2.4.2
- v2.4.1
- v2.4.0
- v2.3.1
- v2.3.0
- v2.2.1
- v2.2.0
- 2.1.x-dev
- v2.1.0
- v2.1.0-RC.2
- v2.1.0-RC.1
- v2.1.0-BETA.2
- v2.1.0-BETA.1
- 2.0.x-dev
- v2.0.11
- v2.0.10
- v2.0.9
- v2.0.8
- v2.0.7
- v2.0.6
- v2.0.5
- v2.0.4
- v2.0.3
- v2.0.2
- v2.0.1
- v2.0.0
- v2.0.0-rc.4
- v2.0.0-rc.3
- v2.0.0-rc.2
- v2.0.0-rc.1
- v2.0.0-beta.3
- v2.0.0-beta.2
- v2.0.0-beta.1
- 1.4.x-dev
- v1.4.0
- v1.3.1
- v1.3.0
- v1.2.2
- v1.2.1
- v1.2.0
- v1.1.0
- v1.0.0
- v0.2.1
- v0.2.0
- v0.1.0
- dev-test/debug-error-handler
- dev-docs/open-source-preparation
This package is auto-updated.
Last update: 2026-01-25 19:05:26 UTC
README
SymfonyExtension
Fork Notice: This is a maintained fork of FriendsOfBehat/SymfonyExtension with improved architecture and extended version support.
This Behat extension provides an integration with Symfony (^6.4, ^7.0, and ^8.0) and Mink driver for Symfony applications. Also supports Behat 4.
It allows for:
-
defining your contexts as regular Symfony services
-
autowiring and autoconfiguring your contexts
-
testing your Symfony application without having to set up a server
What's Different in This Fork
| Feature | Original | This Fork |
|---|---|---|
| Symfony support | 6.4, 7.0 | 6.4, 7.0, 8.0 |
| Behat support | 3.x | 3.x, 4.x |
| Kernel management | Dual-kernel, tightly coupled | KernelManager with lazy driver kernel |
| Driver kernel | Always created | Lazy-loaded (only when Mink used) |
Architecture Improvements
- KernelManager: Centralized lifecycle management for context and driver kernels
- Lazy driver kernel: Only instantiated when Mink makes first HTTP request
- Cleaner separation: Explicit
setUp()/tearDown()lifecycle hooks
Installation
composer require yannickgranger/symfony-extension --dev
Migration from FriendsOfBehat/SymfonyExtension
This is a drop-in replacement. No configuration changes needed:
# Remove old package composer remove friends-of-behat/symfony-extension # Install this fork composer require yannickgranger/symfony-extension --dev
Your existing behat.yml configuration will work as-is.
Documentation
For a bit of backstory, take a look at the SymfonyExtension v2.0.0 release blogpost.
Versioning and release cycle
This package follows semantic versioning.
Public API is defined as configuration and behaviour defined in form of testable scenarios in the features directory.
This means once your application is configured to use Behat with SymfonyExtension,
it shall continue to work flawlessly within the same major version.
License
This extension is completely free and released under permissive MIT license.
Authors
Originally created by Kamil Kokot. See the list of all contributors.
Fork maintained by Yannick Granger.