enalog / enalog-php
EnaLog PHP SDK
v0.3.0
2023-07-18 20:36 UTC
Requires
- php: ^8.2.0
- guzzlehttp/guzzle: ^7.0
Requires (Dev)
- laravel/pint: ^1.10.1
- pestphp/pest: ^2.6.3
- phpstan/phpstan: ^1.10.18
- rector/rector: ^0.15.25
- symfony/var-dumper: ^6.3.0
README
安装
composer require enalog/enalog-php
使用方法
发送事件
use EnaLog\EnaLogClient; $enalogClient = new EnaLogClient('api-token'); $enalogClient->pushEvent([ 'project' => 'hello-world', 'name' => 'testing-php', 'description' => 'hello world event description', 'icon' => '👀', 'tags' => ['hello', 'world'], 'meta' => ['meta' => 'data'], 'channels' => [], 'user_id' => '1234' ]);
需要 PHP 8.2+
🧹 使用 Pint 保持现代代码库
composer lint
✅ 使用 Rector 进行重构
composer refacto
⚗️ 使用 PHPStan 进行静态分析
composer test:types
✅ 使用 PEST 运行单元测试
composer test:unit
🚀 运行整个测试套件
composer test
骨架PHP 由 Nuno Maduro 创建,遵循 MIT 许可协议。