- How do I install robertfausk/behat-panther-extension in a Laravel project?
- Install it as a dev dependency with Composer, then enable the extension in your Behat configuration. Behat 3 projects typically use behat.yml, while Behat 4 projects use a PHP config file. There is no Laravel service provider, so you still need to write Behat contexts that point Panther at your running Laravel app. Confirm the v2.0.0 tag is published and installable before planning around it.
- Does Behat Panther Extension work with Laravel 11 and Laravel 12?
- It can work indirectly because Laravel 11 and 12 require PHP 8.2 or newer, which matches v2.0.0's floor. The package does not integrate with Laravel's testing helpers or service container; Panther simply drives a real browser against a running Laravel application. You remain responsible for contexts covering authentication, seeding, queue setup, and database reset.
- Can I use this extension with Laravel 10 or PHP 8.1?
- No for v2.0.0, which drops PHP 7.2 through 8.1 and Symfony 3 and 4 support. Laravel 10 applications still pinned to PHP 8.1 cannot use this release and would need an older package version or a PHP upgrade. This creates a real tooling fragmentation risk if your fleet runs mixed Laravel versions.
- How do I configure Panther sessions for headless Chrome in Behat?
- Enable the extension and define Panther client or session options in your Behat configuration, including browser arguments such as headless mode, no-sandbox, and disabled GPU where appropriate. Point the WebDriver configuration at your Selenium 4 or W3C-compatible driver host and port. Behat 3 uses YAML configuration while Behat 4 uses a PHP config file, so the syntax differs between those setups.
- Does this package replace Laravel Dusk for browser testing?
- It is an alternative approach rather than a drop-in Dusk replacement. Dusk is Laravel-native and PHPUnit-based, while this package commits you to Behat and Gherkin as the acceptance-test authoring layer. Both can drive a real browser, but Dusk ships with Laravel-specific helpers that this extension does not provide.
- How do I run JavaScript-heavy Gherkin scenarios against a Laravel app?
- Use Panther's real-browser session so scenarios execute in Chrome or Firefox rather than a fast HTTP client. Run the Laravel app through Sail, Docker, artisan serve, Octane, or a CI service, and make sure the browser and WebDriver versions are compatible. Add explicit waits in your contexts or step definitions so asynchronous JavaScript has time to finish.
- What Behat and Symfony versions does Behat Panther Extension v2.0.0 support?
- v2.0.0 supports PHP 8.2 through 8.5, Behat 3.x with YAML configuration, Behat 4.x with PHP configuration, Symfony 8, Panther, and Selenium 4 or W3C drivers. Behat 4 support was added by merging an unmerged upstream pull request, so treat it as working but thinly validated. Documentation and community answers are likely to lag behind this fresh major version.
- How should I handle database reset and authentication between Behat scenarios?
- The package does not provide Laravel hooks such as RefreshDatabase or DatabaseTransactions for Behat. Implement reset logic in custom Behat contexts or hooks, for example migrating and seeding once per suite and truncating or wrapping each scenario in a transaction. Authentication can be handled with login steps, pre-created users, or session cookies, and Artisan-driven factories help keep fixtures deterministic.
- Is Behat Panther Extension safe for CI, and what licensing concerns exist?
- It is a dev and test dependency, so do not ship it to production. In CI, run Selenium or a compatible WebDriver in Docker, pin browser and driver versions, and budget for Chrome's frequent release cadence breaking pins. The larger concern is licensing: release metadata still shows NOASSERTION with no clear license statement, so legal should confirm terms before internal distribution or redistribution.
- How actively maintained is robertfausk/behat-panther-extension, and what are the alternatives?
- v2.0.0 shows real activity, external contributors, CI coverage through PHP 8.5, and early Symfony 8 tracking, which is evidence against abandonment. However, the project still has a bus factor of roughly one and a small star count, and Behat 4 support arrived ahead of upstream review. Alternatives include Laravel Dusk, Pest browser plugins, raw Symfony Panther, and Codeception, with the main decision being whether your team commits to Behat and Gherkin.