stwarog/uow
Composer 安装命令:
composer require stwarog/uow
包简介
Generic Unit of Work pattern implementation for Active Records ORM's. Allows to split technical implementation from domain logic.
README 文档
README
for ORM's using Active Record Pattern
This is the core of Framework agnostic package to split complex Active Record pattern logic to some persistence layer, in convenient way. Using this tool you can forget about implementation details as manipulating on relations, saving, detaching etc.
Just keep in mind that you are working on objects!
Development
This package supports PSR-12 standard. Before each push, run this quality tools command:
make check
# or
docker-compose run --rm composer phpcs
docker-compose run --rm composer phpstan
docker-compose run --rm composer unit
It will execute Code Sniffer and PhpStan validation rules.
Config
| Name | Type | Default | Description |
|---|---|---|---|
| foreign_key_check | boolean | true | Allows to globally disable foreign check (not recommended) |
| transaction | boolean | true | Allows to globally disable transaction wrapp (not recommended) |
| debug | boolean | true | When enabled, all queries and debug info are stored |
Change Log
1.4.1 (2021-01-13)
- BUGFIX isEmpty in UOW was returning invalid value when only delete added
1.4.0 (2021-07-21)
- Added no longer new method to PersistAble interface (called in UOW when persisted first time)
1.3.1 (2021-07-10)
- Config option to disable transaction
- Config option to disable foreign check & debug moved to decorator
1.2.0 (2021-06-09)
- Dockerized tests for php v7.1
- Make file for easier development
- Static analytics tools: PHPCS and PHPSTAN for ./src directory
- Reformatted code for PSR-12
- Removed MIT license note in every file
- BUG: Added return type in ManyToMany.php
- !! Removed model to in ManyToMany.php
- Usage of Added IterableTrait in AbstractHasManyRelation.php
- Added final to all possible places
- Fixed HasManyTest.php
1.1.1 (2020-01-04)
- 0abc29e8 removed exception throws on empty uow on flush
1.1.0 (2020-12-28) STABLE
- 978f8db0 fixed bug with performance in entity manager
- 1ebbf704 removed webmozart/assert
stwarog/uow 适用场景与选型建议
stwarog/uow 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.29k 次下载、GitHub Stars 达 6, 最近一次更新时间为 2020 年 12 月 02 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 stwarog/uow 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 stwarog/uow 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 1.29k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 7
- 点击次数: 10
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-12-02