/var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/migrations/src
Edit: /var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/migrations/src/Plugin.php (2604B)
* @psalm-var array
>
*/
protected $migrationCommandsList = [
\Migrations\Command\MigrationsCommand::class,
\Migrations\Command\MigrationsCreateCommand::class,
\Migrations\Command\MigrationsDumpCommand::class,
\Migrations\Command\MigrationsMarkMigratedCommand::class,
\Migrations\Command\MigrationsMigrateCommand::class,
\Migrations\Command\MigrationsCacheBuildCommand::class,
\Migrations\Command\MigrationsCacheClearCommand::class,
\Migrations\Command\MigrationsRollbackCommand::class,
\Migrations\Command\MigrationsSeedCommand::class,
\Migrations\Command\MigrationsStatusCommand::class,
];
/**
* Add migrations commands.
*
* @param \Cake\Console\CommandCollection $commands The command collection to update
* @return \Cake\Console\CommandCollection
*/
public function console(CommandCollection $commands): CommandCollection
{
if (class_exists('Bake\Command\SimpleBakeCommand')) {
$found = $commands->discoverPlugin($this->getName());
return $commands->addMany($found);
}
$found = [];
foreach ($this->migrationCommandsList as $class) {
$name = $class::defaultName();
// If the short name has been used, use the full name.
// This allows app commands to have name preference.
// and app commands to overwrite migration commands.
if (!$commands->has($name)) {
$found[$name] = $class;
}
// full name
$found['migrations.' . $name] = $class;
}
return $commands->addMany($found);
}
}