throw new \
InvalidArgumentException('Migrationname contains forbidden characters!'
);
} if ($directory && !
$namespace) { throw new \
InvalidArgumentException('Please specify both dir and namespace or none.'
);
} $timestamp =
(new \
DateTime())->
getTimestamp();
// Both dir and namespace were given
if ($directory) { $this->
createMigrationFile($output,
(string) realpath($directory), \
dirname(__DIR__
) . '/Template/MigrationTemplate.txt',
[ '%%timestamp%%' =>
$timestamp,
'%%name%%' =>
$name,
'%%namespace%%' =>
$namespace,
]);
return self::SUCCESS;
} $pluginName =
$input->
getOption('plugin'
);
if ($pluginName) { $pluginBundles =
array_filter($this->kernelPluginCollection->
all(),
static fn (Plugin
$value) =>
mb_strpos($value->
getName(),
(string) $pluginName) === 0
);