Download the PHP package matesofmate/phpunit-extension without Composer
On this page you can find all versions of the php package matesofmate/phpunit-extension. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download matesofmate/phpunit-extension
More information about matesofmate/phpunit-extension
Files in matesofmate/phpunit-extension
Package phpunit-extension
Short Description PHPUnit extension for symfony/ai-mate providing token-optimized test execution tools
License MIT
Informations about the package phpunit-extension
PHPUnit Extension for Symfony Mate
Token-efficient PHPUnit tools for AI assistants. This package runs tests and returns encoded structured responses designed for debugging and iteration.
Features
- run the full suite, a file, a class, or a single method through one tool
- list discoverable tests
- encoded output with three consistent detail modes
- custom command support for containerized setups
Installation
In current Mate setups, extension discovery is handled automatically after Composer install and update. Run vendor/bin/mate discover when you want to refresh discovery artifacts such as mate/AGENT_INSTRUCTIONS.md.
Useful Mate commands:
Run a tool directly:
Custom Command Configuration
If PHPUnit must run through Docker or another wrapper command, configure matesofmate_phpunit.custom_command.
Requirements
- PHP 8.2+
- Symfony Mate 0.13+ required
- PHPUnit available locally, or a custom command configured
Available Tools
phpunit-runphpunit-run-detailphpunit-list-tests
All tools return encoded strings through Mate's core ResponseEncoder. Install the suggested helgesverre/toon package if you want TOON responses; otherwise the same payload falls back to JSON.
Agent Skills
The extension ships Agent Skills that Mate installs into the project as mate-<name>:
phpunit-test-run: choosing the scope of a run, reading failures and errors, and the limits of test discovery
Output Modes
defaultsummarydetailed
Grouped Failures
A single broken method usually fails every test that touches it, so phpunit-run
reports failures grouped by cause instead of one entry per failing test. Each
group carries the number of tests it accounts for and one example test:
Grouping is by failure type and a normalised form of the message, so the same assertion about different values or symbols lands in one group.
The full messages are kept on disk under Mate's cache directory, addressable by
the run id, and phpunit-run-detail reads them back without re-running the
suite. The last 20 runs are kept; storing the twenty-first drops the oldest.
Messages are shortened by removing unchanged diff context and vendor stack
frames rather than by cutting at a byte offset, which would keep the preamble
and discard the changed lines.
Development
License
MIT
All versions of phpunit-extension with dependencies
matesofmate/common Version ^0.7
symfony/ai-mate Version ^0.13 || ^0.14 || ^1.0.0-BETA1 || dev-main
symfony/finder Version ^5.4|^6.4|^7.3|^8.0
symfony/process Version ^5.4|^6.4|^7.3|^8.0