Skip to content
CAI
Software that uses CAICheck a score

easy-swoole/easyswoole

52.8

Adequate · 17 November 2026

2.9k

lines of production code

PHP

primary language

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add Event interface for server lifecycle management

A new \Event\ interface has been introduced in the \AbstractInterface\ namespace to define the contract for server event handling. This interface requires implementing classes to provide \initialize\ and \mainServerCreate\ methods, allowing users to hook into the Swoole server's initialization and creation phases via the \EventRegister\.

src/AbstractInterface · high confidence

Added default HTTP resource files for new projects

The installation process now automatically releases default HTTP resource files, including a welcome page (welcome.html), a 404 error page (404.html), a default controller (Index.php), and a router configuration (Router.php). These files provide immediate, functional HTTP endpoints and error handling for newly initialized EasySwoole applications.

src/Resource/Http · high confidence

Added default logger and trigger implementations

The src/Utility area now includes DefaultLogger.php and DefaultTrigger.php, providing concrete implementations for logging and error triggering. The new DefaultLogger handles file-based logging with date-based rotation and console output with color coding, while DefaultTrigger maps PHP error codes to log levels and logs throwable exceptions with file and line context.

src/Utility · high confidence

Initial framework scaffolding and configuration

This change introduces the core resource files for the EasySwoole framework, including the main configuration file (Config.\_php) which sets up the server to listen on port 9501 with TCP sockets and disables deadlock checks, the event handler (EasySwooleEvent.\_php) that registers the TCP hook, and the bootstrap script (easyswoole) that initializes the application environment and routes command-line inputs.

src/Resource · high confidence

Initial project scaffolding and documentation

The repository has been initialized with the core structure for the EasySwoole framework. This includes configuration for Git archive exclusions (.gitattributes), IDE and build artifacts (.gitignore), and a PHPUnit configuration (phpunit.xml.dist) that sets up unit testing for the src directory. The README.md has been expanded to provide comprehensive documentation, including framework features, performance benchmarks, quick-start instructions, and community support details.

(repo-wide) · high confidence

Introduce Swoole event registration helpers and constants

Added \EventRegister\ and \EventHelper\ classes in the \src/Swoole\ directory to streamline Swoole server event handling. \EventRegister\ extends \MultiContainer\ and automatically populates allowed keys from Swoole event constants (such as \onStart\, \onReceive\, \onTask\), while \EventHelper\ provides static convenience methods (\register\, \registerWithAdd\, \on\) to attach callbacks to these events, reducing boilerplate in server configuration.

src/Swoole · high confidence

Introduces structured logging and configuration loading capabilities

The framework now provides a structured logging system with a new \Logger\ class, \LogLevelEnum\ (INFO, NOTICE, WARNING, ERROR), and configurable options for log levels, console display, and category filtering. A new \Config\ class allows loading configuration from files, directories, and \.env\ files, replacing the previous \tableConfig\ with \splArrayConfig\ for storage. Additionally, a \Trigger\ class handles error reporting and throwable logging, integrating with the new logging infrastructure.

src · high confidence

Introduction of Crontab singleton wrapper

A new Crontab class has been added to the src/Crontab directory, extending the underlying Crontab implementation and utilizing the Singleton pattern to provide a unified entry point for cron task management within the application.

src/Crontab · high confidence

Introduction of the EasySwoole CLI entry point

A new executable script \bin/easyswoole.php\ has been added to serve as the command-line interface for the application. This entry point handles locating the Composer autoload file, defining essential runtime constants such as \EASYSWOOLE\_ROOT\, and bootstrapping the environment by loading \bootstrap.php\ if present. It then delegates command execution to the \CommandRunner\, allowing users to invoke framework commands directly from the terminal.

bin · high confidence

New Bridge subsystem for runtime server management

Introduces a new Bridge component that enables remote management of the Swoole server via a Unix socket. This includes a BaseService with commands to inspect server status and process info, as well as granular control over cron jobs (start, stop, resume, reset rules, and immediate execution). The Bridge server is configured to use a mode-specific socket file and provides a static helper for invoking these commands.

src/Bridge · high confidence

Behavioural changes

2 commits (0 fixes) modifying src/Command

A change to existing behaviour in src/Command — 2 commits, 46 files: “修复主框架运维命令的退出码和参数校验”; “重构主框架命令并接入 command 3.x”.

src/Command/DefaultCommand · medium confidence · unverified

Interactive CLI enhancements and new Task worker management

The command-line interface now supports interactive, arrow-key selection for managing processes and crontab tasks, replacing the previous non-interactive text-table output with a dynamic terminal UI. A new \task\ command has been added to monitor and reload custom Task workers, including support for rolling restarts and a \--watch\ mode for live status updates. Existing commands like \process kill\ and \crontab\ now use this interactive selector when no specific identifiers are provided, and the \server status\ display has been refactored for better formatting. Also in this area: 2 commits (0 fixes) modifying src/Command.

src/Command/Selector · medium confidence · unverified

Rebuilt command runner with new utility helpers

The command-line interface has been restructured with a new CommandRunner that explicitly registers core commands (Install, Server, Process, Crontab) and clears OPcache before execution. A new Utility class provides environment display formatting, resource release prompts, and OPcache clearing, improving the reliability and clarity of command-line operations.

src/Command · high confidence

Test coverage

Added unit tests for framework core components and CLI commands

Added comprehensive unit tests covering the EasySwoole framework's configuration management, command-line interface, and bridge subsystems. The new test suite validates configuration merging and file loading behaviors, ensures the core server creation correctly rejects unsupported native task worker settings, and verifies that bridge commands properly handle valid actions, invalid inputs, and error states. Additional tests cover crontab command interactions, process management commands, logging utilities, and event registration, ensuring robust behavior for these internal framework capabilities.

tests · high confidence

Dependencies

Initial release of EasySwoole framework with PHP 8.1 and Swoole 5.1 support

This entry introduces the EasySwoole framework, an efficient Swoole-based library for PHP. The package establishes a baseline requirement of PHP 8.1 and the Swoole extension version 5.1 or higher. It bundles several core components including HTTP annotation handling (v3.3), a command-line interface (v2.x), socket management (v1.3), task processing (v2.1), and a crontab scheduler (v1.2). Development tools such as the Swoole IDE helper are included as dev dependencies to assist with code completion.

(dependencies) · high 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 51.9 → 52.8 (+0.9)
  • Rubric changed (rubric-2026.11.2 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 64.9 → 66.8 (+1.9)
  • Architecture 98.0 → 88.8 (-9.2)
  • Maturity 55.8 → 55.2 (-0.6)
  • Readiness 37.7 → 37.7 (0.0)
  • Security 100.0 → 100.0 (0.0)
  • Accessibility 62.5 → 75.5 (+13.0)

Resolved (25)

  • AbstractSelector.choose (cognitive 17) (src/Command/Selector/AbstractSelector.php)
  • AbstractSelector.select (cognitive 27) (src/Command/Selector/AbstractSelector.php)
  • AbstractSelector.select (cyclomatic 18) (src/Command/Selector/AbstractSelector.php)
  • Change coupling: Crontab.php ↔ Task.php (src/Command/DefaultCommand/Crontab.php)
  • Crontab.registerTaskAction (cognitive 23) (src/Command/DefaultCommand/Crontab.php)
  • Crontab.registerTaskAction (cyclomatic 21) (src/Command/DefaultCommand/Crontab.php)
  • Duplicated block (11 lines × 2) (src/Core.php)
  • Duplicated block (6 lines × 2) (src/Command/DefaultCommand/Task.php)
  • Duplicated block (7 lines × 2) (src/Command/Console/Watch.php)
  • Duplicated block (9 lines × 2) (src/Command/DefaultCommand/Process.php)
  • Duplicated block (9 lines × 2) (src/Command/DefaultCommand/Server.php)
  • Duplicated block (9–11 lines × 4) (src/Command/DefaultCommand/Crontab.php)
  • Hotspot: src/Command/DefaultCommand/Process.php (src/Command/DefaultCommand/Process.php)
  • Hotspot: src/Command/DefaultCommand/Server.php (src/Command/DefaultCommand/Server.php)
  • MethodTooLong: Task.init (src/Command/DefaultCommand/Task.php)
  • No ADRs found
  • Off-boarding risk: anonymized user #1
  • Process.init (cognitive 68) (src/Command/DefaultCommand/Process.php)
  • Process.init (cyclomatic 47) (src/Command/DefaultCommand/Process.php)
  • Server.formatStatusSection (cognitive 27) (src/Command/DefaultCommand/Server.php)
  • …and 5 more

New (26)

  • Circular dependency (src/Core.php)
  • CrontabTaskAction.handle (cognitive 25) (src/Command/DefaultCommand/CrontabTaskAction.php)
  • CrontabTaskAction.handle (cyclomatic 20) (src/Command/DefaultCommand/CrontabTaskAction.php)
  • Duplicated block (10 lines × 2) (src/Command/DefaultCommand/CrontabResumeAllAction.php)
  • Duplicated block (5 lines × 3) (src/Command/DefaultCommand/CrontabReloadAction.php)
  • Duplicated block (6 lines × 3) (src/Command/DefaultCommand/CrontabResumeAction.php)
  • Duplicated block (6 lines × 4) (src/Command/DefaultCommand/CrontabShowAction.php)
  • Edited copies of one member (3 members, 4+ corresponding lines) (src/Command/DefaultCommand/CrontabResumeAllAction.php)
  • Edited copy of a member (2 corresponding lines) (src/Command/DefaultCommand/CrontabAction.php)
  • Edited copy of a member (4 corresponding lines) (src/Command/DefaultCommand/ServerStopAction.php)
  • Edited copy of a member (7 corresponding lines) (src/Crontab/Crontab.php)
  • InstallAction.handle (cognitive 34) (src/Command/DefaultCommand/InstallAction.php)
  • InstallAction.handle (cyclomatic 27) (src/Command/DefaultCommand/InstallAction.php)
  • Members sharing a duplicated core (4 members, 50+ identical tokens) (src/Command/DefaultCommand/CrontabShowAction.php)
  • No ADRs found (composer.json)
  • Off the main sequence: src/Crontab
  • Off the main sequence: src/Http
  • Off the main sequence: src/Swoole
  • Off-boarding risk: anonymized user #1
  • ProcessControlService.terminate (cognitive 45) (src/Command/ProcessControlService.php)
  • …and 6 more

Changes since last survey

  • 5 commits — 5 feature/other, 0 fixes

By area

  • src/Command — 2 commits
  • src/SysConst.php — 2 commits
  • (root) — 1 commit

Notable commits

  • change: 3.8.2
  • change: 3.8.3-dev
  • change: 修复主框架运维命令的退出码和参数校验
  • change: 更新主框架 Crontab 依赖至 1.3 系列
  • change: 重构主框架命令并接入 command 3.x

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

Survey your own repository

easy-swoole/easyswoole 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 17 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 250e5d67ba6e0cd019df0c04ca87fc6576ae5abe — the exact code this score is about.
  • Scored under rubric-2026.11.4 — 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.85+preprod-eba6548ac50f.