phpcq / doctrine-validation
Validation tools for doctrine.
Fund package maintenance!
discordier
dmolineus
Requires
- php: >=5.4
- doctrine/annotations: ~1.0
- doctrine/orm: ~2.0
- symfony/console: ~2.3
Requires (Dev)
- phpcq/all-tasks: ~1.0
This package is auto-updated.
Last update: 2021-11-27 07:00:23 UTC
README
Multiple validators for doctrine users
Installation
Add to your composer.json
in the require-dev
section:
"phpcq/doctrine-validation": "~1.0"
Column name validator
Validates the column names to make sure you have configured your entities correctly.
Usage
Call the binary, will scan all files matching src/Entity/*.php
:
./vendor/bin/validate-doctrine-entity-column-names.php
Optionally you can pass the path to the entity class files:
./vendor/bin/validate-doctrine-entity-column-names.php lib/Doctrine/Entities/*.php
If you prefer camelCase over underscore_case naming (which may be a bad practice for some database systems), you can enable it:
./vendor/bin/validate-doctrine-entity-column-names.php --camel-case