From 20b846b9561bc5fbe9fc0744db04fe2c63d8f9f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Zapletal?= Date: Sun, 20 Feb 2022 17:47:44 +0100 Subject: [PATCH] Added support for allOrNothing config option --- src/DI/MigrationsExtension.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/DI/MigrationsExtension.php b/src/DI/MigrationsExtension.php index f896d30..8021c8c 100644 --- a/src/DI/MigrationsExtension.php +++ b/src/DI/MigrationsExtension.php @@ -42,6 +42,7 @@ public function getConfigSchema(): Schema Configuration::VERSIONS_ORGANIZATION_BY_YEAR_AND_MONTH ), 'customTemplate' => Expect::string(), + 'allOrNothing' => Expect::bool(false) ]); } @@ -62,7 +63,8 @@ public function loadConfiguration(): void ->setFactory(Configuration::class) ->addSetup('setCustomTemplate', [$config->customTemplate]) ->addSetup('setMetadataStorageConfiguration', [$storage]) - ->addSetup('addMigrationsDirectory', [$config->namespace, $config->directory]); + ->addSetup('addMigrationsDirectory', [$config->namespace, $config->directory]) + ->addSetup('setAllOrNothing', [$config->allOrNothing]);; if ($config->versionsOrganization === Configuration::VERSIONS_ORGANIZATION_BY_YEAR) { $configuration->addSetup('setMigrationsAreOrganizedByYear');