Add to your composer.json
in the require-dev
section:
"phpcq/doctrine-validation": "~1.0"
Validates the column names to make sure you have configured your entities correctly.
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