willemabc/deep-copy-debugger
最新稳定版本:v1.0.3
Composer 安装命令:
composer require willemabc/deep-copy-debugger
包简介
DeepCopy is powerful, but hard to debug. The DeepCopyDebugger makes it easier to spot incorrect or missing filters.
README 文档
README
DeepCopy is powerful, but hard to debug. Especially when you set the filters for a single DeepCopy instance in multiple classes and use wildcard matchers like the PropertyNameMatcher. The DeepCopyDebugger makes it easier to spot incorrect or missing filters.
DeepCopyDebugger helps in the following ways:
- It can return a list of all filters set on the DeepCopy instance, in the order in which they were set.
- Given a DeepCopy instance and a Doctrine entity class, it can return all properties and the matched filters for each individual property.
- There are also methods to only get matched properties or only unmatched properties.
Usage
It is important to call the DeepCopyDebugger before calling the copy method on your DeepCopy instance!
$deepCopy = new DeepCopy();
// ... set your filters
$deepCopyDebugger = new DeepCopyDebugger($deepCopy);
dump($deepCopyDebugger->getFilterCollection());
dump($deepCopyDebugger->getFormattedFilterCollection());
dump($deepCopyDebugger->getMatchedAndUnmatchedEntityProperties(YourDoctrineEntity::class));
dump($deepCopyDebugger->getMatchedEntityProperties(YourDoctrineEntity::class));
dump($deepCopyDebugger->getUnmatchedEntityProperties(YourDoctrineEntity::class));
$deepCopy->copy($sourceObject);
统计信息
- 总下载量: 32
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-12-08