diff --git a/bin/install b/bin/install index 0d8dc72c..66282df0 100755 --- a/bin/install +++ b/bin/install @@ -2,8 +2,8 @@ getMergedConfig(); diff --git a/module/CLI/config/cli.config.php b/module/CLI/config/cli.config.php index 501cb668..fb07cb47 100644 --- a/module/CLI/config/cli.config.php +++ b/module/CLI/config/cli.config.php @@ -1,13 +1,14 @@ [ - 'locale' => Common\env('CLI_LOCALE', 'en'), + 'locale' => env('CLI_LOCALE', 'en'), 'commands' => [ Command\ShortUrl\GenerateShortUrlCommand::NAME => Command\ShortUrl\GenerateShortUrlCommand::class, Command\ShortUrl\ResolveUrlCommand::NAME => Command\ShortUrl\ResolveUrlCommand::class, diff --git a/module/CLI/config/dependencies.config.php b/module/CLI/config/dependencies.config.php index f6f441c6..371c9175 100644 --- a/module/CLI/config/dependencies.config.php +++ b/module/CLI/config/dependencies.config.php @@ -1,8 +1,8 @@ [ 'factories' => [ - Application::class => ApplicationFactory::class, + Application::class => Factory\ApplicationFactory::class, Command\ShortUrl\GenerateShortUrlCommand::class => ConfigAbstractFactory::class, Command\ShortUrl\ResolveUrlCommand::class => ConfigAbstractFactory::class, diff --git a/module/Installer/config/translator.config.php b/module/Installer/config/translator.config.php new file mode 100644 index 00000000..659d4cae --- /dev/null +++ b/module/Installer/config/translator.config.php @@ -0,0 +1,16 @@ + [ + 'translation_file_patterns' => [ + [ + 'type' => 'gettext', + 'base_dir' => __DIR__ . '/../lang', + 'pattern' => '%s.mo', + ], + ], + ], + +]; diff --git a/module/CLI/src/Command/Install/InstallCommand.php b/module/Installer/src/Command/InstallCommand.php similarity index 95% rename from module/CLI/src/Command/Install/InstallCommand.php rename to module/Installer/src/Command/InstallCommand.php index e3ed030c..3e71a065 100644 --- a/module/CLI/src/Command/Install/InstallCommand.php +++ b/module/Installer/src/Command/InstallCommand.php @@ -1,13 +1,13 @@ 'pdo_mysql', 'PostgreSQL' => 'pdo_pgsql', 'SQLite' => 'pdo_sqlite', diff --git a/module/CLI/src/Install/Plugin/LanguageConfigCustomizer.php b/module/Installer/src/Config/Plugin/LanguageConfigCustomizer.php similarity index 74% rename from module/CLI/src/Install/Plugin/LanguageConfigCustomizer.php rename to module/Installer/src/Config/Plugin/LanguageConfigCustomizer.php index 15125d32..64582de8 100644 --- a/module/CLI/src/Install/Plugin/LanguageConfigCustomizer.php +++ b/module/Installer/src/Config/Plugin/LanguageConfigCustomizer.php @@ -1,18 +1,19 @@ $io->confirm('Do you want to validate long urls by 200 HTTP status code on response'), ]); } diff --git a/module/Installer/src/ConfigProvider.php b/module/Installer/src/ConfigProvider.php new file mode 100644 index 00000000..6be4cf16 --- /dev/null +++ b/module/Installer/src/ConfigProvider.php @@ -0,0 +1,15 @@ +filesystem->exists( - __DIR__ . '/../../../test-resources/' . InstallCommand::GENERATED_CONFIG_PATH + __DIR__ . '/../../test-resources/' . InstallCommand::GENERATED_CONFIG_PATH )->willReturn(true); $this->commandTester->setInputs([ '', '/foo/bar/wrong_previous_shlink', '', - __DIR__ . '/../../../test-resources', + __DIR__ . '/../../test-resources', ]); $this->commandTester->execute([]); diff --git a/module/CLI/test/Install/Plugin/ApplicationConfigCustomizerTest.php b/module/Installer/test/Config/Plugin/ApplicationConfigCustomizerTest.php similarity index 92% rename from module/CLI/test/Install/Plugin/ApplicationConfigCustomizerTest.php rename to module/Installer/test/Config/Plugin/ApplicationConfigCustomizerTest.php index 5450d0b1..9a5bc3c5 100644 --- a/module/CLI/test/Install/Plugin/ApplicationConfigCustomizerTest.php +++ b/module/Installer/test/Config/Plugin/ApplicationConfigCustomizerTest.php @@ -1,13 +1,13 @@ ./module/CLI/test + + ./module/Installer/test +