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

Phpunit Select Config Laravel Package

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.

Deep Wiki
Context7

Product Decisions This Supports

  • Test Suite Scalability: Enables running PHPUnit tests with dynamic configuration selection (e.g., by version, environment, or feature flag), reducing manual overhead for CI/CD pipelines or multi-environment deployments.
  • Feature Flagging for Tests: Supports conditional test execution (e.g., @group or version-based) without modifying core test files, aligning with feature toggles in the product roadmap.
  • Build vs. Buy: Avoids reinventing a custom solution for versioned test configurations, leveraging a lightweight, battle-tested package from Automattic (Jetpack).
  • CI/CD Optimization: Streamlines parallel test execution by dynamically selecting configurations (e.g., phpunit.xml.dist for main, phpunit.xml.feature-x for experimental features).
  • Legacy System Integration: Useful for monorepos or large codebases where test configurations differ by module/version (e.g., WordPress plugins, SaaS microservices).

When to Consider This Package

  • Adopt if:

    • Your project uses PHPUnit and requires dynamic configuration selection (e.g., by version, branch, or environment).
    • You need to avoid hardcoding test paths in CI/CD scripts or build tools (e.g., GitHub Actions, Jenkins).
    • Your team manages multiple test configurations (e.g., phpunit.xml, phpunit-nightly.xml) and wants to switch them programmatically.
    • You’re maintaining a monorepo or plugin-based architecture (e.g., WordPress, Laravel packages) with versioned test suites.
  • Look elsewhere if:

    • Your test suite is homogeneous (single phpunit.xml file suffices).
    • You’re using non-PHPUnit testing frameworks (e.g., Pest, Codeception).
    • Your CI/CD pipeline already handles configuration via environment variables or custom scripts (this package adds minimal value).
    • You need advanced test filtering (e.g., by tags, annotations) beyond what this package offers (consider PHPUnit’s built-in --filter or extensions like phpunit-parallel).

How to Pitch It (Stakeholders)

For Executives: "This package lets us automate test configuration selection—critical for scaling our CI/CD pipeline as we onboard new features (e.g., Feature X, Y). By reducing manual test suite management, we cut build times and free engineers to focus on core product work. It’s a lightweight, zero-maintenance solution backed by Automattic’s Jetpack team, with no licensing costs."

For Engineering: *"Need to run PHPUnit with dynamic configs (e.g., phpunit.xml.v2 for a new API version)? This CLI tool wraps PHPUnit to auto-select configs by version/flag—no more editing scripts. Works seamlessly with Laravel, WordPress, or any PHP project. Example:

./vendor/bin/phpunit-select-config run --version=v2

Perfect for CI/CD or local dev. Zero dependencies beyond PHPUnit."*

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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport