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

Multi Tester Laravel Package

kylekatarnls/multi-tester

Run unit tests across multiple Composer projects after changing a shared package. Multi-tester swaps your local package into dependent projects’ vendor dirs and runs their test suites (Travis CI-style supported), catching integration breakages early.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

  • Laravel/PHP Ecosystem Alignment: Seamlessly integrates with Composer, the de facto package manager for Laravel/PHP projects. Leverages Laravel’s dependency graph (e.g., illuminate/, spatie/, laravel/) to validate changes pre-release, reducing cascading failures.
  • Modular Design: Configurable via .multi-tester.yml or JSON, allowing granular control over test workflows (clone, install, script execution). Supports multi-version testing (e.g., Laravel 9.x–11.x) and Travis/GitHub Actions out of the box.
  • Travis/GitHub Actions Native: Designed for CI/CD pipelines, with built-in support for parallel testing and environment isolation. Reduces CI complexity by consolidating cross-project validation into a single step.
  • PHP Version Compatibility: Supports PHP 7.2+ (Laravel’s minimum for 8.x/9.x) and actively maintains compatibility with Symfony 8+, aligning with Laravel’s stack.

Integration Feasibility

  • Composer-Centric: Requires no Laravel-specific modifications; works with any Composer-managed PHP project. Ideal for Laravel packages, utilities, or frameworks.
  • Dependency Replacement: Dynamically swaps your package in dependent projects’ vendor/ directories, enabling real-world validation without manual setup.
  • Travis/GitHub Actions Integration: Minimal configuration required (e.g., adding MULTITEST='on' to .travis.yml). Example:
    script:
      - if [ "$MULTITEST" = "on" ]; then vendor/bin/multi-tester; fi;
    
  • Config-Driven: Centralizes test logic in .multi-tester.yml, reducing duplication and easing maintenance. Supports inheritance (e.g., default settings for all projects).

Technical Risk

  • False Positives/Negatives: Risk of missing edge cases if dependent projects use unconventional Composer setups (e.g., custom replace keys, monorepos). Mitigate by:
    • Starting with high-impact dependencies (e.g., laravel/framework).
    • Using --verbose to debug failures.
  • CI Resource Overhead: Testing multiple projects/versions may increase CI runtime. Mitigate by:
    • Running multi-tester in parallel (Travis/GitHub Actions matrix).
    • Using stop_on_failure to fail fast.
  • Dependency Version Conflicts: Swapping packages may expose version mismatches (e.g., PHP 8.1 vs. 8.3). Mitigate by:
    • Testing against matrix of Laravel/PHP versions.
    • Using version constraints in .multi-tester.yml (e.g., symfony/symfony:5.4.*).
  • Limited VCS Support: Only supports Git (not Mercurial/SVN). Non-issue for Laravel/PHP, which uses Git ubiquitously.

Key Questions

  1. Dependency Scope:
    • Which Laravel/PHP packages are critical to test? Prioritize those with high dependents count (e.g., spatie/laravel-permission).
    • Are there internal monorepos or custom Composer setups that may break integration?
  2. CI Capacity:
    • Can your CI handle parallel multi-tester jobs? If not, stagger testing by package version.
    • What’s the baseline CI runtime? Aim for <30% increase post-integration.
  3. Failure Handling:
    • How will test failures be triaged? Example: Slack alerts for multi-tester failures vs. unit tests.
    • Should multi-tester block releases (e.g., GitHub branch protection)?
  4. Maintenance:
    • Who will update .multi-tester.yml as dependencies evolve? Assign ownership to the package maintainer.
    • How will new Laravel versions (e.g., 11.x) be added to the test matrix?
  5. Alternatives:
    • Could custom Docker setups or GitHub Actions workflows achieve the same goal with less overhead?
    • Are there Laravel-specific tools (e.g., Laravel Pint, Pest) that could complement multi-tester?

Integration Approach

Stack Fit

  • Primary Use Case: Laravel/PHP packages with downstream dependencies (e.g., service providers, utilities, frameworks).
  • Composer Dependency: Works alongside existing composer.json; no Laravel-specific requirements.
  • CI/CD Integration:
    • Travis CI: Add MULTITEST='on' to matrix jobs (see README).
    • GitHub Actions: Use a dedicated job with php environment:
      jobs:
        multi-tester:
          runs-on: ubuntu-latest
          steps:
            - uses: actions/checkout@v4
            - uses: shivammathur/setup-php@v2
              with:
                php-version: '8.2'
            - run: composer install
            - run: vendor/bin/multi-tester
      
  • Local Development: Run vendor/bin/multi-tester manually to validate changes before pushing.

Migration Path

  1. Pilot Phase:
    • Start with 1–2 high-impact dependencies (e.g., laravel/framework, spatie/laravel-permission).
    • Configure .multi-tester.yml with minimal settings (default clone, install, script).
    • Example:
      laravel/framework:
        version: ^10.0
      spatie/laravel-permission:
        version: ^5.0
      
  2. CI Integration:
    • Add multi-tester to existing CI jobs (Travis/GitHub Actions).
    • Use stop_on_failure: true to fail fast during pilot.
  3. Expand Scope:
    • Add more dependencies (e.g., tightenco/ziggy, laravel/sanctum).
    • Test multiple Laravel versions (e.g., laravel/framework:9.*, laravel/framework:10.*).
  4. Automate Updates:
    • Use GitHub Actions to auto-update .multi-tester.yml when new Laravel versions release.
    • Example: Add a workflow to parse laravel/framework releases and update version constraints.

Compatibility

  • Laravel Versions: Tested against Laravel 8.x–11.x (via Symfony compatibility).
  • PHP Versions: Supports PHP 7.2–8.3 (aligns with Laravel’s requirements).
  • Composer Features:
    • Supports replace, autoload, and allow-plugins (critical for Laravel packages).
    • Works with private Packagist repositories (if configured in Composer).
  • Edge Cases:
    • Monorepos: May require custom clone/install commands.
    • Custom Composer Scripts: Override script in .multi-tester.yml if needed.

Sequencing

  1. Pre-Release Workflow:
    • Developer makes changes → Runs multi-tester locally → Fixes failures → Commits.
  2. CI Validation:
    • multi-tester runs in CI → Blocks merge if tests fail → Alerts team.
  3. Post-Release Monitoring:
    • Track multi-tester failures in error tracking tools (e.g., Sentry, Bugsnag).
    • Update .multi-tester.yml if new dependencies emerge.

Operational Impact

Maintenance

  • Configuration Drift: .multi-tester.yml may need updates as:
    • New Laravel versions release.
    • Dependencies change their test scripts (e.g., phpunitpest).
    • CI environments update (e.g., PHP 8.3 support).
  • Mitigation:
    • Automate updates: Use scripts to parse composer.json of dependencies for version changes.
    • Document defaults: Clearly mark which projects use travis vs. custom scripts.
  • Tooling:
    • Schema validation: Add a script to validate .multi-tester.yml syntax.
    • Template updates: Maintain a .multi-tester.yml.template for new packages.

Support

  • Debugging Failures:
    • Use --verbose to log clone/install/script steps.
    • Check working directory isolation (each project runs in its own temp dir).
  • Common Issues:
    • Permission errors: Ensure CI has write access to temp directories.
    • Network timeouts: Add retries for packagist.org/github.com requests.
    • PHP version mismatches: Explicitly set PHP version in CI (e.g., setup-php@v2).
  • Support Matrix:
    Issue Type Owner Resolution Time
    Config syntax errors Package maintainer <1 hour
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.
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
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope