- What does staudenmeir/dusk-updater actually do for Laravel Dusk?
- It updates the ChromeDriver and Chromium binaries bundled with Laravel Dusk so they match the Chrome version installed on your machine or CI runner. Dusk ships fixed binaries that go stale, which causes browser tests to fail after every Chrome update. The package resolves the correct driver version and downloads it for you, either through a manual Artisan command or automatically before Dusk runs.
- How do I install dusk-updater in a Laravel application?
- Install it as a dev dependency with composer require --dev staudenmeir/dusk-updater. Laravel package auto-discovery registers the service provider, so no manual wiring is usually required. Because it is test tooling only, keep it in require-dev and never in production dependencies.
- How do I run the dusk:update command manually?
- Run php artisan dusk:update from your project root after Chrome has been updated. The command detects your installed Chrome version and downloads the matching driver binary into Dusk's driver directory. It is useful as a one-off fix when tests suddenly fail with a driver or session version mismatch.
- Can Dusk update the driver automatically before tests run?
- Yes. The package is designed to perform the update automatically before Dusk runs, so tests do not fail on a version mismatch after a browser update. That makes the common workflow just php artisan dusk, with no extra step in your local routine. In CI you can still call php artisan dusk:update explicitly before php artisan dusk for clearer logs.
- Does dusk-updater still matter on Laravel Dusk 8, which ships its own dusk:chrome-driver command?
- Newer Dusk releases include a built-in dusk:chrome-driver command that covers much of the same ground, so on Dusk 8 and later this package is often redundant. Check which Dusk version your project uses before adding another dependency. If you are on an older Dusk release with stale bundled binaries, dusk-updater remains a targeted fix.
- Can I pin a specific ChromeDriver version or use the beta channel?
- Yes. The package supports the stable and beta channels as well as custom versions, so you can match a beta Chrome install or pin a driver for reproducible environments. Pinning is the safer choice for CI images where you want deterministic builds. Leaving it on stable simply matches whatever Chrome is installed.
- How do I change where the driver binaries are downloaded?
- Set the DUSK_UPDATER_PATH environment variable to the directory you want the binaries written to. This helps when Dusk's default vendor path is read-only in a container or when you want a shared cache across jobs. Make sure the target directory is writable by the process running the tests.
- Which PHP and Laravel versions does dusk-updater support?
- The v1.5.1 release notes do not enumerate supported PHP, Laravel, and Dusk ranges, so check the composer.json constraints in the repository against your project matrix. In general it requires PHP and Laravel versions compatible with the Dusk release you are running. A maintenance release targeting ChromeDriver 127+ implies a reasonably modern Dusk version, so verify before pinning in an older application.
- Will dusk-updater work in CI, Docker, and ARM runners?
- It can, but the package needs to detect the installed Chrome version, so Chrome or Chromium must actually be present in the image rather than only on a developer laptop. Runners also need outbound HTTPS access to the Chrome for Testing download endpoints, or a proxy configured for them. Confirm that a matching driver binary exists for your architecture, including x86_64, ARM64, Apple Silicon, and musl-based images.
- Does dusk-updater support Firefox via GeckoDriver, or only Chrome and Chromium?
- Its primary purpose is keeping ChromeDriver and Chromium aligned with your installed Chrome, which is what most Dusk suites test against. Documentation references also mention GeckoDriver, so check the current README before relying on it for a Firefox test matrix. If you need guaranteed cross-browser coverage, verify support rather than assuming it.