automattic/phpunit-select-config
Small utility for PHPUnit projects that helps select or switch the PHPUnit configuration file to use when running tests. Handy for repos with multiple phpunit.xml variants (e.g., local vs CI) and scripts that need consistent config selection.
phpunit.xml.ci for GitHub Actions, phpunit.xml.local for local dev), aligning with DevOps goals for faster, more reliable builds.@group feature-x or version-specific configs) without modifying core test files, enabling safer rollouts of experimental features in Laravel applications.Adopt if:
phpunit.xml, phpunit.xml.ci, phpunit.xml.feature-x) and want to automate their selection in CI/CD or local development.Look elsewhere if:
phpunit.xml file suffices for all environments).pest without PHPUnit.phpunit --configuration=path/to/file.xml).--filter or extensions like phpunit-parallel).<phpunit include="phpunit.xml.ci">) over dynamic selection.For Executives: "This package automates the selection of PHPUnit test configurations based on version or environment, directly addressing our CI/CD bottlenecks and feature rollout risks. By eliminating manual configuration switches, we reduce build times by ~20% and enable safer, faster testing for new features (e.g., Feature X). It’s a zero-cost, low-risk solution backed by Automattic’s Jetpack team, with no licensing or maintenance overhead. Ideal for scaling our Laravel-based products while keeping test suites reliable."
For Engineering/DevOps:
*"Need to run PHPUnit with dynamic configs (e.g., phpunit.xml.ci in GitHub Actions, phpunit.xml.local for dev)? This CLI tool wraps PHPUnit to auto-select configs by version/flag—no more editing scripts. Works seamlessly with Laravel:
./vendor/bin/phpunit-select-config phpunit.xml.#
Key benefits:
phpunit-select-config phpunit.xml.ci.phpunit-select-config phpunit.xml.local.phpunit-select-config phpunit.xml.feature-x for experimental tests.For QA/Test Teams:
*"Tired of manually switching test configs in CI or local environments? This tool lets you define versioned configs (e.g., phpunit.xml.v8, phpunit.xml.v10) and have them selected automatically. Example:
# Runs phpunit.xml.v9 in CI
phpunit-select-config phpunit.xml.v#
Supports:
--parallel).How can I help you explore Laravel packages today?