Skip to content
CAI
Software that uses CAICheck a score

PHPMessageBus/messagebus

56.2

Adequate · 9 November 2026

1.6k

lines of production code

PHP

primary language

10

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 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 56 → 56 (+0.0)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 73 → 73 (+0.0)
  • Architecture 100 → 100 (+0.0)
  • Maturity 54 → 54 (+0.0)
  • Readiness 41 → 41 (+0.0)
  • Security 100 → 100 (+0.0)

Resolved (1)

  • Duplicate intent: Two distinct classes appear to perform the exact same serialization logic (JSON) with identical method signatures and no apparent differentiation in the provided surface.

Written by cca.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 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 b95346c93b07c2e1967ea3ff8254082fb04ce5b9 — 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.