From 8bafd82e1d26bb5e583609726bf6649f557fea92 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sat, 8 Nov 2025 10:05:07 +0100 Subject: [PATCH 1/2] Remove deprecated options from short-url:list command --- CHANGELOG.md | 1 + config/config.php | 4 ++-- module/CLI/src/Command/Api/DeleteKeyCommand.php | 2 +- module/CLI/src/Command/ShortUrl/ListShortUrlsCommand.php | 8 ++------ .../test/Command/ShortUrl/ListShortUrlsCommandTest.php | 2 +- 5 files changed, 7 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ec25b8a..61e3a31a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com), and this * [#2514](https://github.com/shlinkio/shlink/issues/2514) Remove support to generate QR codes. This functionality is now handled by Shlink Web Client and Shlink Dashboard. * [#2517](https://github.com/shlinkio/shlink/issues/2517) Remove `REDIRECT_APPEND_EXTRA_PATH` env var. Use `REDIRECT_EXTRA_PATH_MODE=append` instead. * [#2519](https://github.com/shlinkio/shlink/issues/2519) Disabling API keys by their plain-text key is no longer supported. When calling `api-key:disable`, the first argument is now always assumed to be the name. +* [#2520](https://github.com/shlinkio/shlink/issues/2520) Remove deprecated `--including-all-tags` and `--show-api-key-name` deprecated options from `short-url:list` command. Use `--tags-all` and `--show-api-key` instead. ### Fixed * *Nothing* diff --git a/config/config.php b/config/config.php index 92c69ba0..ed7c5b3c 100644 --- a/config/config.php +++ b/config/config.php @@ -10,7 +10,7 @@ use Mezzio; use Mezzio\ProblemDetails; use Shlinkio\Shlink\Core\Config\EnvVars; -return (new ConfigAggregator\ConfigAggregator( +return new ConfigAggregator\ConfigAggregator( providers: [ Mezzio\ConfigProvider::class, Mezzio\Router\ConfigProvider::class, @@ -39,4 +39,4 @@ return (new ConfigAggregator\ConfigAggregator( Core\Config\PostProcessor\MultiSegmentSlugProcessor::class, Core\Config\PostProcessor\ShortUrlMethodsProcessor::class, ], -))->getMergedConfig(); +)->getMergedConfig(); diff --git a/module/CLI/src/Command/Api/DeleteKeyCommand.php b/module/CLI/src/Command/Api/DeleteKeyCommand.php index f57a5e4a..8b9db376 100644 --- a/module/CLI/src/Command/Api/DeleteKeyCommand.php +++ b/module/CLI/src/Command/Api/DeleteKeyCommand.php @@ -48,7 +48,7 @@ class DeleteKeyCommand extends Command if ($apiKeyName === null) { $apiKeys = $this->apiKeyService->listKeys(); - $name = (new SymfonyStyle($input, $output))->choice( + $name = new SymfonyStyle($input, $output)->choice( 'What API key do you want to delete?', map($apiKeys, static fn (ApiKey $apiKey) => $apiKey->name), ); diff --git a/module/CLI/src/Command/ShortUrl/ListShortUrlsCommand.php b/module/CLI/src/Command/ShortUrl/ListShortUrlsCommand.php index d850e831..c1c5df4f 100644 --- a/module/CLI/src/Command/ShortUrl/ListShortUrlsCommand.php +++ b/module/CLI/src/Command/ShortUrl/ListShortUrlsCommand.php @@ -73,7 +73,6 @@ class ListShortUrlsCommand extends Command InputOption::VALUE_REQUIRED, 'Used to filter results by domain. Use DEFAULT keyword to filter by default domain', ) - ->addOption('including-all-tags', 'i', InputOption::VALUE_NONE, '[DEPRECATED] Use --tags-all instead') ->addOption( 'tags-all', mode: InputOption::VALUE_NONE, @@ -133,7 +132,6 @@ class ListShortUrlsCommand extends Command InputOption::VALUE_NONE, 'Whether to display the API key name from which the URL was generated or not.', ) - ->addOption('show-api-key-name', 'm', InputOption::VALUE_NONE, '[DEPRECATED] Use show-api-key') ->addOption( 'all', 'a', @@ -148,9 +146,7 @@ class ListShortUrlsCommand extends Command $io = new SymfonyStyle($input, $output); $page = (int) $input->getOption('page'); - $tagsMode = $input->getOption('tags-all') === true || $input->getOption('including-all-tags') === true - ? TagsMode::ALL->value - : TagsMode::ANY->value; + $tagsMode = $input->getOption('tags-all') === true ? TagsMode::ALL->value : TagsMode::ANY->value; $excludeTagsMode = $input->getOption('exclude-tags-all') === true ? TagsMode::ALL->value : TagsMode::ANY->value; $data = [ @@ -249,7 +245,7 @@ class ListShortUrlsCommand extends Command $columnsMap['Domain'] = static fn (array $_, ShortUrl $shortUrl): string => $shortUrl->getDomain()->authority ?? Domain::DEFAULT_AUTHORITY; } - if ($input->getOption('show-api-key') || $input->getOption('show-api-key-name')) { + if ($input->getOption('show-api-key')) { $columnsMap['API Key Name'] = static fn (array $_, ShortUrl $shortUrl): string|null => $shortUrl->authorApiKey?->name; } diff --git a/module/CLI/test/Command/ShortUrl/ListShortUrlsCommandTest.php b/module/CLI/test/Command/ShortUrl/ListShortUrlsCommandTest.php index 8d75322e..76d1882f 100644 --- a/module/CLI/test/Command/ShortUrl/ListShortUrlsCommandTest.php +++ b/module/CLI/test/Command/ShortUrl/ListShortUrlsCommandTest.php @@ -231,7 +231,7 @@ class ListShortUrlsCommandTest extends TestCase { yield [[], 1, null, [], TagsMode::ANY->value]; yield [['--page' => $page = 3], $page, null, [], TagsMode::ANY->value]; - yield [['--including-all-tags' => true], 1, null, [], TagsMode::ALL->value]; + yield [['--tags-all' => true], 1, null, [], TagsMode::ALL->value]; yield [['--search-term' => $searchTerm = 'search this'], 1, $searchTerm, [], TagsMode::ANY->value]; yield [ ['--page' => $page = 3, '--search-term' => $searchTerm = 'search this', '--tag' => $tags = ['foo', 'bar']], From 94adba95ebe75d22e5f5f3960bf6f394545753d6 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sat, 8 Nov 2025 10:09:20 +0100 Subject: [PATCH 2/2] Fix codecov/codecov-action arguments for v5 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bcf85be9..acd25100 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,7 +88,7 @@ jobs: - name: Publish coverage uses: codecov/codecov-action@v5 with: - file: ./build/clover.xml + files: ./build/clover.xml delete-artifacts: needs: