Removed everything that was deprecated

This commit is contained in:
Alejandro Celaya
2021-12-14 22:21:53 +01:00
parent 351e36b273
commit 1ff241411b
54 changed files with 108 additions and 1507 deletions

View File

@@ -6,11 +6,11 @@ namespace Shlinkio\Shlink\CLI\Command\Api;
use Cake\Chronos\Chronos;
use Shlinkio\Shlink\CLI\ApiKey\RoleResolverInterface;
use Shlinkio\Shlink\CLI\Command\BaseCommand;
use Shlinkio\Shlink\CLI\Util\ExitCodes;
use Shlinkio\Shlink\CLI\Util\ShlinkTable;
use Shlinkio\Shlink\Rest\ApiKey\Role;
use Shlinkio\Shlink\Rest\Service\ApiKeyServiceInterface;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
@@ -19,7 +19,7 @@ use Symfony\Component\Console\Style\SymfonyStyle;
use function Shlinkio\Shlink\Core\arrayToString;
use function sprintf;
class GenerateKeyCommand extends BaseCommand
class GenerateKeyCommand extends Command
{
public const NAME = 'api-key:generate';
@@ -63,7 +63,7 @@ class GenerateKeyCommand extends BaseCommand
InputOption::VALUE_REQUIRED,
'The name by which this API key will be known.',
)
->addOptionWithDeprecatedFallback(
->addOption(
'expiration-date',
'e',
InputOption::VALUE_REQUIRED,
@@ -86,7 +86,7 @@ class GenerateKeyCommand extends BaseCommand
protected function execute(InputInterface $input, OutputInterface $output): ?int
{
$expirationDate = $this->getOptionWithDeprecatedFallback($input, 'expiration-date');
$expirationDate = $input->getOption('expiration-date');
$apiKey = $this->apiKeyService->create(
isset($expirationDate) ? Chronos::parse($expirationDate) : null,
$input->getOption('name'),