horde/alarm
Composer 安装命令:
composer require horde/alarm
包简介
Alarm library
README 文档
README
Modern alarm/notification system for PHP 8.1+.
Usage
use Horde\Alarm\AlarmConfig; use Horde\Alarm\AlarmManager; use Horde\Alarm\SqlStorage; use Horde\Alarm\MailHandler; use Horde\Alarm\NotificationMethod; // Storage backend $storage = new SqlStorage($db); $storage->set(new AlarmConfig( id: 'meeting', user: 'john@example.com', start: new Horde_Date('2026-04-01 14:00'), methods: [NotificationMethod::Mail], title: 'Team Meeting' )); // Alarm manager with handlers $manager = new AlarmManager($storage); $manager->addHandler(new MailHandler($identityFactory, $transport, $storage)); $manager->notify('john@example.com');
Features
- Type-safe: Full PHP 8.1 strict types, enums, readonly properties
- Modern: PSR-4 namespace, constructor promotion, value objects
- Flexible: Multiple storage backends (memory, SQL) and notification methods
- Tested: 142 tests, 217 assertions, full PHPUnit 11+ compatibility
Install
composer require horde/alarm
Documentation
doc/ALERTS.md- Alarm vs Notification vs Log subsystemsdoc/TESTING.md- Test organization and running testsdoc/INTEGRATIONTEST.md- Running integration testsdoc/UPGRADING.md- Migration guide from lib/ 2.x PSR-0 to src/ 3.0 PSR-4
License
LGPL-2.1-only
horde/alarm 适用场景与选型建议
horde/alarm 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3.69k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2023 年 10 月 25 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 horde/alarm 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 horde/alarm 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 3.69k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 12
- 依赖项目数: 5
- 推荐数: 1
其他信息
- 授权协议: LGPL-2.1-only
- 更新时间: 2023-10-25