actiophp/actio
最新稳定版本:v0.2.3
Composer 安装命令:
composer require actiophp/actio
包简介
Logging and reporting of activities and events
README 文档
README
Installation
Install the latest version:
composer require actiophp/actio
Usage
Actio::setHandler($handler);
Tests
Running Tests
Run all tests with coverage:
composer test
Or run specific test suites:
composer test:unit # Unit tests only composer test:integration # Integration tests only
Integration Tests
Integration tests require local MySQL and PostgreSQL instances.
MySQL Setup
Configure your MySQL test database:
CREATE USER 'test'@'localhost' IDENTIFIED BY 'password1'; CREATE DATABASE actio_test; GRANT ALL PRIVILEGES ON actio_test.* TO 'test'@'localhost'; FLUSH PRIVILEGES;
MySQL environment variables in .env.testing:
- ACTIO_MYSQL_HOST (default: localhost)
- ACTIO_MYSQL_DB_NAME (default: actio_test)
- ACTIO_MYSQL_USERNAME (default: test)
- ACTIO_MYSQL_PASSWORD (default: password1)
PostgreSQL Setup
Configure your PostgreSQL test database:
# Create test user and database sudo -u postgres psql -c "CREATE USER test WITH PASSWORD 'password1';" sudo -u postgres psql -c "CREATE DATABASE test WITH OWNER test;" # Create schema for Actio tests sudo -u postgres psql -d test -c "CREATE SCHEMA actio_test AUTHORIZATION test;" sudo -u postgres psql -d test -c "GRANT ALL ON SCHEMA actio_test TO test;"
PostgreSQL environment variables in .env.testing:
- ACTIO_PG_HOST (default: localhost)
- ACTIO_PG_DB_NAME (default: test)
- ACTIO_PG_SCHEMA (default: actio_test)
- ACTIO_PG_USERNAME (default: test)
- ACTIO_PG_PASSWORD (default: password1)
Static Analysis
Run PHPStan (level 8):
composer phpstan
Credits
Code and ideas borrowed from https://github.com/jbroadway/analog
统计信息
- 总下载量: 1.23k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-11-17