Skip to content

Commit 0a7aafb

Browse files
committed
Add missing AsCommand attributes
1 parent eb8ce2d commit 0a7aafb

10 files changed

+20
-0
lines changed

src/Illuminate/Console/Scheduling/ScheduleClearCacheCommand.php

+2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
namespace Illuminate\Console\Scheduling;
44

55
use Illuminate\Console\Command;
6+
use Symfony\Component\Console\Attribute\AsCommand;
67

8+
#[AsCommand(name: 'schedule:clear-cache')]
79
class ScheduleClearCacheCommand extends Command
810
{
911
/**

src/Illuminate/Database/Console/Migrations/FreshCommand.php

+2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@
66
use Illuminate\Console\ConfirmableTrait;
77
use Illuminate\Contracts\Events\Dispatcher;
88
use Illuminate\Database\Events\DatabaseRefreshed;
9+
use Symfony\Component\Console\Attribute\AsCommand;
910
use Symfony\Component\Console\Input\InputOption;
1011

12+
#[AsCommand(name: 'migrate:fresh')]
1113
class FreshCommand extends Command
1214
{
1315
use ConfirmableTrait;

src/Illuminate/Database/Console/Migrations/InstallCommand.php

+2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44

55
use Illuminate\Console\Command;
66
use Illuminate\Database\Migrations\MigrationRepositoryInterface;
7+
use Symfony\Component\Console\Attribute\AsCommand;
78
use Symfony\Component\Console\Input\InputOption;
89

10+
#[AsCommand(name: 'migrate:fresh')]
911
class InstallCommand extends Command
1012
{
1113
/**

src/Illuminate/Database/Console/Migrations/MigrateCommand.php

+2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@
1010
use Illuminate\Database\SQLiteDatabaseDoesNotExistException;
1111
use Illuminate\Database\SqlServerConnection;
1212
use PDOException;
13+
use Symfony\Component\Console\Attribute\AsCommand;
1314
use Throwable;
1415

1516
use function Laravel\Prompts\confirm;
1617

18+
#[AsCommand(name: 'migrate')]
1719
class MigrateCommand extends BaseCommand implements Isolatable
1820
{
1921
use ConfirmableTrait;

src/Illuminate/Database/Console/Migrations/MigrateMakeCommand.php

+2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
use Illuminate\Database\Migrations\MigrationCreator;
77
use Illuminate\Support\Composer;
88
use Illuminate\Support\Str;
9+
use Symfony\Component\Console\Attribute\AsCommand;
910

11+
#[AsCommand(name: 'make:migration')]
1012
class MigrateMakeCommand extends BaseCommand implements PromptsForMissingInput
1113
{
1214
/**

src/Illuminate/Database/Console/Migrations/RefreshCommand.php

+2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@
66
use Illuminate\Console\ConfirmableTrait;
77
use Illuminate\Contracts\Events\Dispatcher;
88
use Illuminate\Database\Events\DatabaseRefreshed;
9+
use Symfony\Component\Console\Attribute\AsCommand;
910
use Symfony\Component\Console\Input\InputOption;
1011

12+
#[AsCommand(name: 'migrate:refresh')]
1113
class RefreshCommand extends Command
1214
{
1315
use ConfirmableTrait;

src/Illuminate/Database/Console/Migrations/ResetCommand.php

+2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44

55
use Illuminate\Console\ConfirmableTrait;
66
use Illuminate\Database\Migrations\Migrator;
7+
use Symfony\Component\Console\Attribute\AsCommand;
78
use Symfony\Component\Console\Input\InputOption;
89

10+
#[AsCommand(name: 'migrate:reset')]
911
class ResetCommand extends BaseCommand
1012
{
1113
use ConfirmableTrait;

src/Illuminate/Database/Console/Migrations/RollbackCommand.php

+2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44

55
use Illuminate\Console\ConfirmableTrait;
66
use Illuminate\Database\Migrations\Migrator;
7+
use Symfony\Component\Console\Attribute\AsCommand;
78
use Symfony\Component\Console\Input\InputOption;
89

10+
#[AsCommand('migrate:rollback')]
911
class RollbackCommand extends BaseCommand
1012
{
1113
use ConfirmableTrait;

src/Illuminate/Database/Console/Migrations/StatusCommand.php

+2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44

55
use Illuminate\Database\Migrations\Migrator;
66
use Illuminate\Support\Collection;
7+
use Symfony\Component\Console\Attribute\AsCommand;
78
use Symfony\Component\Console\Input\InputOption;
89

10+
#[AsCommand(name: 'migrate:status')]
911
class StatusCommand extends BaseCommand
1012
{
1113
/**

src/Illuminate/Database/Console/PruneCommand.php

+2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@
1212
use Illuminate\Database\Events\ModelsPruned;
1313
use Illuminate\Support\Str;
1414
use InvalidArgumentException;
15+
use Symfony\Component\Console\Attribute\AsCommand;
1516
use Symfony\Component\Finder\Finder;
1617

18+
#[AsCommand(name: model:prune)]
1719
class PruneCommand extends Command
1820
{
1921
/**

0 commit comments

Comments
 (0)