yannickgranger/symfony-extension
Composer 安装命令:
composer require --dev 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.
README 文档
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.
统计信息
- 总下载量: 616
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-01-25