phpcq/doctrine-validation

This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

Validation tools for doctrine.

1.1.2 2015-07-13 18:02 UTC

This package is auto-updated.

Last update: 2021-05-27 05:59:34 UTC


README

Version Stable Build Status Upstream Build Status License Downloads

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