Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Dusk Updater Api Laravel Package

orchestra/dusk-updater-api

Standardized API for Laravel Dusk to query, fetch, and download compatible ChromeDriver binaries. Helps automate driver updates across environments with a simple, consistent interface for locating versions and retrieving platform-specific builds.

View on GitHub
Deep Wiki
Context7

Getting Started

Start by installing the package via Composer:

composer require orchestra/dusk-updater-api --dev

The package provides a standardized API to fetch ChromeDriver binaries for Laravel Dusk. It does not auto-install or manage ChromeDriver directly — it only exposes methods to retrieve version info and download URLs. To use it, inject Orchestra\DuskUpdaterApi\ChromeVersionFinder or Orchestra\DuskUpdaterApi\ChromeDriverDownloader into your build/test scripts or custom tooling. The first logical use case is verifying compatibility: check the installed Chrome/Chromium version against the corresponding ChromeDriver version supported by the API.

Implementation Patterns

  • CI/CD Integration: Use the downloader in your CI pipeline (e.g., GitHub Actions, GitLab CI) to ensure the correct ChromeDriver is fetched before running Dusk tests:
    $downloader = new \Orchestra\DuskUpdaterApi\ChromeDriverDownloader();
    $downloader->downloadChromeDriver('127.0.6533.119', '/path/to/bin');
    
  • Version Consistency Checks: Pair ChromeVersionFinder::installedChromeVersion() with ChromeVersionFinder::chromeDriverVersion() to compare runtime vs. available versions, alerting developers to mismatches during local dev or test setup.
  • Extensibility via Extensions: While minimal, the package defines interfaces like ChromeVersionFinderInterface. You can wrap it in your own service to add caching, fallback logic (e.g., fallback to stable version if exact match unavailable), or integration with tools like Laravel Forge or Sidekick (via orchestra/sidekick as noted in v1.0.2).

Gotchas and Tips

  • No CLI Command Provided: Unlike orchestra/dusk-updater (its predecessor), this package is API-only — no artisan command. Developers expecting CLI usage must build their own wrapper (e.g., php artisan dusk:update-driver).
  • Version Pinning Risk: Chrome releases frequently. Always validate download URLs before caching — rely on ChromeDriverDownloader::getDownloadUrl() for dynamic resolution instead of hardcoding URLs.
  • Platform awareness required: The API expects correct OS/arch detection (Linux/macOS/Windows + x64/arm64). Ensure your runtime environment provides accurate info via PHP_OS_FAMILY and architecture detection (e.g., php_uname('m')).
  • Silent errors in old PHP versions: Though v1.0.4 added PHP 8.5 support, ensure your CI/test environment matches — missing type checks or Stringable usage could cause silent failures if using older PHP versions.
  • Not a replacement for laravel/dusk auto-downloader: This package targets advanced use cases (e.g., containerized builds, headless deployments); for simple local setups, stick with dusk update.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4