gawrys/counterparty-bundle
Composer 安装命令:
composer require gawrys/counterparty-bundle
包简介
Symfony bundle for counterparty-verification: DI extension, tagged drivers and research tools, validator constraint and Messenger integration.
README 文档
README
The Symfony bundle for the Counterparty Verification toolkit: a DI extension, tagged drivers and research tools, a validator constraint and Messenger integration.
⚠️ A due-diligence aid, not a guarantee of AML compliance. Risk output is advisory.
Features
- Auto-wired - PSR contracts mapped onto Symfony (
Psr18Client, logger, clock); theVerifieris a first-class service. - Tagged drivers - tag a service
counterparty.registry_driverand a compiler pass collects it into the shared manager (research tools viacounterparty.research_tool). - Validator - a
NotSanctionedconstraint + validator for the Validator component. - Messenger - a message + handler for asynchronous verification.
- Config-driven - strategy (
rule_based|ai), sanctions provider, registry tokens; conditional AI wiring.
Installation
composer require gawrys/counterparty-bundle
# config/packages/counterparty.yaml counterparty: strategy: rule_based # or "ai" (requires gawrys/counterparty-ai + an AiResearchProvider) sanctions: provider: sanctions_network # or "opensanctions" registries: ceidg_token: '%env(CEIDG_TOKEN)%'
Usage
public function __construct(private \Gawrys\Counterparty\Verifier $verifier) {} $outcome = $this->verifier->verify(new \Gawrys\Counterparty\Counterparty('Acme', 'PL', nip: '1234567890'));
Add a registry by tagging a service:
services: App\Registry\GermanRegistryDriver: tags: - { name: counterparty.registry_driver, alias: de }
Validate a property:
use Gawrys\Counterparty\Symfony\Validator\NotSanctioned; #[NotSanctioned(country: 'PL')] private string $counterpartyName;
Async via Messenger: dispatch VerifyCounterpartyMessage; VerifyCounterpartyHandler handles it.
Full guide: documentation.
Testing
composer check # php-cs-fixer + PHPStan max (phpstan-symfony) + Psalm level 1 + PHPUnit
Changelog
See CHANGELOG.md.
Contributing & Security
Pull requests welcome. Report security issues privately - see SECURITY.md.
Credits
License
The MIT License (MIT). See LICENSE.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-06-27