Skip to content
CAI
Software that uses CAICheck a score

HawkBitPhp/hawkbit

60.1

Adequate · 9 November 2026

2.6k

lines of production code

PHP

primary language

9

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Hawkbit is a PHP microframework that provides a structured environment for building HTTP and CLI applications. It features a modular architecture with middleware pipelines, event-driven request handling, and integrated error management. The system supports integration with external ecosystems like Symfony and Stratigility, and includes a comprehensive test suite for its core components.

How it got here

2014 — Hawkbit micro framework initial release

3 changes.

This period marks the initial release of the Hawkbit micro PHP framework, establishing its core structure with HTTP and CLI application classes. The work involved setting up the project's dependencies, including PSR-7 support and routing, alongside a comprehensive PHPUnit test suite to ensure reliability.

2016–2017 — HTTP and console integration

9 changes.

This period focused on establishing the application's core request handling architecture by integrating PSR-7, Symfony, and Stratigility middleware pipelines. It also introduced a structured console command system and centralized error handling with Whoops and Monolog.

Features

Add Symfony HTTP kernel adapter for PSR-7 bridging

A new \HttpKernelAdapter\ class has been added to the Symfony integration layer. This adapter implements \HttpKernelInterface\ and \TerminableInterface\, serving as a bridge between PSR-7 and Symfony HTTP components. It converts incoming Symfony \Request\ objects into PSR-7 requests for the application's \handle\ and \terminate\ methods, and converts the resulting PSR-7 responses back to Symfony \Response\ objects using \DiactorosFactory\ and \HttpFoundationFactory\.

src/Symfony · high confidence

Added Stratigility integration for middleware handling

The framework now includes a new integration with the Zend Stratigility library. This adds two new classes, \ApplicationMiddleware\ and \MiddlewarePipeAdapter\, which allow the Hawkbit application to process HTTP requests and responses through Stratigility's middleware pipeline, enabling better request handling and error management within that ecosystem.

src/Stratigility · high confidence

Introduce Hawkbit micro framework with HTTP and CLI application classes

The framework introduces the \Hawkbit\ namespace, providing an \Application\ class for handling HTTP requests and a \Console\ class for CLI commands. The \Application\ class integrates with \League\\Route\ for routing and middleware, while the \Console\ class supports command mapping and execution. Both share common initialization traits for configuration and error handling, establishing the core structure for the Hawkbit micro framework.

src · high confidence

Introduce basic console command handling

Added new classes in the Console namespace to support command-line interface execution. The Command class encapsulates a handler and argument parsing logic, while the Dispatcher class routes input to the appropriate command and resolves its handler via a dependency injection container. A ConsoleEvent class was also added to carry event data for the console subsystem.

src/Console · high confidence

Behavioural changes

Added public entry point and URL rewriting for the Hawkbit application

The public directory now includes an .htaccess file that enforces clean URLs by redirecting requests to index.php, while also stripping the PHPSESSID query parameter for security. A new index.php entry point bootstraps the Hawkbit application, which serves a basic 'Hello, World!' response on the root path.

public · high confidence

Centralized error handling with Whoops and Monolog services

The application now features dedicated service providers and services for error handling, separating concerns for logging and exception display. A new MonologServiceProvider registers the PSR LoggerInterface, while a WhoopsServiceProvider bootstraps the Whoops error handler, wiring it to a new HandlerService that intelligently selects response formats (HTML, JSON, XML, or plain text) based on the request type. The WhoopsService provides utilities to convert various error types into exceptions and manage error display behavior, ensuring consistent error reporting and logging across the application.

src/Application/Services · high confidence

Introduces new application event and middleware execution architecture

The framework now includes a dedicated \ApplicationEvent\ class and an \HttpApplicationEvent\ for managing request and response lifecycle events. Additionally, a new \MiddlewareRunner\ class and \MiddlewareAwareInterface\ are introduced to handle the execution and error handling of middleware chains, allowing for more robust middleware integration and exception tracking.

src/Application · medium confidence

Test coverage

Add tests for Symfony HttpKernelAdapter; Added test asset classes for unit testing; Added unit tests for the Stratigility MiddlewarePipeAdapter; Initial test suite for the Hawkbit microframework.

Dependencies

Initial release of Hawkbit micro framework with PSR-7 and middleware support

Introduced the Hawkbit PSR-7 micro PHP framework, establishing the project's dependency on league/route, league/container, league/event, league/climate, monolog, zend-config, and zend-diactoros, while adding phpunit and symfony packages for testing and adapters.

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

Lenses

  • Code Health 73 → 73 (+0.0)
  • Architecture 99 → 99 (-0.0)
  • Maturity 44 → 50 (+5.8)
  • Readiness 53 → 53 (+0.0)
  • Security 100 → 100 (+0.0)

Resolved (5)

  • Ambiguous request handling entry points. handleRequest() takes only a request, implying it creates its own response, while handle() takes both request and response. This duplicates the intent of 'processing a request' but with different responsibilities (response creation vs. response manipulation). It is unclear when to use which.
  • Duplicate getter for the event emitter with inconsistent naming. Application.getEmitter() and AbstractApplication.getEventEmitter() likely return the same or similar emitter instances. The naming inconsistency (Emitter vs EventEmitter) is confusing.
  • Duplicate initialization logic with divergent signatures. The concrete Application class exposes an init method taking a configuration object, while the AbstractApplication base class also exposes an init method with no parameters. This creates confusion about whether initialization is handled by the concrete class or the abstract base, and suggests a potential code smell where the abstract class should not expose init if the concrete class overrides it with a different signature.
  • Duplicate shutdown logic with divergent signatures. Similar to init, Application.shutdown() takes a response object, while AbstractApplication.shutdown() takes no arguments. This inconsistency makes it unclear which method is the canonical shutdown point and risks double-shutdown or missed cleanup if both are called or if the wrong one is called.
  • Inconsistent naming for route/command registration. Both Application and Console use the method name 'map' to register handlers, but the parameters differ significantly (HTTP method/route/action vs. command name/callback/arguments). While the domain is different (HTTP vs CLI), the identical method name for distinct registration patterns can be confusing for developers using both.

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

HawkBitPhp/hawkbit 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 f60b914782d8a4770057f898c9d0cdf00c692fc1 — 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.