Repository
==========

Service Name: :php:const:`Services::REPOSITORY`

The repository service must either implement :php:interface:`RepositoryInterface` directly or extend
:php:class:`AbstractRepository`, which provides some convenient boilerplate functionality.

The Repository Provider` must also provide the :php:const:`Services::REPOSITORY_FILESYSTEM` and
:php:const`Services::MIGRATION_FACTORY` services.

The default implementation for this service is :php:class:`DirectoryRepository`. And unless you need to load migrations
for another source other than the filesystem, or from multiple folders at a time, the default implementation should
cover the needs of most migration libraries.

Repository Filesystem
---------------------

Service Name: :php:const:`Services::REPOSITORY_FILESYSTEM`

This service must be a instance of ``League\Flysystem\FilesystemInterface`` and is used both to load the migrations and
also to create them (the latter with the **migrations:create** command). Its root must therefore point to the folder
where those migrations will be located.

By default the repository's folder can be customized by end-users by using the configuration option
"migrations.directory".

Migration Factory
-----------------

Service Name: :php:const:`Services::MIGRATION_FACTORY`

This service must implement :php:interface:`FactoryInterface`. It's used to instantiate all migrations that are loaded by
the repository, which is useful for example if the migration class needs certain dependencies to be injected.

The default implementation used for this service is :php:class:`SimpleFactory`.
