diff --git a/CHANGELOG.md b/CHANGELOG.md index 2301b89..9dfee7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com), and this ### Removed * Remove QR code config options that were deprecated. +* Remove append extra path config option that was deprecated. ### Fixed * *Nothing* diff --git a/config/config.php b/config/config.php index c395964..0ca3f26 100644 --- a/config/config.php +++ b/config/config.php @@ -61,7 +61,6 @@ 'URL shortener > Short codes length' => Config\Option\UrlShortener\ShortCodeLengthOption::class, 'URL shortener > Auto resolve titles' => Config\Option\UrlShortener\AutoResolveTitlesConfigOption::class, - 'URL shortener > Append extra path' => Config\Option\UrlShortener\AppendExtraPathConfigOption::class, 'URL shortener > Extra path mode' => Config\Option\UrlShortener\ExtraPathModeConfigOption::class, 'URL shortener > Multi-segment slugs' => Config\Option\UrlShortener\EnableMultiSegmentSlugsConfigOption::class, @@ -153,7 +152,6 @@ Config\Option\UrlShortener\ShortDomainHostConfigOption::class => InvokableFactory::class, Config\Option\UrlShortener\ShortDomainSchemaConfigOption::class => InvokableFactory::class, Config\Option\UrlShortener\AutoResolveTitlesConfigOption::class => InvokableFactory::class, - Config\Option\UrlShortener\AppendExtraPathConfigOption::class => InvokableFactory::class, Config\Option\UrlShortener\ExtraPathModeConfigOption::class => InvokableFactory::class, Config\Option\UrlShortener\EnableMultiSegmentSlugsConfigOption::class => InvokableFactory::class, Config\Option\UrlShortener\EnableTrailingSlashConfigOption::class => InvokableFactory::class, diff --git a/src/Config/Option/UrlShortener/AppendExtraPathConfigOption.php b/src/Config/Option/UrlShortener/AppendExtraPathConfigOption.php deleted file mode 100644 index f9249cc..0000000 --- a/src/Config/Option/UrlShortener/AppendExtraPathConfigOption.php +++ /dev/null @@ -1,33 +0,0 @@ -confirm( - // phpcs:disable - << {longUrl}/[...extraPath] - * https://example.com/abc123 -> https://www.twitter.com - * https://example.com/abc123/shlinkio -> https://www.twitter.com/shlinkio - - FOO, - // phpcs:disable - false, - ); - } -} diff --git a/test/Config/Option/UrlShortener/AppendExtraPathConfigOptionTest.php b/test/Config/Option/UrlShortener/AppendExtraPathConfigOptionTest.php deleted file mode 100644 index da97a5b..0000000 --- a/test/Config/Option/UrlShortener/AppendExtraPathConfigOptionTest.php +++ /dev/null @@ -1,48 +0,0 @@ -configOption = new AppendExtraPathConfigOption(); - } - - #[Test] - public function returnsExpectedEnvVar(): void - { - self::assertEquals('REDIRECT_APPEND_EXTRA_PATH', $this->configOption->getEnvVar()); - } - - #[Test] - public function expectedQuestionIsAsked(): void - { - $io = $this->createMock(StyleInterface::class); - $io->expects($this->once())->method('confirm')->with( - // phpcs:disable - << {longUrl}/[...extraPath] - * https://example.com/abc123 -> https://www.twitter.com - * https://example.com/abc123/shlinkio -> https://www.twitter.com/shlinkio - - FOO, - // phpcs:disable - false, - )->willReturn(true); - - $answer = $this->configOption->ask($io, []); - - self::assertTrue($answer); - } -}