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

O Dusk Updater Laravel Package

wpstarter/o-dusk-updater

Symfony Console tool to update Laravel Dusk ChromeDriver binaries outside Laravel. Download latest or specified Chrome/Chromium/ChromeDriver versions, detect installed Chrome and driver versions, and optionally auto-update when outdated.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

  • Purpose Alignment: The package solves a critical pain point in Laravel Dusk and broader PHP testing ecosystems by automating ChromeDriver version management. It aligns with shift-left testing, CI/CD reliability, and infrastructure-as-code principles, where binary dependencies must be dynamically or statically version-controlled.
  • Symfony Console Abstraction: The decoupling from Laravel via Symfony Console enables multi-framework adoption (e.g., Symfony, standalone PHP projects), expanding its utility beyond Laravel’s niche. This modularity reduces vendor lock-in and simplifies integration into non-Laravel workflows.
  • Binary-Focused Design: Operates at the operating system level (binaries in vendor/bin/), making it lightweight and non-invasive to application logic. Ideal for projects where Dusk is a secondary concern (e.g., testing utilities, microservices).

Integration Feasibility

  • Minimal Coupling: The package interacts only with ChromeDriver binaries and the filesystem, requiring no changes to Laravel core or application code. This reduces integration risk and refactoring effort.
  • Dependency Lightweightness: Relies solely on symfony/console and guzzlehttp/guzzle, with no heavyweight or Laravel-specific dependencies. This ensures low overhead and predictable performance.
  • Cross-Platform Compatibility: Explicitly supports Linux/macOS/Windows, though Docker/containerized environments may require additional configuration (e.g., volume permissions, user context).
  • CI/CD Readiness: Designed for automation with clear CLI interfaces, making it a natural fit for GitHub Actions, GitLab CI, or Jenkins pipelines.

Technical Risk

Risk Area Description Mitigation Strategy
Version Mismatch ChromeDriver must match Chrome/Chromium major version; mismatches cause test failures. Enforce version pinning in CI (e.g., update 114) and validate pre-test execution.
Permission Issues Writing to vendor/bin/ may fail in restrictive environments (e.g., Docker). Use entrypoint scripts or Docker volume mounts with correct permissions.
Network Dependencies Relies on GitHub API for ChromeDriver releases; outages block updates. Cache releases locally or use a mirror/CDN for offline environments.
Binary Compatibility Older ChromeDriver versions may lack support for modern Chrome features. Test with LTS Chrome versions and deprioritize cutting-edge releases.
Legacy Support No explicit support for ChromeDriver versions <74. Audit target versions; avoid if using legacy stacks.
Flaky Tests Outdated ChromeDriver can introduce intermittent failures. Run updates pre-test in CI and monitor failure rates post-integration.

Key Questions

  1. Version Strategy:
    • Should the project pin ChromeDriver versions (e.g., 114.x) or allow auto-updates to latest?
    • How will Chrome auto-updates (e.g., in CI environments) interact with ChromeDriver versions?
  2. CI/CD Integration:
    • Where in the pipeline should updates occur? (e.g., pre-test, post-build, or nightly).
    • How will failed updates be handled (e.g., rollback, alerting)?
  3. Environment Consistency:
    • Are Chrome/Chromium versions homogeneous across dev/staging/prod?
    • How will this integrate with Dockerized or serverless testing environments?
  4. Customization Needs:
    • Are there plans to extend this for Firefox/Edge drivers or other browser tools?
    • Will custom ChromeDriver flags (e.g., --headless) need to be preserved post-update?
  5. Security Compliance:
    • Does the organization require manual approval for dependency updates?
    • How will offline/air-gapped environments be supported?
  6. Monitoring:
    • Should update success/failure be logged or integrated into incident management?
    • How will test stability metrics (e.g., flakiness) be correlated with ChromeDriver updates?

Integration Approach

Stack Fit

  • Primary Use Cases:
    • Laravel Dusk: Native integration for Laravel projects using Dusk for browser testing.
    • Standalone PHP Testing: Ideal for projects using Dusk outside Laravel (e.g., Symfony, custom PHP apps).
    • CI/CD Pipelines: Seamless integration with GitHub Actions, GitLab CI, or Jenkins as a pre-test step.
    • Dockerized Environments: Update ChromeDriver binaries in Dockerfile or entrypoint scripts.
    • Multi-Environment Testing: Ensure consistency across dev/staging/prod by pinning versions.
  • Non-Fit Scenarios:
    • Non-Chrome Browsers: Projects using Firefox/Edge/Safari exclusively (consider Selenium or Playwright).
    • Strict Version Locking: Environments where all binaries are pinned (e.g., air-gapped systems).
    • Legacy Laravel (<5.5): Minimal Dusk support; may require custom scripting.

Migration Path

  1. Assessment Phase:
    • Audit Current Setup:
      • Identify Chrome/Chromium versions across environments.
      • Check existing ChromeDriver versions (vendor/bin/chromedriver or CI logs).
    • Define Version Strategy:
      • Decide between auto-updates (latest) or pinned versions (e.g., 114).
      • Document compatibility matrix (e.g., Chrome 114 → ChromeDriver 114.x).
  2. Pilot Integration:
    • Installation:
      composer require --dev wpstarter/dusk-updater
      
    • Test in Isolation:
      • Run manually in a non-production environment:
        ./vendor/bin/dusk-updater detect      # Check current versions
        ./vendor/bin/dusk-updater update 114  # Test update
        
    • Validate:
      • Confirm Dusk tests pass with the new ChromeDriver.
      • Check for permission issues or binary corruption.
  3. CI/CD Integration:
    • GitHub Actions Example:
      - name: Update ChromeDriver
        run: ./vendor/bin/dusk-updater update ${{ env.CHROMEDRIVER_VERSION }}
      
    • GitLab CI Example:
      before_script:
        - ./vendor/bin/dusk-updater update 114
      
    • Docker Integration:
      • Add to Dockerfile:
        RUN ./vendor/bin/dusk-updater update 114
        
      • Or use an entrypoint script to update pre-test.
  4. Rollout Strategy:
    • Phased Adoption:
      • Start with one team/project to validate impact.
      • Gradually expand to other Dusk users in the organization.
    • Documentation:
      • Update README.md with supported ChromeDriver versions.
      • Add a troubleshooting section for common issues (e.g., permissions, version mismatches).

Compatibility

Component Compatibility Notes
Laravel Dusk Fully compatible; designed for Laravel Dusk workflows.
Symfony/PHP Works outside Laravel due to Symfony Console; ideal for standalone testing suites.
ChromeDriver Must match major version of Chrome/Chromium (e.g., Chrome 114 → ChromeDriver 114.x).
Operating Systems Tested on Linux/macOS/Windows; Docker requires volume permissions.
CI/CD Systems Compatible with GitHub Actions, GitLab CI, Jenkins, etc.
Containerization Works in Docker but may need user/permission adjustments (e.g., USER node).

Sequencing

  1. Pre-requisites:
    • Ensure vendor/bin/ is writable (fix permissions if needed).
    • Verify Chrome/Chromium is installed and accessible in the PATH.
    • For Docker: Use a non-root user with access to vendor/bin/.
  2. Execution Workflow:
    • Option 1: Pre-Test Update (Recommended)
      • Run in CI before tests to ensure compatibility:
        - name: Update ChromeDriver
          run: ./vendor/bin/dusk-updater update 114
        - name: Run Dusk Tests
          run: php artisan dusk
        
    • Option 2: Build-Time Update
      • Update ChromeDriver during image build (for Docker):
        RUN
        
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