boshurik / unique-model-constraint
Unique model validator for doctrine ORM and ODM
Installs: 1 386
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: ^7.4|^8.0
- doctrine/persistence: ^2.0
- symfony/validator: ^5.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- symfony/phpunit-bridge: ^4.2|^5.0
Suggests
- doctrine/mongodb-odm: To validate documents
- doctrine/orm: To validate entities
This package is auto-updated.
Last update: 2024-10-22 20:32:41 UTC
README
Port of UniqueEntity
constraint
Installation
composer require boshurik/unique-model-constraint
Symfony integration
services: _defaults: autowire: true autoconfigure: true BoShurik\Constraints\Model\UniqueModelValidator: ~
without autoconfigure
:
services: BoShurik\Constraints\Model\UniqueModelValidator: arguments: - '@doctrine' # @doctrine_mongodb tags: ['validator.constraint_validator']