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). Aligns with DevOps goals for faster, more reliable builds by reducing manual intervention in scripts.@group feature-x or version-specific configs) without modifying core test files. Enables safer rollouts of experimental features in Laravel applications by isolating tests to specific configurations.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 can 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 and adaptable to multi-version support."
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—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).For Product Managers: *"This package enables us to de-risk feature rollouts by isolating tests to version-specific configurations. For example:
phpunit.xml.v8.phpunit.xml.v10.phpunit.xml.ci.
This reduces merge conflicts, speeds up feedback loops, and aligns with our roadmap for supporting multiple Laravel versions. It’s a low-effort, high-impact solution for improving test reliability."*How can I help you explore Laravel packages today?