Copied!

MigrationHook

MigrationHook.php : 26
Final
Implements HookInterface

Executes the migration files exposed by {@see MigrationFilesProviderInterface}.

Lives under Contracts (rather than ibexa/migrations' own test support code) so other packages' test kernels can register and tag it (as "ibexa.test.bootstrapper.hook") too, not just this one's.

Enabled by default; pass [self::OPTION_RUN_MIGRATIONS => false] as this hook's own options (keyed by its own service id in the bootstrap options array) to skip it.

Constants

publicOPTION_RUN_MIGRATIONS

MigrationHook.php : 34
public mixed OPTION_RUN_MIGRATIONS = 'run_migrations'

publicPRIORITY

MigrationHook.php : 32

Fixed tag priority this hook is registered at — after ibexa/test-core's FixtureHook (900), before its PurgeSearchIndexHook (-100).

public mixed PRIORITY = 500

Methods

public__construct()

MigrationHook.php : 42
public __construct(MigrationFilesProviderInterface $provider, MigrationService $migrationService, MetadataStorage $metadataStorage)

Parameters

Name Type Default value Description
$provider MigrationFilesProviderInterface - -
$migrationService MigrationService - -
$metadataStorage MetadataStorage - -

public__invoke()

MigrationHook.php : 59
public __invoke(array<string|int, mixed> $options) : void

Parameters

Name Type Default value Description
$options array<string|int, mixed> - -

publicconfigureOptions()

MigrationHook.php : 52
public configureOptions(OptionsResolver $resolver) : void

Parameters

Name Type Default value Description
$resolver OptionsResolver - -