interface MigrationFinderInterface (View source)

MigrationFinderInterface implementations locate migrations (classes that extend Doctrine\DBAL\Migrations\AbstractMigration) in a directory.

Methods

string[]
findMigrations(string $directory, string|null $namespace = null)

Find all the migrations in a directory for the given path and namespace.

Details

string[] findMigrations(string $directory, string|null $namespace = null)

Find all the migrations in a directory for the given path and namespace.

Parameters

string $directory The directory in which to look for migrations
string|null $namespace The namespace of the classes to load

Return Value

string[] An array of class names that were found with the version as keys.

Exceptions

InvalidArgumentException if the directory does not exist