nunomaduro/collision
67.8
Adequate · 17 November 2026
3.7k
lines of production code
PHP
primary language
5
measurements over time
What this system is
Features
Adds Laravel adapter for exception handling
Introduces a new Laravel adapter that integrates the Collision library into Laravel applications. This includes a service provider that registers a custom exception handler to render exceptions in the console (excluding unit tests) and binds the necessary provider services. The adapter also includes an Ignition solutions repository to support error solutions provided by Spatie Ignition, and a custom inspector to handle stack traces.
src/Adapters/Laravel · high confidence
Adds PHPUnit 10 adapter support
The library now includes a new adapter for PHPUnit 10, allowing it to function as a test printer for this major version. The \Autoload.php\ file ensures the printer is only registered when PHPUnit 10 is detected, while new classes like \State\, \Style\, and \TestResult\ handle the internal state, output styling, and test result mapping specific to PHPUnit 10's event system.
src/Adapters/Phpunit · high confidence
New Artisan test command with parallel, coverage, and database management options
The \src/Adapters/Laravel/Commands/TestCommand.php\ file introduces a new \php artisan test\ command that delegates to PHPUnit or Pest. It adds support for parallel testing via the \--parallel\ flag, code coverage reporting with \--coverage\ and \--min\ thresholds, and database management options including \--recreate-databases\, \--drop-databases\, and \--without-databases\. The command also respects \--compact\ for output formatting and \--profile\ for slowest tests, while handling environment variables and ANSI color settings.
src/Adapters/Laravel/Commands · high confidence
New contracts for editor rendering and solution retrieval
The library introduces four new interfaces in the Contracts namespace to define how error frames are rendered in the editor and how solutions are retrieved. \RenderableOnCollisionEditor\ allows objects to provide a specific stack frame for the Collision Editor, while \RenderlessEditor\ and \RenderlessTrace\ serve as markers for components that should not render their own UI. Additionally, \SolutionsRepository\ defines the contract for fetching solution arrays from a given throwable, enabling a standardized way to access fix suggestions.
src/Contracts · high confidence
Standardizes development environment and project configuration
This release introduces standard configuration files to improve consistency for contributors and CI environments. An \.editorconfig\ file enforces coding styles (UTF-8, LF line endings, 4-space indentation) across editors, while \.gitattributes\ and \.gitignore\ are added to manage file exports and exclude build artifacts like \vendor/\ and cache files. A \phpunit.xml.dist\ configuration is provided for running tests with PHPUnit 10, and \phpstan.neon.dist\ along with a \phpstan-baseline.neon\ file are added to enable static analysis at the maximum level while ignoring known type issues. Additionally, the \LICENSE\ file has been renamed to \LICENSE.md\ and updated with the author's contact email.
(repo-wide) · high confidence
Behavioural changes
15 commits (4 fixes) modifying nunomaduro/collision
A change to existing behaviour in nunomaduro/collision — 15 commits (4 fixs), 1 file: “Uses PHPUnit 10”; “chore: improves type checking”; “Update TestException to properly find filename and line number”; and 12 more.
nunomaduro/collision · medium confidence · unverified
6 commits (0 fixes) modifying src/Exceptions
A change to existing behaviour in src/Exceptions — 6 commits, 3 files: “Uses PHPUnit 10”; “\~composer lint”; “feat: test outcome hidden from output”; and 3 more.
src/Exceptions · medium confidence · unverified
Adds PHPUnit 10 event subscriber for printer registration
The adapter now includes a new \EnsurePrinterIsRegisteredSubscriber\ that hooks into PHPUnit 10's event system to register the Collision printer. This subscriber checks for the \COLLISION\_PRINTER\ environment variable and configures the printer with optional compact and profiling modes, while subscribing to various PHPUnit events (such as test execution, deprecations, and warnings) to ensure output is handled correctly within the PHPUnit 10 lifecycle.
src/Adapters/Phpunit/Subscribers · high confidence
Adds contract for printable test case names
Introduces the \HasPrintableTestCaseName\ interface in the Phpunit adapter contracts, defining methods to retrieve printable test case names and method names. This contract enables consistent formatting of test output identifiers, supporting features like overriding test case names and fixing issues with the \--filter\ option and name printing.
src/Contracts/Adapters · high confidence
Adds internal exception classes for Laravel adapter
The Laravel adapter now includes two new internal exception classes, NotSupportedYetException and RequirementsException, both extending RuntimeException and implementing RenderlessEditor and RenderlessTrace interfaces to control how these specific errors are rendered in the output.
src/Adapters/Laravel/Exceptions · high confidence
Introduces new PHPUnit 10-compatible test output printers
The test runner's console output has been updated to support PHPUnit 10's event-driven architecture. A new \DefaultPrinter\ implementation now listens to specific PHPUnit events (such as test failures, deprecations, and warnings) to render results, replacing the previous facade-based approach. Additionally, a \ReportablePrinter\ wrapper has been added to catch and report internal printer errors, ensuring that issues during output generation do not crash the test run silently.
src/Adapters/Phpunit/Printers · high confidence
Redesigned exception output with new formatting and styling components
The exception display system has been redesigned to improve readability and visual consistency. A new ArgumentFormatter now truncates long string arguments to 1000 characters to prevent clutter. The Writer has been refactored to use a dedicated Highlighter for syntax-colored code snippets and a ConsoleColor class for consistent theming, replacing the previous console color dependency. Additionally, the Coverage reporter now supports hiding files with 100% coverage via a new option, and the Writer respects verbose mode to ensure full stack traces are always displayed regardless of ignore filters.
src · high confidence
Fixes
Fix PDO constant compatibility for PHP 8.5+ in Laravel database config
A new script has been added to automatically update the Laravel database configuration file when running on PHP 8.5 or later. The script detects the PHP version and, if applicable, replaces the deprecated \PDO::MYSQL\_ATTR\_SSL\_CA\ constant with the modern \Pdo\\Mysql::ATTR\_SSL\_CA\ constant, ensuring the application remains compatible with newer PHP versions while maintaining backward compatibility for older versions.
scripts · high confidence
Test coverage
20 commits adding/updating tests in tests/LaravelApp/app/Console; 7 commits adding/updating tests in tests/LaravelApp/app/Http; Added Laravel application bootstrap configuration for tests; Added Laravel test infrastructure files; Added feature tests for environment configuration and test runner behavior; Added public entry files for the Laravel test application; Added test autoload stub for LaravelApp vendor directory; Added test configuration files for Laravel database and Redis connections; Added test coverage for printer datasets; Added test fixtures for exception handling scenarios; Added test harness for Laravel Artisan test command enhancements; Added tests for stdout output handling; Added unit test suite for PHP error and deprecation handling; Added unit tests for Laravel, PHPUnit, and Artisan test command adapters; Added unit tests for core Collision components.
Dependencies
Initial release of Collision v8 with PHP 8.2+ and Laravel 11+ support
This entry introduces the initial composer.json for Collision v8, establishing a minimum PHP version of 8.2.0 and requiring Symfony Console 7.4/8.1. It adds explicit conflicts with Laravel versions outside the 11.48.0–13.x range and PHPUnit versions outside 11.5.50–13.x. The package now includes a Laravel service provider for automatic discovery and sets up development dependencies including Laravel 11/12/13, Pest 3/4/5, and Larastan 3, alongside test scaffolding for a Laravel application.
(dependencies) · high confidence
Housekeeping
Added .gitkeep placeholder in .temp directory
A .gitkeep file was added to the .temp directory to ensure the directory is tracked by version control. This is a structural change with no impact on application behavior or user-facing features.
.temp · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 69.7 → 67.8 (-1.9)
- Rubric changed (rubric-2026.11.2 → rubric-2026.11.4) — scores are not directly comparable.
Lenses
- Code Health 93.7 → 92.8 (-0.9)
- Architecture 78.0 → 69.4 (-8.6)
- Maturity 59.1 → 59.1 (0.0)
- Readiness 73.2 → 71.9 (-1.3)
- Security 93.9 → 93.9 (0.0)
Resolved (2)
- Scanner failed to run — not a clean result
- Scanner failed to run — not a clean result
New (5)
- Circular dependency (src/ArgumentFormatter.php)
- Edited copy of a member (16 corresponding lines) (src/Adapters/Phpunit/TestResult.php)
- Edited copy of a member (21 corresponding lines) (src/Adapters/Phpunit/TestResult.php)
- Edited copy of a member (25 corresponding lines) (src/Adapters/Phpunit/State.php)
- Off the main sequence: src/Exceptions
Changes since last survey
- 9 commits — 8 feature/other, 1 fixes
By area
- (root) — 6 commits
- .github/workflows — 2 commits
- tests/LaravelApp — 1 commit
Notable commits
- fix: chore: fix ci
- change: chore(deps): bump dependencies
- change: chore: adjust deps
- change: chore: allows php 8.2
- change: chore: bump deps
- change: chore: bump pin versions of ci
- change: chore: bumps laravel app
- change: chore: tests against php 8.6
- change: ci: disables php 8.6 on laravel 12
Architecture
- Unchanged — 0 containers · 1 contexts · 0 edges
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
nunomaduro/collision was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 17 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 68806f9257968f23775bee62970cb90925b79d51 — the exact code this score is about.
- Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.85+preprod-eba6548ac50f.