Skip to content
CAI
Software that uses CAICheck a score

easy-swoole/easyswoole

49.7

Weak · 19 September 2026

2k

lines of production code

PHP

primary language

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

This system is the EasySwoole framework, a PHP library built on Swoole that provides a high-performance, coroutine-based runtime for building network services. It offers a structured foundation for managing server lifecycles, handling HTTP requests, and executing scheduled tasks through a dedicated command-line interface. The framework includes built-in utilities for configuration management, structured logging, and remote server control via Unix sockets.

How it got here

2017–2018 — Initial framework release and core infrastructure

6 changes.

This period marks the initial release of the EasySwoole framework, establishing baseline support for PHP 8.1 and Swoole 5.1. It introduces essential core components including a structured logging system, configuration management, and a CLI entry point. The work also defines server lifecycle interfaces and event registration helpers to streamline Swoole integration.

2019–2021 — Initial framework scaffolding and CLI infrastructure

7 changes.

This period established the core EasySwoole framework structure, introducing essential HTTP resource files, configuration defaults, and concrete logging implementations. It also built the foundational command-line interface and a coroutine-based bridge subsystem to enable remote server management and process control.

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

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

New crontab, process, and server management commands with coroutine-based bridge communication

The \src/Command/DefaultCommand\ directory now includes new command implementations for managing crontab tasks, application processes, and the server lifecycle. The \Crontab\ command allows users to show, stop, resume, and immediately run scheduled tasks. The \Process\ command provides a process list with formatted memory usage and supports killing processes by PID or group. The \Server\ command handles starting, stopping, reloading, and checking the status of the EasySwoole server. All these commands utilize a new coroutine-based bridge communication mechanism (\Bridge::bridgeCall\) to interact with the running server, replacing previous synchronous or direct interaction methods.

src/Command/DefaultCommand · high confidence

Behavioural changes

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 Config, Core, Logger, and Trigger components

Added PHPUnit test suites for the Config, Core, Logger, and Trigger components. The new tests verify configuration storage and manipulation, temporary directory initialization, logging event handling, and error/exception trigger registration.

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 watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Baseline

  • First survey — no prior run to compare against. CAI 50.

Lenses

  • Code Health 89
  • Architecture 96
  • Maturity 48
  • Readiness 33
  • Security 100
  • Accessibility 63

Changes since last survey

  • 300 commits — 254 feature/other, 46 fixes

By area

  • src/Command — 76 commits
  • (repo) — 67 commits
  • (root) — 32 commits
  • src/Core.php — 30 commits
  • src/SysConst.php — 24 commits
  • src/Bridge — 19 commits
  • bin/easyswoole — 10 commits
  • src/Resource — 10 commits
  • src/Crontab — 6 commits
  • src/Logger.php — 6 commits
  • src/Config.php — 5 commits
  • src/Utility — 4 commits
  • bin/easyswoole.php — 3 commits
  • src/ServerManager.php — 2 commits
  • tests/CoreTest.php — 2 commits
  • bin/phpunit — 1 commit
  • src/AbstractInterface — 1 commit
  • src/Swoole — 1 commit
  • tests/ConfigTest.php — 1 commit

Notable commits

  • fix: Fix output #!/usr/bin/env php
  • fix: Fix: Phpunit Command
  • fix: Fix: trigger
  • fix: Merge pull request #436 from sy-records/fix-env
  • fix: fix
  • fix: fix
  • fix: fix
  • fix: fix
  • fix: fix bridge tip
  • fix: fix date
  • fix: fix event register bug
  • fix: fix exec() function forbid
  • fix: fix global http hook
  • fix: fix install
  • fix: fix install
  • fix: fix php version
  • fix: fix phpunit
  • fix: fix process command
  • fix: fix process kill bug
  • fix: fix run mode bug
  • …and 280 more

Written by watchdog.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 19 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 93d24df87b5a7577533ce62619cab35b62392aae — 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-13a154b7f5d1.