diff --git a/README.md b/README.md index 892dc6a6..d5201276 100644 --- a/README.md +++ b/README.md @@ -268,32 +268,28 @@ Options: -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug Available commands: - help Displays help for a command - list Lists commands + help Displays help for a command + list Lists commands api-key - api-key:disable Disables an API key. - api-key:generate Generates a new valid API key. - api-key:list Lists all the available API keys. - config - config:generate-charset [DEPRECATED] Generates a character set sample just by shuffling the default one, "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ". Then it can be set in the SHORTCODE_CHARS environment variable - config:generate-secret [DEPRECATED] Generates a random secret string that can be used for JWT token encryption + api-key:disable Disables an API key. + api-key:generate Generates a new valid API key. + api-key:list Lists all the available API keys. db - db:create Creates the database needed for shlink to work. It will do nothing if the database already exists - db:migrate Runs database migrations, which will ensure the shlink database is up to date. + db:create Creates the database needed for shlink to work. It will do nothing if the database already exists + db:migrate Runs database migrations, which will ensure the shlink database is up to date. short-url - short-url:delete [short-code:delete] Deletes a short URL - short-url:generate [shortcode:generate|short-code:generate] Generates a short URL for provided long URL and returns it - short-url:list [shortcode:list|short-code:list] List all short URLs - short-url:parse [shortcode:parse|short-code:parse] Returns the long URL behind a short code - short-url:visits [shortcode:visits|short-code:visits] Returns the detailed visits information for provided short code + short-url:delete Deletes a short URL + short-url:generate Generates a short URL for provided long URL and returns it + short-url:list List all short URLs + short-url:parse Returns the long URL behind a short code + short-url:visits Returns the detailed visits information for provided short code tag - tag:create Creates one or more tags. - tag:delete Deletes one or more tags. - tag:list Lists existing tags. - tag:rename Renames one existing tag. + tag:create Creates one or more tags. + tag:delete Deletes one or more tags. + tag:list Lists existing tags. + tag:rename Renames one existing tag. visit - visit:locate [visit:process] Resolves visits origin locations. - visit:update-db [DEPRECATED] Updates the GeoLite2 database file used to geolocate IP addresses + visit:locate Resolves visits origin locations. ``` > This product includes GeoLite2 data created by MaxMind, available from [https://www.maxmind.com](https://www.maxmind.com) diff --git a/module/CLI/src/Command/ShortUrl/DeleteShortUrlCommand.php b/module/CLI/src/Command/ShortUrl/DeleteShortUrlCommand.php index 6626791b..91c37663 100644 --- a/module/CLI/src/Command/ShortUrl/DeleteShortUrlCommand.php +++ b/module/CLI/src/Command/ShortUrl/DeleteShortUrlCommand.php @@ -19,7 +19,6 @@ use function sprintf; class DeleteShortUrlCommand extends Command { public const NAME = 'short-url:delete'; - private const ALIASES = ['short-code:delete']; private DeleteShortUrlServiceInterface $deleteShortUrlService; @@ -33,7 +32,6 @@ class DeleteShortUrlCommand extends Command { $this ->setName(self::NAME) - ->setAliases(self::ALIASES) ->setDescription('Deletes a short URL') ->addArgument('shortCode', InputArgument::REQUIRED, 'The short code for the short URL to be deleted') ->addOption( diff --git a/module/CLI/src/Command/ShortUrl/GenerateShortUrlCommand.php b/module/CLI/src/Command/ShortUrl/GenerateShortUrlCommand.php index 94748795..3e66658d 100644 --- a/module/CLI/src/Command/ShortUrl/GenerateShortUrlCommand.php +++ b/module/CLI/src/Command/ShortUrl/GenerateShortUrlCommand.php @@ -26,7 +26,6 @@ use function sprintf; class GenerateShortUrlCommand extends Command { public const NAME = 'short-url:generate'; - private const ALIASES = ['shortcode:generate', 'short-code:generate']; private UrlShortenerInterface $urlShortener; private array $domainConfig; @@ -42,7 +41,6 @@ class GenerateShortUrlCommand extends Command { $this ->setName(self::NAME) - ->setAliases(self::ALIASES) ->setDescription('Generates a short URL for provided long URL and returns it') ->addArgument('longUrl', InputArgument::REQUIRED, 'The long URL to parse') ->addOption( diff --git a/module/CLI/src/Command/ShortUrl/GetVisitsCommand.php b/module/CLI/src/Command/ShortUrl/GetVisitsCommand.php index 94462a57..363ff3aa 100644 --- a/module/CLI/src/Command/ShortUrl/GetVisitsCommand.php +++ b/module/CLI/src/Command/ShortUrl/GetVisitsCommand.php @@ -22,7 +22,6 @@ use function Functional\select_keys; class GetVisitsCommand extends AbstractWithDateRangeCommand { public const NAME = 'short-url:visits'; - private const ALIASES = ['shortcode:visits', 'short-code:visits']; private VisitsTrackerInterface $visitsTracker; @@ -36,7 +35,6 @@ class GetVisitsCommand extends AbstractWithDateRangeCommand { $this ->setName(self::NAME) - ->setAliases(self::ALIASES) ->setDescription('Returns the detailed visits information for provided short code') ->addArgument('shortCode', InputArgument::REQUIRED, 'The short code which visits we want to get'); } diff --git a/module/CLI/src/Command/ShortUrl/ListShortUrlsCommand.php b/module/CLI/src/Command/ShortUrl/ListShortUrlsCommand.php index 9eb0cc13..62d44445 100644 --- a/module/CLI/src/Command/ShortUrl/ListShortUrlsCommand.php +++ b/module/CLI/src/Command/ShortUrl/ListShortUrlsCommand.php @@ -32,7 +32,6 @@ class ListShortUrlsCommand extends AbstractWithDateRangeCommand use PaginatorUtilsTrait; public const NAME = 'short-url:list'; - private const ALIASES = ['shortcode:list', 'short-code:list']; private const COLUMNS_WHITELIST = [ 'shortCode', 'shortUrl', @@ -56,7 +55,6 @@ class ListShortUrlsCommand extends AbstractWithDateRangeCommand { $this ->setName(self::NAME) - ->setAliases(self::ALIASES) ->setDescription('List all short URLs') ->addOption( 'page', diff --git a/module/CLI/src/Command/ShortUrl/ResolveUrlCommand.php b/module/CLI/src/Command/ShortUrl/ResolveUrlCommand.php index c75ac9d6..e4c75410 100644 --- a/module/CLI/src/Command/ShortUrl/ResolveUrlCommand.php +++ b/module/CLI/src/Command/ShortUrl/ResolveUrlCommand.php @@ -19,7 +19,6 @@ use function sprintf; class ResolveUrlCommand extends Command { public const NAME = 'short-url:parse'; - private const ALIASES = ['shortcode:parse', 'short-code:parse']; private UrlShortenerInterface $urlShortener; @@ -33,7 +32,6 @@ class ResolveUrlCommand extends Command { $this ->setName(self::NAME) - ->setAliases(self::ALIASES) ->setDescription('Returns the long URL behind a short code') ->addArgument('shortCode', InputArgument::REQUIRED, 'The short code to parse') ->addOption('domain', 'd', InputOption::VALUE_REQUIRED, 'The domain to which the short URL is attached.'); diff --git a/module/CLI/src/Command/Visit/LocateVisitsCommand.php b/module/CLI/src/Command/Visit/LocateVisitsCommand.php index 0bbd0c90..432ac1bd 100644 --- a/module/CLI/src/Command/Visit/LocateVisitsCommand.php +++ b/module/CLI/src/Command/Visit/LocateVisitsCommand.php @@ -30,7 +30,6 @@ use function sprintf; class LocateVisitsCommand extends AbstractLockedCommand { public const NAME = 'visit:locate'; - public const ALIASES = ['visit:process']; private VisitServiceInterface $visitService; private IpLocationResolverInterface $ipLocationResolver; @@ -55,7 +54,6 @@ class LocateVisitsCommand extends AbstractLockedCommand { $this ->setName(self::NAME) - ->setAliases(self::ALIASES) ->setDescription('Resolves visits origin locations.'); }