exp:expmigrationcheck
Available since Exponential 6.0.15 (in development, not in a release yet).
Summary
Check migration files without running them: names, headers, order, PHP syntax and classes (the lint for CI)
Usage
./console exp:expmigrationcheck [options] php bin/php/expmigrationcheck.php [options] ./console exp:migration:check [options]
Aliases
exp:migration:check
Help
The output of ./console help exp:expmigrationcheck (the script run with --help), without the standard options:
Usage: bin/php/expmigrationcheck.php [OPTION]... Check migration files The lint for CI, without a database: every migration of the migration directories (or of --path) is checked for a valid file name, a header of known keys, requirements that exist and no cycle, active extensions it requires, and, for a PHP migration, its syntax and exactly one class that extends expMigrationPhp and loads; for a YAML migration, its YAML and every step against the schema of its step type, with its conditions, loops and references. Nothing of a migration is run. Exit 1 when something is wrong. ./console exp:migration:check ./console exp:migration:check --path=extension/expnews/migrations --format=json ./console exp:migration:check --environment=production Options: --path=VALUE... Migration files or folders, relative to the root or absolute (a comma list or repeated): migrate and dry-run take only the migrations in them, check checks them instead of the migration directories --environment=VALUE The environment (default the installation's: [AdminEnvironment] Level, or EXP_ENV with Level=auto; check: every environment); only the migrations for it count --format=VALUE text (default) or json (the machine output exp-migration/1)
Options
| Option | Value | Description |
|---|---|---|
| --path | required | Migration files or folders, relative to the root or absolute (a comma list or repeated): migrate and dry-run take only the migrations in them, check checks them instead of the migration directories |
| --environment | required | The environment (default the installation's: [AdminEnvironment] Level, or EXP_ENV with Level=auto; check: every environment); only the migrations for it count |
| --format | required | text (default) or json (the machine output exp-migration/1) |
Standard options
Every script also takes the standard options of the script framework: --help, --quiet, --siteaccess, --debug, --colors, --no-colors, --logfiles, --no-logfiles, --verbose and --allow-root-user.
Source
bin/php/expmigrationcheck.php, kernel/private/classes/commands/expmigrationcheck.php
See also
Generated example: exp:expmigrationcheck
Added to the reference for Exponential 6.0.15.
Contributors
- Graham Brookins Updated
Comments
Add a comment