Skip to content
CAI
Software that uses CAICheck a score

PHPMessageBus/messagebus

56.9

Adequate · 22 September 2026

1.6k

lines of production code

PHP

primary language

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a command, event, and query bus framework that facilitates the execution of handlers through a middleware pipeline. It supports dependency injection by resolving handlers via PSR-11 and Symfony containers, while also ensuring correct behavior for edge cases like single-middleware chains.

Features

Add PSR-11 and Symfony container resolvers

The command bus now supports resolving command handlers via external dependency injection containers. A new PsrContainerResolver implements the PSR-11 ContainerInterface, while a new SymfonyContainerResolver integrates with the Symfony DependencyInjection Container, allowing users to inject handlers from these containers.

src/CommandBus/Resolver · high confidence

Added PSR-11 and Symfony container resolvers; fixed middleware edge cases

Users can now resolve event and command handlers via PSR-11 or Symfony containers, with new PsrContainerResolver and updated SymfonyContainerResolver classes. Additionally, the EventBus and CommandBus now correctly handle the case where only a single middleware is provided, preventing empty responses, and the EventHandler interface no longer requires the \_\_invoke method.

src/EventBus · medium confidence

Behavioural changes

Fix empty response when only middleware is provided

The QueryBus now correctly handles scenarios where only middleware is provided, ensuring that the middleware chain is properly executed instead of returning an empty response. Additionally, new container resolvers for PSR-11 and Symfony 2/3 have been added to support dependency injection in those environments.

src/QueryBus · medium confidence

Removal of \_\_invoke method from CommandHandler interface

The CommandHandler interface no longer requires the \_\invoke method, simplifying the contract for command handlers. This change removes the requirement for handlers to implement a callable interface, allowing for more flexible handler implementations that do not rely on the \\_invoke magic method.

src/CommandBus/Contracts · high confidence

Test coverage

Added tests for container resolvers and query bus behavior

Added new test files for PsrContainerResolver and SymfonyContainerResolver across CommandBus, EventBus, and QueryBus, along with in-memory container implementations. Updated existing tests to reflect changes in the QueryBus, including a new test for EmptyResponse when no handlers are provided.

tests · high confidence

Dependencies

Update dependency versions and add Symfony container support

The project's dependencies have been updated to use more flexible version constraints (e.g., ^1.2 for container-interop) and the PSR-11 interface (psr/container) has been added. Additionally, the Symfony Dependency Injection component (versions 2.7 and 3.0) has been added as a development dependency.

(dependencies) · medium 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 65 → 57 (-7.9)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 100 → 99 (-1.0)
  • Architecture 100 → 100 (+0.0)
  • Maturity 55 → 55 (+0.0)
  • Readiness 50 → 34 (-16.3)
  • Security 100 → 100 (+0.0)

Resolved (7)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • Duplicated block (14 lines × 2) (src/CommandBus/CommandBus.php)
  • No exposed public API
  • Test reliability not included
  • early-stage repository — too few commits for a meaningful bus factor
  • early-stage repository — too little history to judge knowledge freshness

New (12)

  • Dependency hygiene PARTLY measured — Composer dependencies read, no committed lock to grade for currency
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • Duplicate intent: Two distinct classes appear to perform the exact same serialization task (JSON) with identical constructors and method signatures. 'JsonObjectSerializer' and 'JsonSerializer' are semantically redundant.
  • Duplicated block (17 lines × 2) (src/CommandBus/CommandBus.php)
  • Duplicated block (17 lines × 2) (src/CommandBus/TransactionalCommandBusMiddleware.php)
  • Duplicated block (19 lines × 2) (src/CommandBus/Translator/AppendStrategy.php)
  • Duplicated block (19 lines × 3) (src/CommandBus/Resolver/InteropContainerResolver.php)
  • Duplicated block (20 lines × 3) (src/CommandBus/Resolver/SymfonyContainerResolver.php)
  • Duplicated block (23 lines × 3) (src/CommandBus/Resolver/SimpleArrayResolver.php)
  • Duplicated block (9 lines × 2) (src/CommandBus/LoggerCommandBusMiddleware.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

PHPMessageBus/messagebus 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 22 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 b95346c93b07c2e1967ea3ff8254082fb04ce5b9 — 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-821afab8930d.