Skip to content

Commit fdcc993

Browse files
authored
Merge pull request #2524 from acelaya-forks/list-urls-deprecations
Remove deprecated options from short-url:list command
2 parents d2bc9f7 + 94adba9 commit fdcc993

File tree

6 files changed

+8
-11
lines changed

6 files changed

+8
-11
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ jobs:
8888
- name: Publish coverage
8989
uses: codecov/codecov-action@v5
9090
with:
91-
file: ./build/clover.xml
91+
files: ./build/clover.xml
9292

9393
delete-artifacts:
9494
needs:

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com), and this
1919
* [#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.
2020
* [#2517](https://github.com/shlinkio/shlink/issues/2517) Remove `REDIRECT_APPEND_EXTRA_PATH` env var. Use `REDIRECT_EXTRA_PATH_MODE=append` instead.
2121
* [#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.
22+
* [#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.
2223

2324
### Fixed
2425
* *Nothing*

config/config.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use Mezzio\ProblemDetails;
1111
use Shlinkio\Shlink\Core\Config\EnvVars;
1212

13-
return (new ConfigAggregator\ConfigAggregator(
13+
return new ConfigAggregator\ConfigAggregator(
1414
providers: [
1515
Mezzio\ConfigProvider::class,
1616
Mezzio\Router\ConfigProvider::class,
@@ -39,4 +39,4 @@
3939
Core\Config\PostProcessor\MultiSegmentSlugProcessor::class,
4040
Core\Config\PostProcessor\ShortUrlMethodsProcessor::class,
4141
],
42-
))->getMergedConfig();
42+
)->getMergedConfig();

module/CLI/src/Command/Api/DeleteKeyCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ protected function interact(InputInterface $input, OutputInterface $output): voi
4848

4949
if ($apiKeyName === null) {
5050
$apiKeys = $this->apiKeyService->listKeys();
51-
$name = (new SymfonyStyle($input, $output))->choice(
51+
$name = new SymfonyStyle($input, $output)->choice(
5252
'What API key do you want to delete?',
5353
map($apiKeys, static fn (ApiKey $apiKey) => $apiKey->name),
5454
);

module/CLI/src/Command/ShortUrl/ListShortUrlsCommand.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ protected function configure(): void
7373
InputOption::VALUE_REQUIRED,
7474
'Used to filter results by domain. Use DEFAULT keyword to filter by default domain',
7575
)
76-
->addOption('including-all-tags', 'i', InputOption::VALUE_NONE, '[DEPRECATED] Use --tags-all instead')
7776
->addOption(
7877
'tags-all',
7978
mode: InputOption::VALUE_NONE,
@@ -133,7 +132,6 @@ protected function configure(): void
133132
InputOption::VALUE_NONE,
134133
'Whether to display the API key name from which the URL was generated or not.',
135134
)
136-
->addOption('show-api-key-name', 'm', InputOption::VALUE_NONE, '[DEPRECATED] Use show-api-key')
137135
->addOption(
138136
'all',
139137
'a',
@@ -148,9 +146,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
148146
$io = new SymfonyStyle($input, $output);
149147

150148
$page = (int) $input->getOption('page');
151-
$tagsMode = $input->getOption('tags-all') === true || $input->getOption('including-all-tags') === true
152-
? TagsMode::ALL->value
153-
: TagsMode::ANY->value;
149+
$tagsMode = $input->getOption('tags-all') === true ? TagsMode::ALL->value : TagsMode::ANY->value;
154150
$excludeTagsMode = $input->getOption('exclude-tags-all') === true ? TagsMode::ALL->value : TagsMode::ANY->value;
155151

156152
$data = [
@@ -249,7 +245,7 @@ private function resolveColumnsMap(InputInterface $input): array
249245
$columnsMap['Domain'] = static fn (array $_, ShortUrl $shortUrl): string =>
250246
$shortUrl->getDomain()->authority ?? Domain::DEFAULT_AUTHORITY;
251247
}
252-
if ($input->getOption('show-api-key') || $input->getOption('show-api-key-name')) {
248+
if ($input->getOption('show-api-key')) {
253249
$columnsMap['API Key Name'] = static fn (array $_, ShortUrl $shortUrl): string|null =>
254250
$shortUrl->authorApiKey?->name;
255251
}

module/CLI/test/Command/ShortUrl/ListShortUrlsCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ public static function provideArgs(): iterable
231231
{
232232
yield [[], 1, null, [], TagsMode::ANY->value];
233233
yield [['--page' => $page = 3], $page, null, [], TagsMode::ANY->value];
234-
yield [['--including-all-tags' => true], 1, null, [], TagsMode::ALL->value];
234+
yield [['--tags-all' => true], 1, null, [], TagsMode::ALL->value];
235235
yield [['--search-term' => $searchTerm = 'search this'], 1, $searchTerm, [], TagsMode::ANY->value];
236236
yield [
237237
['--page' => $page = 3, '--search-term' => $searchTerm = 'search this', '--tag' => $tags = ['foo', 'bar']],

0 commit comments

Comments
 (0)