Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

exp:expmigrationcheck

Check migration files without running them: names, headers, order, PHP syntax and classes (the lint for CI).

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/examples/commands/expmigrationcheck.md

On this page

exp:expmigrationcheck

Check migration files without running them: names, headers, order, PHP syntax and classes (the lint for CI).

Script bin/php/expmigrationcheck.php, code in kernel/private/classes/commands/expmigrationcheck.php. Run it from the installation root, as the user the web server runs as:

./console exp:expmigrationcheck --help
./console exp:migration:check --help
php bin/php/expmigrationcheck.php --help

Help text

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

OptionValueHelp
--pathrequiredMigration 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
--environmentrequiredThe environment (default the installation's: [AdminEnvironment] Level, or EXP_ENV with Level=auto; check: every environment); only the migrations for it count
--formatrequiredtext (default) or json (the machine output exp-migration/1)

Read from the option definitions in the code (startup(), getOptions(), options() or ezcConsoleOption). Every script also takes the standard options of the script framework (--help, --siteaccess, --debug, --quiet, --allow-root-user ...).


Generated by ./console exp:help:examples from bin/php/expmigrationcheck.php, kernel/private/classes/commands/expmigrationcheck.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x