src/Command/GithubWorkflowCommand.php
<?php
namespace Whitecat\Command;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;
use Symfony\Component\Filesystem\Filesystem;
use Whitecat\Service\GithubWorkflowService;
#[AsCommand(
name: 'github:workflow',
description: 'Generate basic workflow for PHP library',
hidden: false
)]
class GithubWorkflowCommand extends Command
{
protected function execute(InputInterface $input, OutputInterface $output): int
{
$io = new SymfonyStyle($input, $output);
$fs = new Filesystem();
return (new GithubWorkflowService($io, $fs))->run();
}
}