diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 15038f19d..e01d3dce5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -189,7 +189,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '7.4' + php-version: '8.0' coverage: none - name: Get composer cache directory diff --git a/src/Phinx/Console/Command/Breakpoint.php b/src/Phinx/Console/Command/Breakpoint.php index 0b7bc1f23..f94d597a0 100644 --- a/src/Phinx/Console/Command/Breakpoint.php +++ b/src/Phinx/Console/Command/Breakpoint.php @@ -8,10 +8,12 @@ namespace Phinx\Console\Command; use InvalidArgumentException; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; +#[AsCommand(name: 'breakpoint')] class Breakpoint extends AbstractCommand { /** diff --git a/src/Phinx/Console/Command/Create.php b/src/Phinx/Console/Command/Create.php index 4767a8d7b..1e1824b88 100644 --- a/src/Phinx/Console/Command/Create.php +++ b/src/Phinx/Console/Command/Create.php @@ -13,6 +13,7 @@ use Phinx\Config\NamespaceAwareInterface; use Phinx\Util\Util; use RuntimeException; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; @@ -20,6 +21,7 @@ use Symfony\Component\Console\Question\ChoiceQuestion; use Symfony\Component\Console\Question\ConfirmationQuestion; +#[AsCommand(name: 'create')] class Create extends AbstractCommand { /** diff --git a/src/Phinx/Console/Command/Init.php b/src/Phinx/Console/Command/Init.php index 6be7e2b12..34568b629 100644 --- a/src/Phinx/Console/Command/Init.php +++ b/src/Phinx/Console/Command/Init.php @@ -9,11 +9,13 @@ use InvalidArgumentException; use RuntimeException; +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: 'init')] class Init extends Command { protected const FILE_NAME = 'phinx'; diff --git a/src/Phinx/Console/Command/ListAliases.php b/src/Phinx/Console/Command/ListAliases.php index bcdfa7761..1eeac2cb3 100644 --- a/src/Phinx/Console/Command/ListAliases.php +++ b/src/Phinx/Console/Command/ListAliases.php @@ -8,9 +8,11 @@ namespace Phinx\Console\Command; use Phinx\Util\Util; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +#[AsCommand(name: 'list:aliases')] class ListAliases extends AbstractCommand { /** diff --git a/src/Phinx/Console/Command/Migrate.php b/src/Phinx/Console/Command/Migrate.php index 2da1f00a3..3305d5ab9 100644 --- a/src/Phinx/Console/Command/Migrate.php +++ b/src/Phinx/Console/Command/Migrate.php @@ -9,11 +9,13 @@ use DateTime; use Exception; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Throwable; +#[AsCommand(name: 'migrate')] class Migrate extends AbstractCommand { /** diff --git a/src/Phinx/Console/Command/Rollback.php b/src/Phinx/Console/Command/Rollback.php index 03a6cd126..7e5bdc71c 100644 --- a/src/Phinx/Console/Command/Rollback.php +++ b/src/Phinx/Console/Command/Rollback.php @@ -9,10 +9,12 @@ use DateTime; use InvalidArgumentException; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; +#[AsCommand(name: 'rollback')] class Rollback extends AbstractCommand { /** diff --git a/src/Phinx/Console/Command/SeedCreate.php b/src/Phinx/Console/Command/SeedCreate.php index afe06bcea..e9bfa8dbd 100644 --- a/src/Phinx/Console/Command/SeedCreate.php +++ b/src/Phinx/Console/Command/SeedCreate.php @@ -12,6 +12,7 @@ use Phinx\Config\NamespaceAwareInterface; use Phinx\Util\Util; use RuntimeException; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; @@ -19,6 +20,7 @@ use Symfony\Component\Console\Question\ChoiceQuestion; use Symfony\Component\Console\Question\ConfirmationQuestion; +#[AsCommand(name: 'seed:create')] class SeedCreate extends AbstractCommand { /** diff --git a/src/Phinx/Console/Command/SeedRun.php b/src/Phinx/Console/Command/SeedRun.php index 88d04f6f7..ba2b32f81 100644 --- a/src/Phinx/Console/Command/SeedRun.php +++ b/src/Phinx/Console/Command/SeedRun.php @@ -7,10 +7,12 @@ namespace Phinx\Console\Command; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; +#[AsCommand(name: 'seed:run')] class SeedRun extends AbstractCommand { /** diff --git a/src/Phinx/Console/Command/Status.php b/src/Phinx/Console/Command/Status.php index e656525c1..c00846f09 100644 --- a/src/Phinx/Console/Command/Status.php +++ b/src/Phinx/Console/Command/Status.php @@ -7,10 +7,12 @@ namespace Phinx\Console\Command; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; +#[AsCommand(name: 'status')] class Status extends AbstractCommand { /** diff --git a/src/Phinx/Console/Command/Test.php b/src/Phinx/Console/Command/Test.php index af0f7cd21..abe8036b4 100644 --- a/src/Phinx/Console/Command/Test.php +++ b/src/Phinx/Console/Command/Test.php @@ -10,13 +10,12 @@ use InvalidArgumentException; use Phinx\Migration\Manager\Environment; use Phinx\Util\Util; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; -/** - * @author Leonid Kuzmin - */ +#[AsCommand(name: 'test')] class Test extends AbstractCommand { /**