diff --git a/src/Command/ConvertHtmlToPdfCommand.php b/src/Command/ConvertHtmlToPdfCommand.php index 08276a1..a1f706c 100644 --- a/src/Command/ConvertHtmlToPdfCommand.php +++ b/src/Command/ConvertHtmlToPdfCommand.php @@ -4,19 +4,20 @@ namespace Beganovich\Snappdf\Command; use Beganovich\Snappdf\Snappdf; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +#[AsCommand( + name: 'convert', + description: 'Converts HTML to PDF', + hidden: false, + aliases: ['convert:html-to-pdf'] +)] class ConvertHtmlToPdfCommand extends Command { - /** - * Command signature. - * - * @var string - */ - protected static $defaultName = 'convert'; /** * Configure command propeprties. diff --git a/src/Command/DownloadChromiumCommand.php b/src/Command/DownloadChromiumCommand.php index 031ed77..d325413 100644 --- a/src/Command/DownloadChromiumCommand.php +++ b/src/Command/DownloadChromiumCommand.php @@ -10,15 +10,21 @@ use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Filesystem\Filesystem; use ZipArchive; +use Symfony\Component\Console\Attribute\AsCommand; -class DownloadChromiumCommand extends Command -{ /** * Command signature. * - * @var string */ - protected static $defaultName = 'download'; +#[AsCommand( + name: 'download', + description: 'Downloads the chromium binary', + hidden: false, + aliases: ['download:chromium'] +)] +class DownloadChromiumCommand extends Command +{ + /** * Download link for revisions.