porta/psr14-events
最新稳定版本:0.1.0
Composer 安装命令:
composer require porta/psr14-events
包简介
PortaOne ESPF event handling with PSR-14 dispatch
README 文档
README
Purpose
This package intended to simplify PortaBilling event handling. Build for composer with PSR-4 autoload and follow PSR-14 Event Dispatcher architecture. It takes PSR-7 Request object as input to create Event, therefore may be integrated to any PSR-based framework. It seems PSR-11 (container) - friendly and a good for autowire, but does not support PSR-11 directly.
It is decoupled from all depenencies, requiring standart PSR interfaces instead of exact implementations. It uses:
- PSR-7 standard object Request used
- PSR-14 Event Dispatcher, provides specific Event, and ListenerProvider classes, and also a very generic Dispatcher implementation to avoide useless dependencies
Usage
Try to read and setup example. More rich docs coming soon!
Please, reference to PortaBilling supported event types for event type names and variables for each type.
Installation
In the Composer storage. Just add proper require section:
"require": {
"porta/psr14-events": "^0.1"
}
Please, review the changelog before to change used version.
Dependencies
Composer dependencies:
- php: ^7.4|^8.0|^8.1|^8.2|^8.3
- psr/event-dispatcher: ^1.0.0
- psr/http-message: ^2.0
Testing
Tested with PHPUnit 9.6 on php 7.4 to 8.3, 100% coverage, which does not mean everything will work as intended.
Current testing and compatibility status check on Github flows
To test, install in dev mode and use composer test command from library root for run all standard modular tests
Manualy tested and used with PortaBilling release MR100.
统计信息
- 总下载量: 10
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-12-25