Skip to content

Commit 787a9d6

Browse files
authored
fix: symfony console deprecation notice (#611)
1 parent 6fe208c commit 787a9d6

File tree

6 files changed

+30
-8
lines changed

6 files changed

+30
-8
lines changed

src/Commands/DebugCommand.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Illuminate\Support\Facades\File;
1010
use Illuminate\Support\Facades\Process;
1111
use Native\Laravel\Support\Environment;
12+
use Symfony\Component\Console\Attribute\AsCommand;
1213

1314
use function Laravel\Prompts\error;
1415
use function Laravel\Prompts\info;
@@ -17,12 +18,14 @@
1718
use function Laravel\Prompts\outro;
1819
use function Laravel\Prompts\select;
1920

21+
#[AsCommand(
22+
name: 'native:debug',
23+
description: 'Generate debug information required for opening an issue.',
24+
)]
2025
class DebugCommand extends Command implements PromptsForMissingInput
2126
{
2227
protected $signature = 'native:debug {output}';
2328

24-
protected $description = 'Generate debug information required for opening an issue.';
25-
2629
private Collection $debugInfo;
2730

2831
public function handle(): void

src/Commands/FreshCommand.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44

55
use Illuminate\Database\Console\Migrations\FreshCommand as BaseFreshCommand;
66
use Native\Laravel\NativeServiceProvider;
7+
use Symfony\Component\Console\Attribute\AsCommand;
78

9+
#[AsCommand(
10+
name: 'native:migrate:fresh',
11+
description: 'Drop all tables and re-run all migrations in the NativePHP development environment',
12+
)]
813
class FreshCommand extends BaseFreshCommand
914
{
1015
protected $name = 'native:migrate:fresh';

src/Commands/LoadPHPConfigurationCommand.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44

55
use Illuminate\Console\Command;
66
use Native\Laravel\Contracts\ProvidesPhpIni;
7+
use Symfony\Component\Console\Attribute\AsCommand;
78

9+
#[AsCommand(
10+
name: 'native:php-ini',
11+
description: 'Load the PHP configuration for the NativePHP development environment',
12+
)]
813
class LoadPHPConfigurationCommand extends Command
914
{
1015
protected $signature = 'native:php-ini';

src/Commands/LoadStartupConfigurationCommand.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33
namespace Native\Laravel\Commands;
44

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

8+
#[AsCommand(
9+
name: 'native:config',
10+
description: 'Load the startup configuration for the NativePHP development environment',
11+
)]
712
class LoadStartupConfigurationCommand extends Command
813
{
914
protected $signature = 'native:config';

src/Commands/MigrateCommand.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@
66
use Illuminate\Database\Console\Migrations\MigrateCommand as BaseMigrateCommand;
77
use Illuminate\Database\Migrations\Migrator;
88
use Native\Laravel\NativeServiceProvider;
9+
use Symfony\Component\Console\Attribute\AsCommand;
910

11+
#[AsCommand(
12+
name: 'native:migrate',
13+
description: 'Run the database migrations in the NativePHP development environment',
14+
)]
1015
class MigrateCommand extends BaseMigrateCommand
1116
{
12-
protected $description = 'Run the database migrations in the NativePHP development environment';
13-
1417
public function __construct(Migrator $migrator, Dispatcher $dispatcher)
1518
{
1619
$this->signature = 'native:'.$this->signature;

src/Commands/SeedDatabaseCommand.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44

55
use Illuminate\Database\Console\Seeds\SeedCommand as BaseSeedCommand;
66
use Native\Laravel\NativeServiceProvider;
7+
use Symfony\Component\Console\Attribute\AsCommand;
78

9+
#[AsCommand(
10+
name: 'native:seed',
11+
description: 'Seed the database in the NativePHP development environment',
12+
)]
813
class SeedDatabaseCommand extends BaseSeedCommand
914
{
10-
protected $name = 'native:db:seed';
11-
12-
protected $description = 'Run the database seeders in the NativePHP development environment';
13-
1415
public function handle()
1516
{
1617
(new NativeServiceProvider($this->laravel))->rewriteDatabase();

0 commit comments

Comments
 (0)