Skip to content

Commit

Permalink
Add missing AsCommand attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
timacdonald committed Mar 18, 2024
1 parent eb8ce2d commit 0a7aafb
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
namespace Illuminate\Console\Scheduling;

use Illuminate\Console\Command;
use Symfony\Component\Console\Attribute\AsCommand;

#[AsCommand(name: 'schedule:clear-cache')]
class ScheduleClearCacheCommand extends Command
{
/**
Expand Down
2 changes: 2 additions & 0 deletions src/Illuminate/Database/Console/Migrations/FreshCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
use Illuminate\Console\ConfirmableTrait;
use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Database\Events\DatabaseRefreshed;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Input\InputOption;

#[AsCommand(name: 'migrate:fresh')]
class FreshCommand extends Command
{
use ConfirmableTrait;
Expand Down
2 changes: 2 additions & 0 deletions src/Illuminate/Database/Console/Migrations/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

use Illuminate\Console\Command;
use Illuminate\Database\Migrations\MigrationRepositoryInterface;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Input\InputOption;

#[AsCommand(name: 'migrate:fresh')]
class InstallCommand extends Command
{
/**
Expand Down
2 changes: 2 additions & 0 deletions src/Illuminate/Database/Console/Migrations/MigrateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@
use Illuminate\Database\SQLiteDatabaseDoesNotExistException;
use Illuminate\Database\SqlServerConnection;
use PDOException;
use Symfony\Component\Console\Attribute\AsCommand;
use Throwable;

use function Laravel\Prompts\confirm;

#[AsCommand(name: 'migrate')]
class MigrateCommand extends BaseCommand implements Isolatable
{
use ConfirmableTrait;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
use Illuminate\Database\Migrations\MigrationCreator;
use Illuminate\Support\Composer;
use Illuminate\Support\Str;
use Symfony\Component\Console\Attribute\AsCommand;

#[AsCommand(name: 'make:migration')]
class MigrateMakeCommand extends BaseCommand implements PromptsForMissingInput
{
/**
Expand Down
2 changes: 2 additions & 0 deletions src/Illuminate/Database/Console/Migrations/RefreshCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
use Illuminate\Console\ConfirmableTrait;
use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Database\Events\DatabaseRefreshed;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Input\InputOption;

#[AsCommand(name: 'migrate:refresh')]
class RefreshCommand extends Command
{
use ConfirmableTrait;
Expand Down
2 changes: 2 additions & 0 deletions src/Illuminate/Database/Console/Migrations/ResetCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

use Illuminate\Console\ConfirmableTrait;
use Illuminate\Database\Migrations\Migrator;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Input\InputOption;

#[AsCommand(name: 'migrate:reset')]
class ResetCommand extends BaseCommand
{
use ConfirmableTrait;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

use Illuminate\Console\ConfirmableTrait;
use Illuminate\Database\Migrations\Migrator;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Input\InputOption;

#[AsCommand('migrate:rollback')]
class RollbackCommand extends BaseCommand
{
use ConfirmableTrait;
Expand Down
2 changes: 2 additions & 0 deletions src/Illuminate/Database/Console/Migrations/StatusCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

use Illuminate\Database\Migrations\Migrator;
use Illuminate\Support\Collection;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Input\InputOption;

#[AsCommand(name: 'migrate:status')]
class StatusCommand extends BaseCommand
{
/**
Expand Down
2 changes: 2 additions & 0 deletions src/Illuminate/Database/Console/PruneCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
use Illuminate\Database\Events\ModelsPruned;
use Illuminate\Support\Str;
use InvalidArgumentException;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Finder\Finder;

#[AsCommand(name: model:prune)]

Check failure on line 18 in src/Illuminate/Database/Console/PruneCommand.php

View workflow job for this annotation

GitHub Actions / Source Code

Syntax error, unexpected ':', expecting ')' on line 18
class PruneCommand extends Command
{
/**
Expand Down

0 comments on commit 0a7aafb

Please sign in to comment.