prooph/micro
53.3
Adequate · 21 September 2026
611
lines of production code
PHP
primary language
4
measurements over time
What this system is
This system is a PHP library for building microservices using an asynchronous, functional programming approach. It provides a command handling pipeline that processes commands and emits events via non-blocking generators, leveraging the Amp library for asynchronous operations. The codebase includes examples demonstrating user registration and profile updates, alongside a test suite that verifies command specification and kernel behavior.
Features
Initial release of prooph/micro with CI, testing, and documentation
This entry marks the initial release of the prooph/micro library, establishing the project's foundational structure. It includes configuration for Travis CI to automate testing and code style checks, along with a comprehensive test suite using Kahlan. The release also provides essential documentation, including a CHANGELOG, FAQ, and README, and adds license headers to all source files to ensure proper attribution and legal compliance.
(repo-wide) · high confidence
Behavioural changes
Refactor User model to functional style with async email validation
The User model in the examples/Model directory has been refactored from a class-based implementation to a functional style using generators and constants. The UniqueEmailGuard interface now returns an Amp Promise for the isUnique method, enabling asynchronous email uniqueness checks. The User model's registerUser and changeUserName functions now return generators instead of AggregateResult objects, and state application uses functional folding over an immutable list of events. This change aligns the example with modern async patterns and functional programming practices.
examples/Model · high confidence
Refactor email guard to support asynchronous operations
The InMemoryEmailGuard class in the examples/Infrastructure directory has been updated to return a Promise instead of a boolean, enabling asynchronous email uniqueness checks. Additionally, a new UserSpecification class was added to handle event mapping and state application for the User aggregate, while the previous factories.php file was removed.
examples/Infrastructure · medium confidence
Refactored command classes to use amphp and event-store v8
The command classes in the examples/Model/Command directory have been refactored to align with the amphp and event-store v8 updates. Specifically, the \ChangeUserName\ and \RegisterUser\ classes now use a constructor-based payload approach instead of extending \Command\ and implementing \PayloadConstructable\. Each command class now includes a \messageName()\ method returning a specific string ('change-username' or 'register-user'), and the \payload()\ method returns the stored payload array. Additionally, license headers were added to all files in this directory.
examples/Model/Command · medium confidence
Refactored command handling to use async generators and functional composition
The command handling pipeline has been refactored to use asynchronous generators and functional composition, replacing the previous synchronous \Fn\ and \AggregateResult\ classes. The \Kernel\ now builds a command dispatcher that yields events via a \Producer\ and handles exceptions within the generator loop. The \CommandSpecification\ class introduces a \handle\ method that returns a \Generator\, and the \stateResolver\ function now uses \Amp\'s \call\ and \Producer\ for non-blocking event store reads. The \FunctionalAggregate\ interface and \StreamMatcher\ class have been removed in favor of the new functional approach.
src · high confidence
Refactored example event classes to use a simpler, standalone structure
The example model events (UserNameChanged, UserRegistered, UserRegisteredWithDuplicateEmail) were replaced with new implementations that no longer extend DomainEvent or implement PayloadConstructable. The old classes (UserNameWasChanged, UserWasRegistered, UserWasRegisteredWithDuplicateEmail) were removed. The new classes are standalone PHP classes with a payload array, providing messageName, payload, id, and name methods, simplifying the example's domain model.
examples/Model/Event · medium confidence
Updated register\_and\_change\_username example to use functional style and async connection
The register\_and\_change\_username example was refactored to use a functional programming style with a command map and a buildCommandDispatcher, replacing the previous imperative approach. The example now establishes an async connection to the event store using Amp, handles command dispatch via a functional map, and includes error handling for unknown commands.
examples · high confidence
Test coverage
Added specification and kernel tests for command handling and state resolution
Added new test files (spec/CommandSpecificationSpec.php and spec/KernelSpec.php) that verify command specification handling, aggregate state reconstruction from event history, default expected version values, and kernel-level state resolution and command dispatching, including error cases for missing or deleted streams.
spec · high confidence
Dependencies
Initial project setup and dependency configuration
The project has been initialized with a new composer.json configuration, establishing the 'prooph/micro' library. This includes defining the project metadata, authors, and keywords. The dependencies have been set to require PHP 7.4, amphp/amp, prooph/event-store, and phunkie/phunkie. Development dependencies include testing tools like kahlan and php-coveralls. The autoload configuration has been updated to map the 'Prooph\\Micro' namespace to the 'src/' directory, with an additional file autoload for 'src/Kernel.php'.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 50 → 53 (+3.3)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 100 → 99 (-0.5)
- Architecture 69 → 69 (+0.0)
- Maturity 33 → 33 (+0.0)
- Readiness 47 → 59 (+12.7)
- Security 100 → 100 (+0.0)
Resolved (5)
- Coverage not included — suite not readable by the collector
- Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
- No exposed public API
- Test reliability not included
- dormant codebase — no living knowledge left to concentrate
New (7)
- Dependency hygiene PARTLY measured — Composer dependencies read, no committed lock to grade for currency
- Documentation: no architecture or design documentation (README.md)
- Documentation: no contributor guidance (README.md)
- Documentation: no usage examples (README.md)
- Duplicated block (21 lines × 5) (examples/Model/Command/ChangeUserName.php)
- Duplicated block (26 lines × 3) (examples/Model/Command/RegisterUser.php)
- No dependency advisory monitoring
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
prooph/micro 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 21 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 071b45741970646af24a4798645341b7227218a7 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-fa71c66cabd8.