walkor/workerman
57.5
Adequate · 9 November 2026
11.1k
lines of production code
PHP
primary language
10
measurements over time
What this system is
Features
Initial project scaffolding and configuration
This change introduces the foundational configuration files for the Workerman project, including .gitattributes and .gitignore to manage repository artifacts, a MIT-LICENSE.txt file for licensing, and a SECURITY.md for vulnerability reporting. It also adds phpstan.neon.dist for static analysis configuration and phpunit.xml.dist for test suite execution, alongside a comprehensive README.md documenting installation, basic usage for HTTP/WebSocket/TCP servers, SSL support, and coroutine examples.
(repo-wide) · high confidence
New event loop implementations for Ev, libevent, Revolt, and Swow
Added new event loop drivers for the Ev extension, libevent, the Revolt EventLoop (via the Fiber class), and the Swow coroutine library. These classes implement the EventInterface, providing users with additional backend options for handling timers, stream I/O, and signals alongside the existing Select and Swoole drivers.
src/Events · high confidence
New file-based and Redis-backed HTTP session handlers
The \src/Protocols/Http/Session\ directory now includes new session handler implementations: \FileSessionHandler\ for storing sessions in the local file system, and \RedisSessionHandler\ and \RedisClusterSessionHandler\ for storing sessions in Redis or Redis Cluster. These handlers implement the new \SessionHandlerInterface\ and provide configurable options for save paths, connection details, timeouts, and prefixes, allowing users to persist HTTP sessions using either local files or distributed Redis storage.
src/Protocols/Http/Session · high confidence
Removals
Removal of UDP-based statistic reporting client
The StatisticClient class, which previously handled the collection and UDP transmission of interface call statistics (including latency, success rates, and error codes) to a monitoring process, has been removed. Users will no longer have this specific UDP-based telemetry capability available in the Clients module.
Clients · high confidence
Removal of core environment checking, configuration, logging, and task scheduling libraries
The \Checker\, \Config\, \Log\, and \Task\ classes in \Core/Lib\ have been removed. This eliminates the built-in capabilities for validating PHP extensions and worker configurations, loading INI-based application settings, handling error logging and directory permissions, and executing scheduled background tasks. Users relying on these specific utility classes for server startup validation, configuration management, logging, or cron-like functionality will no longer have access to these features within this library.
Core/Lib · high confidence
Removal of legacy Core worker and event-loop components
The Core module has removed the legacy worker and event-loop implementation files, including AbstractWorker, SocketWorker, Master, and the event-loop classes (Select, Libevent) along with their BaseEvent interface. This eliminates the old PHP-based process management and event-loop architecture from the codebase.
Core · high confidence
Removal of legacy internal worker classes
The Workers directory has been cleaned up by deleting several internal utility and monitoring classes: BufferWorker, EchoWorker, FileMonitor, Monitor, StatisticService, and StatisticWorker. These files, which previously handled stress testing, file change monitoring, process supervision, and statistical logging, are no longer part of the codebase.
Workers · high confidence
Removal of legacy protocol parsers
The Protocols directory has removed several legacy protocol implementation files: Buffer, FastCGI, HTTP, SimpleFastCgi, SimpleHttp, and the IProtocol interface. These files are no longer part of the codebase, meaning any code relying on these specific protocol handlers for parsing or encoding network data will need to be updated to use alternative implementations.
Protocols · high confidence
Removal of the bin/workermand PHP server management script
The \bin/workermand\ executable, which previously provided command-line management for the PHP-Server (including start, stop, restart, reload, kill, and status operations), has been removed from the repository. Users can no longer use this specific script to control the server lifecycle via the \serverd\ commands.
bin · high confidence
Behavioural changes
HTTP protocol layer rewritten for modern PHP and chunked transfer support
The HTTP protocol implementation in src/Protocols/Http has been completely rewritten to support modern PHP features and stricter standards. The new Request class now handles HTTP/1.1 chunked transfer encoding (including trailers) and uploads of empty files, while the Response class no longer includes the default Server header and supports the AVIF image MIME type. A new Chunk class manages chunked data formatting, and the Session component now supports the igbinary serializer. These changes improve performance, compatibility with PHP 8.4, and adherence to HTTP specifications.
src/Protocols/Http · high confidence
New Frame protocol and stricter HTTP/WebSocket validation
The src/Protocols area introduces a new Frame protocol (src/Protocols/Frame.php) for simple length-prefixed framing, alongside a new ProtocolInterface (src/Protocols/ProtocolInterface.php) and Text protocol (src/Protocols/Text.php). HTTP handling (src/Protocols/Http.php) is significantly stricter: it enforces RFC 9112 request-line syntax, requires a single Host header for HTTP/1.1, validates header field names, rejects invalid Transfer-Encoding/Content-Length combinations, and returns 431 for oversized headers. WebSocket server (src/Protocols/Websocket.php) and client (src/Protocols/Ws.php) implementations now enforce RFC 6455 framing rules, validate rsv bits, limit handshake header size, and manage fragmented messages and permessage-deflate with decompression-bomb safeguards.
src/Protocols · high confidence
Refactored connection classes with strict typing and modern PHP features
The connection classes in src/Connection have been rewritten to use PHP 8+ features, including strict types, property promotion, and explicit return types. This improves code clarity and performance. Key changes include the addition of an AsyncTcpConnection class with proxy support (Socks5 and HTTP), an AsyncUdpConnection class, and a ConnectionInterface with updated statistics tracking. The TcpConnection class now includes WebSocket-specific callbacks and constants, while UdpConnection handles connected socket nuances. These changes enhance type safety and maintainability across the connection layer.
src/Connection · high confidence
Workerman 5.2.2 release with timer and worker improvements
This update introduces Workerman version 5.2.2, bringing significant enhancements to the core Worker and Timer components. The Timer class now supports coroutine-aware sleeping via the new \sleep()\ method, which integrates with Fiber and Swoole event loops for non-blocking delays. Worker process management has been refined with better handling of worker start/exit lifecycle events, improved signal handling for ALARM signals, and optimizations to the task scheduling logic. Additionally, the release includes fixes for Windows-specific issues, such as preventing hangs on the first request and ensuring proper PID file handling, while also improving compatibility with PHP 8.4 through explicit nullable type declarations.
src · high confidence
Test coverage
Added stub server and client scripts for HTTP, UDP, and WebSocket testing; Comprehensive test suite for Workerman protocols and connections.
Dependencies
Initial composer.json with PHP 8.1+ requirement and modern dev dependencies
The project now includes a composer.json file that establishes PHP 8.1 as the minimum runtime version and introduces a suite of development tools: Pest 2/3/4 for testing, Mockery 1.6.12 for mocking, Guzzle 7.10 for HTTP client operations, and PHPStan 2.1 for static analysis. The package defines PSR-4 autoloading for the main library under the Workerman namespace and for tests under the Tests namespace, while also declaring a conflict with ext-swow versions prior to 1.0.0 and suggesting the ext-event extension for improved performance.
(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 57 → 57 (+0.0)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 50 → 50 (+0.1)
- Architecture 88 → 88 (-0.4)
- Maturity 53 → 53 (+0.1)
- Readiness 61 → 61 (+0.0)
- Security 100 → 100 (+0.0)
Resolved (6)
- AsyncTcpConnection.connect (cognitive 30) (src/Connection/AsyncTcpConnection.php)
- AsyncTcpConnection.connect (cyclomatic 16) (src/Connection/AsyncTcpConnection.php)
- Duplicate protocol implementations with divergent interfaces. Websocket is designed for server-side connections (TcpConnection), while Ws is designed for client-side connections (AsyncTcpConnection). However, they share the same logical domain (WebSocket protocol handling) but have different method signatures (e.g., Websocket.encode(buffer, connection) vs Ws.encode(payload, connection)) and different connection type dependencies. This forces developers to remember two separate classes for the same protocol based on a subtle client/server distinction, rather than a unified interface.
- Inconsistent event registration naming across Event backends. EventInterface (and its implementations like Ev, Event, Fiber, Swoole, Swow) uses onReadable/onWritable. However, Select introduces onExcept for exceptional conditions, which has no counterpart in the standard EventInterface contract. This breaks the consistency of the event loop abstraction, requiring special handling for the Select backend.
- Off-boarding risk: anonymized user #1
- Redundant event handlers with ambiguous distinction. Both onWebSocketConnect and onWebSocketConnected are exposed as properties on TcpConnection. It is unclear if one is for the start of the handshake and the other for completion, or if they are duplicates. This creates confusion for API users regarding which callback to use for connection lifecycle events.
New (1)
- Off-boarding risk: anonymized user #1
Changes since last survey
- 2 commits — 1 feature/other, 1 fixes
By area
- (repo) — 2 commits
Notable commits
- fix: Merge pull request #1170 from 81549361/fix/swoole-error-handler-window
- change: Merge pull request #1162 from joanhey/patch-2
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
walkor/workerman 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 806ef2151315d09f3bd02470e51e0bfef5de9b0f — 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.