# Changelog

## Score

- CAI 52 → 51 (-1.3)
- Rubric changed (rubric-2026.10.1 → rubric-2026.10.5) — scores are not directly comparable.

## Lenses

- Code Health 92 → 65 (-26.8)
- Architecture 97 → 98 (+0.7)
- Maturity 48 → 51 (+2.8)
- Readiness 38 → 38 (+0.0)
- Security 100 → 100 (+0.0)
- Accessibility 63 → 63 (+0.0)

## Resolved (17)

- Core.registerDefaultCallBack (cognitive 23) (src/Core.php)
- Crontab.init (cognitive 21) (src/Command/DefaultCommand/Crontab.php)
- Duplicated block (12–13 lines × 5) (src/Command/DefaultCommand/Crontab.php)
- Duplicated block (13 lines × 3) (src/Command/DefaultCommand/Crontab.php)
- Duplicated block (15 lines × 4) (src/Command/DefaultCommand/Crontab.php)
- Duplicated block (18 lines × 2) (src/Command/DefaultCommand/Crontab.php)
- Duplicated block (20–21 lines × 4) (src/Command/DefaultCommand/Crontab.php)
- Duplicated block (6–7 lines × 4) (src/Command/DefaultCommand/Crontab.php)
- Duplicated block (7 lines × 3) (src/Command/DefaultCommand/Crontab.php)
- Inconsistent 'category' parameter in throwable handling. The interface and concrete implementation support a category, but the central Trigger wrapper class drops the category parameter, creating a lossy abstraction.
- Inconsistent type hint for 'category' parameter. LoggerInterface and Logger use 'string|null', while DefaultLogger uses '?string'. While functionally similar in PHP 7.1+, it is an inconsistency in the public API surface definition.
- MethodTooLong: Crontab.init (src/Command/DefaultCommand/Crontab.php)
- MethodTooLong: Server.init (src/Command/DefaultCommand/Server.php)
- Off-boarding risk: anonymized user #1
- Signature mismatch in 'location' parameter type for DefaultTrigger. TriggerInterface and the wrapper Trigger class accept TriggerLocation|null, but DefaultTrigger (the concrete implementation) accepts TriggerLocation|null. While this looks consistent, the wrapper Trigger class has a different signature for 'throwable' compared to the interface.
- TodoComment (tests/LoggerTest.php)
- TodoComment (tests/TriggerTest.php)

## New (24)

- 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 (5 lines × 2) (src/Crontab/Crontab.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)
- Hotspot: src/Command/DefaultCommand/Process.php (src/Command/DefaultCommand/Process.php)
- Inconsistent Naming for Console Output: `LoggerInterface` defines `console` for writing to the console, while the general `Logger` class also has `console`. However, the `TriggerInterface` uses `error` and `throwable` for error reporting, which might also output to console. The distinction between 'logging' (file/remote) and 'console' output is blurred across `Logger` and `Trigger` systems.
- Inconsistent Server Event Registration: `Event.mainServerCreate` receives an `EventRegister` to set up events, while `ServerManager.addServer` returns an `EventRegister`. It is unclear if these are the same object or if the user is expected to use one over the other. The `Event` interface seems to be a callback for the framework's internal lifecycle, while `ServerManager` is the user-facing API.
- MethodTooLong: Task.init (src/Command/DefaultCommand/Task.php)
- Off-boarding risk: anonymized user #1
- Process.init (cyclomatic 47) (src/Command/DefaultCommand/Process.php)
- Redundant Logger Implementation: The `Logger` class acts as a thin wrapper around `LoggerInterface` but exposes the exact same `log` signature. This creates a confusing dual-API where users can either inject the interface or use the concrete class, with no added value from the concrete class other than convenience methods (info, error, etc.) that could be static or part of the interface.
- Redundant Trigger Implementation: Similar to Logger, `Trigger` is a concrete wrapper around `TriggerInterface` with an identical `error` signature. `DefaultTrigger` also implements the same interface. This creates a three-layer redundancy (Interface -> Wrapper -> Default) for the same operation.
- Server.formatStatusSection (cognitive 27) (src/Command/DefaultCommand/Server.php)
- Server.formatStatusSection (cyclomatic 19) (src/Command/DefaultCommand/Server.php)
- …and 4 more

## Changes since last survey

- 23 commits — 23 feature/other, 0 fixes

## By area

- src/Command — 4 commits
- tests/Unit — 4 commits
- (root) — 3 commits
- src/Core.php — 3 commits
- src/Resource — 3 commits
- (repo) — 2 commits
- src/SysConst.php — 2 commits
- src/Bridge — 1 commit
- src/Config.php — 1 commit

## Notable commits

- change: 3.8.1-dev
- change: 3.8.1正式版
- change: 3.8.1正式版
- change: 3.8.1正式版
- change: 3.8.2-dev
- change: Merge branch '3.x' of https://github.com/easy-swoole/easyswoole into 3.x
- change: Merge branch '3.x' of https://github.com/easy-swoole/easyswoole into 3.x
- change: Trigger实现回调支持
- change: bridge优化
- change: crontab适配
- change: reloadTask 支持
- change: task配置项适配
- change: 优化命令行支持
- change: 优化配置项实现
- change: 修改bootstrap
- change: 增强task 配置限制
- change: 控制台命令优化
- change: 控制台命令优化
- change: 控制台命令优化
- change: 控制台命令优化
- …and 3 more
