skie/signal_handler 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

skie/signal_handler

最新稳定版本:1.0.1

Composer 安装命令:

composer require skie/signal_handler

包简介

Cross-platform signal handling for CakePHP console commands with zero external dependencies. Supports Linux (pcntl), Windows (native API)

README 文档

README

The SignalHandler plugin provides cross-platform signal handling for CakePHP console commands with the following features:

  • Cross-platform signal handling (Linux, Windows, macOS)
  • Graceful command termination with Ctrl+C and other signals
  • Zero external dependencies - pure CakePHP implementation
  • CakePHP event system integration
  • Automatic signal handler registration and cleanup
  • Support for long-running commands and infinite loops
  • React event loop integration support

The plugin is designed to provide signal handling capabilities following 2 approaches:

  • Quick drop-in solution for existing commands. Add signal handling in minutes.
  • Extensible solution for custom signal handling. You can extend:
    • SignalableCommandInterface for custom signal handling
    • SignalHandlerTrait for callback based signal handling
    • Custom signal event listeners
    • Platform-specific signal handlers

The plugin integrates seamlessly with CakePHP's console system and maintains zero external dependencies.

Requirements

  • CakePHP 5.0+
  • PHP 8.4+

Documentation

For documentation, as well as tutorials, see the Docs directory of this repository.

License

Licensed under the MIT License. Redistributions of the source code included in this repository must retain the copyright notice found in each file.

统计信息

  • 总下载量: 456
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 1
  • 依赖项目数: 4
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-07-12