jpkleemans/attribute-events
52.3
Adequate · 9 November 2026
160
lines of production code
PHP
primary language
10
measurements over time
What this system is
This system is a Laravel package that maps Eloquent model attribute changes to custom event classes. It allows developers to define specific events that trigger when model attributes, accessors, or JSON fields change. The implementation handles various data types and ensures events are only dispatched when actual changes occur.
Features
Initial release of the Laravel Attribute Events package
The repository now includes the full distribution of the 'attribute-events' package, providing a way to map Eloquent model attribute changes to custom event classes. The package allows developers to define a \$dispatchesEvents\ array on models to trigger specific events (such as 'status:shipped' or 'note:\*') when attributes change, supporting both standard attributes and JSON fields. The release includes comprehensive documentation in the README, a MIT license, and configuration files for CI (Travis), code style (PHP CS Fixer), and testing.
(repo-wide) · high confidence
Introduce attribute change events for accessors, JSON, and primitive types
The new \AttributeEvents\ trait enables firing model events when specific attribute values change. It supports detecting changes in standard attributes, accessors, and nested JSON paths. The implementation includes logic to handle \UnitEnum\ values, booleans, and numeric types (float and int) by comparing against expected values, while also maintaining compatibility with Laravel 8 and lower by checking for the existence of \hasAttributeGetMutator\.
src · medium confidence
Test coverage
Added test fixtures for Eloquent model and castable classes; Added test fixtures for order-related events; Added tests for Eloquent model attribute change events.
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 53 → 52 (-0.2)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 71 → 71 (+0.0)
- Architecture 69 → 69 (+0.0)
- Maturity 43 → 43 (+0.0)
- Readiness 48 → 48 (+0.0)
- Security 95 → 90 (-5.1)
Resolved (1)
- Documentation: no project overview (README.md)
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
jpkleemans/attribute-events 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 9 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 df2ec34f6348806e11cfc6950cd136fa8d0216df — the exact code this score is about.
- Scored under rubric-2026.11.2 — 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.4+preprod-464a0040a931.