Download the PHP package kerrialn/indoctrinate without Composer
On this page you can find all versions of the php package kerrialn/indoctrinate. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kerrialn/indoctrinate
More information about kerrialn/indoctrinate
Files in kerrialn/indoctrinate
Package indoctrinate
Short Description An automated package helps you align your database with Doctrine or simply fix database issues.
License MIT
Informations about the package indoctrinate
Indoctrinate
A rule-based CLI tool that audits and fixes MySQL schema issues — enforcing consistent charsets and collations, adding missing indexes, standardising primary keys, and more. Run rules individually or as curated sets, dry-run to preview changes before applying them, and configure each rule to match your schema conventions.
Built for teams migrating legacy databases to Doctrine ORM, but useful for any MySQL project that needs a healthier schema.
Installation
composer require kerrialn/indoctrinate --dev
Configuration
Create indoctrinate.php in the root of your project:
Available Rules & Sets
See RULES.md for the full list of rules and sets, with per-rule constraint argument references.
Usage
analyze
Audit and fix schema issues. Dry-run by default — no changes are made unless --fix is passed.
| Option | Description |
|---|---|
--fix |
Apply fixes (default is dry-run) |
--report |
Print a findings summary table; exits non-zero if any found |
--sql-dump[=file] |
Write planned SQL to a file (default: indoctrinate-<timestamp>.sql) |
--migration[=dir] |
Write a Doctrine migration class (default dir: migrations/) |
--impact[=dir] |
Scan PHP source for code references that will break (default: src/). Reports column renames, drops, and type changes by severity, with file path and line number. |
--log=<dir> |
Write a timestamped log file to the given directory |
--prod |
Prod mode — override connection from indoctrinate.php via --dsn or --db-* flags |
--dsn=<dsn> |
Connection DSN, e.g. mysql://user:pass@host:3306/db |
entities
Generate Doctrine entity classes directly from the database schema. Reads the connection from indoctrinate.php. Existing files are never overwritten — run again after deleting a file to regenerate it.
The mapping style (attributes vs. annotations) is auto-detected from the PHP version running the command, or can be forced with a flag.
| Option | Description |
|---|---|
--output=<dir> |
Directory to write entity files into (default: src/Entity) |
--namespace=<ns> |
PHP namespace for generated classes (default: App\Entity) |
--table=<name> |
Only generate for this table; repeatable |
--skip-table=<pattern> |
Skip tables matching a SQL LIKE pattern; repeatable |
--remove-naming-prefix=<prefix> |
Strip a prefix from table names when deriving class names (e.g. app turns app_users into Users) |
--annotations |
Force Doctrine @ORM\ annotations (PHP 7 style) |
--attributes |
Force PHP 8 #[ORM\] attributes |
All versions of indoctrinate with dependencies
symfony/console Version ^5.4
symfony/finder Version ^5.4
symfony/filesystem Version ^5.4
nikic/php-parser Version ^4.19.4
ext-pdo Version *