Removed plugin suffix on config ustomizers

This commit is contained in:
Alejandro Celaya
2017-12-31 17:18:54 +01:00
parent 0e2ad0dbca
commit 0f0213aa87
16 changed files with 35 additions and 35 deletions

View File

@@ -116,12 +116,12 @@ class InstallCommand extends Command
// Ask for custom config params
foreach ([
Plugin\DatabaseConfigCustomizerPlugin::class,
Plugin\UrlShortenerConfigCustomizerPlugin::class,
Plugin\LanguageConfigCustomizerPlugin::class,
Plugin\ApplicationConfigCustomizerPlugin::class,
Plugin\DatabaseConfigCustomizer::class,
Plugin\UrlShortenerConfigCustomizer::class,
Plugin\LanguageConfigCustomizer::class,
Plugin\ApplicationConfigCustomizer::class,
] as $pluginName) {
/** @var Plugin\ConfigCustomizerPluginInterface $configCustomizer */
/** @var Plugin\ConfigCustomizerInterface $configCustomizer */
$configCustomizer = $this->configCustomizers->get($pluginName);
$configCustomizer->process($this->io, $config);
}

View File

@@ -42,10 +42,10 @@ class InstallApplicationFactory implements FactoryInterface
new PhpArray(),
$container->get(Filesystem::class),
new ConfigCustomizerPluginManager($container, ['factories' => [
Plugin\DatabaseConfigCustomizerPlugin::class => ConfigAbstractFactory::class,
Plugin\UrlShortenerConfigCustomizerPlugin::class => InvokableFactory::class,
Plugin\LanguageConfigCustomizerPlugin::class => InvokableFactory::class,
Plugin\ApplicationConfigCustomizerPlugin::class => InvokableFactory::class,
Plugin\DatabaseConfigCustomizer::class => ConfigAbstractFactory::class,
Plugin\UrlShortenerConfigCustomizer::class => InvokableFactory::class,
Plugin\LanguageConfigCustomizer::class => InvokableFactory::class,
Plugin\ApplicationConfigCustomizer::class => InvokableFactory::class,
]]),
$isUpdate
);

View File

@@ -3,10 +3,10 @@ declare(strict_types=1);
namespace Shlinkio\Shlink\CLI\Install;
use Shlinkio\Shlink\CLI\Install\Plugin\ConfigCustomizerPluginInterface;
use Shlinkio\Shlink\CLI\Install\Plugin\ConfigCustomizerInterface;
use Zend\ServiceManager\AbstractPluginManager;
class ConfigCustomizerPluginManager extends AbstractPluginManager implements ConfigCustomizerPluginManagerInterface
{
protected $instanceOf = ConfigCustomizerPluginInterface::class;
protected $instanceOf = ConfigCustomizerInterface::class;
}

View File

@@ -5,7 +5,7 @@ namespace Shlinkio\Shlink\CLI\Install\Plugin;
use Symfony\Component\Console\Style\SymfonyStyle;
abstract class AbstractConfigCustomizerPlugin implements ConfigCustomizerPluginInterface
abstract class AbstractConfigCustomizer implements ConfigCustomizerInterface
{
/**
* @param SymfonyStyle $io

View File

@@ -7,7 +7,7 @@ use Shlinkio\Shlink\CLI\Model\CustomizableAppConfig;
use Shlinkio\Shlink\Common\Util\StringUtilsTrait;
use Symfony\Component\Console\Style\SymfonyStyle;
class ApplicationConfigCustomizerPlugin extends AbstractConfigCustomizerPlugin
class ApplicationConfigCustomizer extends AbstractConfigCustomizer
{
use StringUtilsTrait;

View File

@@ -6,7 +6,7 @@ namespace Shlinkio\Shlink\CLI\Install\Plugin;
use Shlinkio\Shlink\CLI\Model\CustomizableAppConfig;
use Symfony\Component\Console\Style\SymfonyStyle;
interface ConfigCustomizerPluginInterface
interface ConfigCustomizerInterface
{
/**
* @param SymfonyStyle $io

View File

@@ -8,7 +8,7 @@ use Symfony\Component\Console\Style\SymfonyStyle;
use Symfony\Component\Filesystem\Exception\IOException;
use Symfony\Component\Filesystem\Filesystem;
class DatabaseConfigCustomizerPlugin extends AbstractConfigCustomizerPlugin
class DatabaseConfigCustomizer extends AbstractConfigCustomizer
{
const DATABASE_DRIVERS = [
'MySQL' => 'pdo_mysql',

View File

@@ -6,7 +6,7 @@ namespace Shlinkio\Shlink\CLI\Install\Plugin;
use Shlinkio\Shlink\CLI\Model\CustomizableAppConfig;
use Symfony\Component\Console\Style\SymfonyStyle;
class LanguageConfigCustomizerPlugin extends AbstractConfigCustomizerPlugin
class LanguageConfigCustomizer extends AbstractConfigCustomizer
{
const SUPPORTED_LANGUAGES = ['en', 'es'];

View File

@@ -7,7 +7,7 @@ use Shlinkio\Shlink\CLI\Model\CustomizableAppConfig;
use Shlinkio\Shlink\Core\Service\UrlShortener;
use Symfony\Component\Console\Style\SymfonyStyle;
class UrlShortenerConfigCustomizerPlugin extends AbstractConfigCustomizerPlugin
class UrlShortenerConfigCustomizer extends AbstractConfigCustomizer
{
/**
* @param SymfonyStyle $io