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.

View on GitHub
Deep Wiki
Context7

phpunit-select-config

This is a shim to run PHPUnit while selecting a configuration file based on the PHPUnit major version number.

This is intended for use in projects that have to test with a wide variety of PHP versions, which typically also means a wide variety of PHPUnit versions which may have incompatible configuration file formats.

Installation

Require using composer require --dev automattic/phpunit-select-config.

This will install the phpunit-select-config tool into vendor/bin/, which you might add to your PATH, or you might run it via composer exec -- phpunit-select-config.

Usage

Create PHPUnit configuration files for each relevant PHPUnit version following a common naming pattern. For example, you might name the config for PHPUnit 8 phpunit.8.xml.dist, the one for PHPUnit 9 phpunit.9.xml.dist, the one for PHPUnit 10 phpunit.10.xml.dist, and so on.

Then, instead of running phpunit directly, run phpunit-select-config phpunit.#.xml.dist. Any additional arguments to PHPUnit may follow. The # character in the filename-pattern will be replaced with the PHPUnit major version and passed as the --configuration argument to 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.
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor