From 5e3770c105bbc168de0cbb9471f95dc370a401cc Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sun, 31 Dec 2017 17:20:03 +0100 Subject: [PATCH] Renamed ConfigCustomizerPluginManager to CongigCustomizerManager --- module/CLI/src/Command/Install/InstallCommand.php | 8 ++++---- module/CLI/src/Factory/InstallApplicationFactory.php | 4 ++-- ...mizerPluginManager.php => ConfigCustomizerManager.php} | 2 +- ...Interface.php => ConfigCustomizerManagerInterface.php} | 2 +- module/CLI/test/Command/Install/InstallCommandTest.php | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) rename module/CLI/src/Install/{ConfigCustomizerPluginManager.php => ConfigCustomizerManager.php} (68%) rename module/CLI/src/Install/{ConfigCustomizerPluginManagerInterface.php => ConfigCustomizerManagerInterface.php} (60%) diff --git a/module/CLI/src/Command/Install/InstallCommand.php b/module/CLI/src/Command/Install/InstallCommand.php index 59b4f639..698cbc65 100644 --- a/module/CLI/src/Command/Install/InstallCommand.php +++ b/module/CLI/src/Command/Install/InstallCommand.php @@ -5,7 +5,7 @@ namespace Shlinkio\Shlink\CLI\Command\Install; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; -use Shlinkio\Shlink\CLI\Install\ConfigCustomizerPluginManagerInterface; +use Shlinkio\Shlink\CLI\Install\ConfigCustomizerManagerInterface; use Shlinkio\Shlink\CLI\Install\Plugin; use Shlinkio\Shlink\CLI\Model\CustomizableAppConfig; use Symfony\Component\Console\Command\Command; @@ -40,7 +40,7 @@ class InstallCommand extends Command */ private $filesystem; /** - * @var ConfigCustomizerPluginManagerInterface + * @var ConfigCustomizerManagerInterface */ private $configCustomizers; /** @@ -52,14 +52,14 @@ class InstallCommand extends Command * InstallCommand constructor. * @param WriterInterface $configWriter * @param Filesystem $filesystem - * @param ConfigCustomizerPluginManagerInterface $configCustomizers + * @param ConfigCustomizerManagerInterface $configCustomizers * @param bool $isUpdate * @throws LogicException */ public function __construct( WriterInterface $configWriter, Filesystem $filesystem, - ConfigCustomizerPluginManagerInterface $configCustomizers, + ConfigCustomizerManagerInterface $configCustomizers, $isUpdate = false ) { parent::__construct(); diff --git a/module/CLI/src/Factory/InstallApplicationFactory.php b/module/CLI/src/Factory/InstallApplicationFactory.php index 0e620bc7..274100b4 100644 --- a/module/CLI/src/Factory/InstallApplicationFactory.php +++ b/module/CLI/src/Factory/InstallApplicationFactory.php @@ -6,7 +6,7 @@ namespace Shlinkio\Shlink\CLI\Factory; use Interop\Container\ContainerInterface; use Interop\Container\Exception\ContainerException; use Shlinkio\Shlink\CLI\Command\Install\InstallCommand; -use Shlinkio\Shlink\CLI\Install\ConfigCustomizerPluginManager; +use Shlinkio\Shlink\CLI\Install\ConfigCustomizerManager; use Shlinkio\Shlink\CLI\Install\Plugin; use Symfony\Component\Console\Application; use Symfony\Component\Console\Exception\LogicException; @@ -41,7 +41,7 @@ class InstallApplicationFactory implements FactoryInterface $command = new InstallCommand( new PhpArray(), $container->get(Filesystem::class), - new ConfigCustomizerPluginManager($container, ['factories' => [ + new ConfigCustomizerManager($container, ['factories' => [ Plugin\DatabaseConfigCustomizer::class => ConfigAbstractFactory::class, Plugin\UrlShortenerConfigCustomizer::class => InvokableFactory::class, Plugin\LanguageConfigCustomizer::class => InvokableFactory::class, diff --git a/module/CLI/src/Install/ConfigCustomizerPluginManager.php b/module/CLI/src/Install/ConfigCustomizerManager.php similarity index 68% rename from module/CLI/src/Install/ConfigCustomizerPluginManager.php rename to module/CLI/src/Install/ConfigCustomizerManager.php index 2e6a2672..ee4aedfa 100644 --- a/module/CLI/src/Install/ConfigCustomizerPluginManager.php +++ b/module/CLI/src/Install/ConfigCustomizerManager.php @@ -6,7 +6,7 @@ namespace Shlinkio\Shlink\CLI\Install; use Shlinkio\Shlink\CLI\Install\Plugin\ConfigCustomizerInterface; use Zend\ServiceManager\AbstractPluginManager; -class ConfigCustomizerPluginManager extends AbstractPluginManager implements ConfigCustomizerPluginManagerInterface +class ConfigCustomizerManager extends AbstractPluginManager implements ConfigCustomizerManagerInterface { protected $instanceOf = ConfigCustomizerInterface::class; } diff --git a/module/CLI/src/Install/ConfigCustomizerPluginManagerInterface.php b/module/CLI/src/Install/ConfigCustomizerManagerInterface.php similarity index 60% rename from module/CLI/src/Install/ConfigCustomizerPluginManagerInterface.php rename to module/CLI/src/Install/ConfigCustomizerManagerInterface.php index 3085a75b..bbeedca8 100644 --- a/module/CLI/src/Install/ConfigCustomizerPluginManagerInterface.php +++ b/module/CLI/src/Install/ConfigCustomizerManagerInterface.php @@ -5,6 +5,6 @@ namespace Shlinkio\Shlink\CLI\Install; use Psr\Container\ContainerInterface; -interface ConfigCustomizerPluginManagerInterface extends ContainerInterface +interface ConfigCustomizerManagerInterface extends ContainerInterface { } diff --git a/module/CLI/test/Command/Install/InstallCommandTest.php b/module/CLI/test/Command/Install/InstallCommandTest.php index 45c19c7b..a4c49f9e 100644 --- a/module/CLI/test/Command/Install/InstallCommandTest.php +++ b/module/CLI/test/Command/Install/InstallCommandTest.php @@ -8,7 +8,7 @@ use Prophecy\Argument; use Prophecy\Prophecy\MethodProphecy; use Prophecy\Prophecy\ObjectProphecy; use Shlinkio\Shlink\CLI\Command\Install\InstallCommand; -use Shlinkio\Shlink\CLI\Install\ConfigCustomizerPluginManagerInterface; +use Shlinkio\Shlink\CLI\Install\ConfigCustomizerManagerInterface; use Shlinkio\Shlink\CLI\Install\Plugin\ConfigCustomizerInterface; use Symfony\Component\Console\Application; use Symfony\Component\Console\Helper\ProcessHelper; @@ -52,7 +52,7 @@ class InstallCommandTest extends TestCase $this->configWriter = $this->prophesize(WriterInterface::class); $configCustomizer = $this->prophesize(ConfigCustomizerInterface::class); - $configCustomizers = $this->prophesize(ConfigCustomizerPluginManagerInterface::class); + $configCustomizers = $this->prophesize(ConfigCustomizerManagerInterface::class); $configCustomizers->get(Argument::cetera())->willReturn($configCustomizer->reveal()); $app = new Application();