All features

Cherry Blossom feature

Updates: Step

Adapts callback definitions to the migration interface.

Adapts callback definitions to the migration interface.

Capabilities and extension points

Adapts callback migrations to the migration interface.

Immutable migration identifier.

  • var string

Target parent version.

  • var string

Existing-site callback.

  • var callable

Clean-installation callback.

  • var callable|null

Applicability callback.

  • var callable|null

Creates a callback migration.

  • param string $id Immutable migration identifier.
  • param string $version Target parent version.
  • param callable $update_callback Existing-site callback.
  • param callable|null $install_callback Clean-installation callback.
  • param callable|null $should_run_callback Applicability callback.

Gets the migration identifier.

  • return string Migration identifier.

Gets the target parent version.

  • return string Target version.

Determines whether this migration applies.

  • param Context $context Migration context.
  • return bool Whether the migration should run.

Runs the clean-installation callback when provided.

  • param Context $context Migration context.
  • return mixed Callback result, or null when no callback exists.

Runs the existing-site callback.

  • param Context $context Migration context.
  • return mixed Callback result.

Source reference

This editable reference page is based on the PHP documentation in updates/class-step.php.