derekmd/laravel-dusk-firefox
Adds Firefox support to Laravel Dusk so you can run browser tests with geckodriver instead of Chrome. Provides the setup and browser configuration needed to swap Dusk’s default Chrome driver for Firefox with minimal changes.
This package (derekmd/laravel-dusk-firefox) is a focused integration shim that swaps Laravel Dusk's default Chrome/Chromedriver stack for Firefox/Geckodriver. It is narrow in scope: a set of console commands (dusk:install-firefox, optionally --with-chrome) plus a DuskTestCase override that points Dusk at Geckodriver rather than Chromedriver.
Architecture fit: Low-risk, additive fit. It sits on top of official Dusk with no framework internals patched. It is a dev-only dependency (require-dev territory), so blast radius on production runtime is effectively zero. That is the key architectural property for a TPM: this is test-tooling, not application code.
Integration feasibility: High for teams already on Dusk. The v3.0.0 changes are narrow: (a) Dusk ^8.0 support, and (b) an install-command-driven fix for Laravel 11 apps that deleted tests/CreatesApplication.php. Both are handled by a single artisan command, which is a favorable integration surface.
Technical risk: The genuine risk in v3.0.0 is the breaking change, and it is conditional rather than universal. Only applications that removed tests/CreatesApplication.php (a Laravel 11 option) are affected; they must re-run the install command to regenerate DuskTestCase.php without the now-missing CreatesApplication trait reference. Teams on Laravel ≤10 or who kept the file see no behavioral change. Secondary risk: version pinning. Because the package tracks Dusk major versions (^8.0), a Dusk bump is effectively a forcing function for a package bump — Dusk 8 support arriving in a major version signals a lockstep dependency to manage deliberately.
Key questions:
CreatesApplication.php has been removed? That determines whether this is a routine bump or a required remediation.require-dev with a constraint that will not silently float us onto v3.0.0 with a breaking change?--with-chrome flag matter to us (dual-browser coverage) or is Firefox-only our intent?Stack fit: Assumes a standard Laravel app with Dusk in require-dev, a tests/DuskTestCase.php file, and CI capable of launching a headless browser. No unusual prerequisites beyond a Firefox/Geckodriver binary in the pipeline image.
Migration path: Short and mechanical, but conditional. For affected apps (Laravel 11 with CreatesApplication.php deleted), the migration is the release: re-run php artisan dusk:install-firefox (or with --with-chrome) to regenerate DuskTestCase.php and drop the stale trait reference. For unaffected apps, the v3.0.0 bump is effectively a constraint update only. Either way, expect a modified tests/DuskTestCase.php, so that file should be reviewed in the PR rather than blindly accepted.
Compatibility: The headline laravel/dusk:^8.0 support needs to be matched against the Dusk constraint actually in our composer.json. If we are still on Dusk 7, v3.0.0 does not apply and we should either stay on v2.x or treat this as a coupled Dusk 8 upgrade. Laravel 11's optional file removal is the other compatibility axis; the two interact.
Sequencing:
tests/CreatesApplication.php exists.^8.0 if not already done.dusk:install-firefox and commit the regenerated DuskTestCase.php.Maintenance: Low ongoing burden, but with one persistent coupling: this package version-tracks Dusk majors. Every Dusk major is likely to require a package major, so it belongs on the dependency-review checklist rather than being left to Dependabot. The generated DuskTestCase.php is a maintained artifact and should be treated as code, not a throwaway.
Support: Straightforward. Failure signatures are well-scoped (browser won't launch, Geckodriver path wrong, missing CreatesApplication fatal on boot). The last one is the specific v3.0.0 trap: an affected app upgrading the package without re-running the install command will fail at test bootstrap with an unresolved trait. That is a loud, diagnosable failure, which is operationally preferable to a silent misconfiguration.
Scaling: Negligible product-scaling concern; this is test infrastructure. It scales horizontally with CI workers, and the real constraint is browser/Geckodriver provisioning per worker, not the package itself.
Failure modes:
CreatesApplication.php → bootstrap fatal.--with-chrome → coverage that passes on one engine and fails on the other.Ramp-up: Very low. A developer who has run Dusk once can adopt this in a single sitting; the only learning is knowing which install command to re-run after a Laravel upgrade that removes CreatesApplication.php. Document that one step in the repo's testing notes and this package requires essentially no further onboarding investment.
How can I help you explore Laravel packages today?