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

Bdi Laravel Package

dbrekelmans/bdi

Composer-installable PHAR for Browser Driver Installer. Automates downloading and managing browser drivers (e.g., ChromeDriver/GeckoDriver) for PHP test setups. Releases are built automatically via GitHub Actions; contribute to the main tool repo.

View on GitHub
Deep Wiki
Context7

Getting Started

Start by requiring the package via Composer:

composer require --dev dbrekelmans/bdi

This installs the browser-driver-installer PHAR as a Composer executable (vendor/bin/bdi). Run it once to see available commands:

vendor/bin/bdi list

The primary use case is automating browser driver (e.g., ChromeDriver, geckodriver) installation for browser automation tools like WebDriver (Selenium, PHP WebDriver) or testing frameworks (Laravel Dusk, Behat). Run vendor/bin/bdi install to download and place the latest compatible drivers in ~/.bdi/drivers.

Implementation Patterns

  • CI/CD Integration: Include vendor/bin/bdi install in your CI pipeline before browser tests run (e.g., in before_script or steps), ensuring up-to-date drivers without hard-coding versions.
  • Project-Agnostic Setup: Add vendor/bin/bdi to your composer.json scripts section for team consistency:
    "scripts": {
      "bdi:install": "@php vendor/bin/bdi install"
    }
    
    Then run composer bdi:install before testing locally.
  • Laravel Dusk: Pair with dusk-updater or custom Artisan commands; for example, create php artisan dusk:drivers that calls exec('vendor/bin/bdi install').
  • Custom Driver Paths: Override the default driver directory via config (e.g., ~/.bdi/config.yml):
    drivers_dir: "/path/to/project/drivers"
    

Gotchas and Tips

  • PHAR Execution: Ensure allow_url_fopen is enabled and phar wrapper is not disabled in php.ini; otherwise, vendor/bin/bdi may fail silently.
  • Architecture Mismatch: Drivers are architecture-specific. In Docker or non-x86 CI environments (e.g., ARM), verify driver compatibility—manual --arch flag might be needed: vendor/bin/bdi install --arch=arm64.
  • Version Pinning: For stability in production test runs, use vendor/bin/bdi install --browser-version=118 to lock driver versions matching your browser environments.
  • Debugging Failures: Run with -vvv for verbose output to inspect download URLs, HTTP status codes, and system environment checks.
  • Extension Points: The package respects ~/.bdi/config.yml. Use it to set default options (e.g., auto_update: true) or custom driver source mirrors for air-gapped environments.
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.
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle