Skip to content

fix: symfony console deprecation notice #611

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/Commands/DebugCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\Process;
use Native\Laravel\Support\Environment;
use Symfony\Component\Console\Attribute\AsCommand;

use function Laravel\Prompts\error;
use function Laravel\Prompts\info;
Expand All @@ -17,12 +18,14 @@
use function Laravel\Prompts\outro;
use function Laravel\Prompts\select;

#[AsCommand(
name: 'native:debug',
description: 'Generate debug information required for opening an issue.',
)]
class DebugCommand extends Command implements PromptsForMissingInput
{
protected $signature = 'native:debug {output}';

protected $description = 'Generate debug information required for opening an issue.';

private Collection $debugInfo;

public function handle(): void
Expand Down
5 changes: 5 additions & 0 deletions src/Commands/FreshCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@

use Illuminate\Database\Console\Migrations\FreshCommand as BaseFreshCommand;
use Native\Laravel\NativeServiceProvider;
use Symfony\Component\Console\Attribute\AsCommand;

#[AsCommand(
name: 'native:migrate:fresh',
description: 'Drop all tables and re-run all migrations in the NativePHP development environment',
)]
class FreshCommand extends BaseFreshCommand
{
protected $name = 'native:migrate:fresh';
Expand Down
5 changes: 5 additions & 0 deletions src/Commands/LoadPHPConfigurationCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@

use Illuminate\Console\Command;
use Native\Laravel\Contracts\ProvidesPhpIni;
use Symfony\Component\Console\Attribute\AsCommand;

#[AsCommand(
name: 'native:php-ini',
description: 'Load the PHP configuration for the NativePHP development environment',
)]
class LoadPHPConfigurationCommand extends Command
{
protected $signature = 'native:php-ini';
Expand Down
5 changes: 5 additions & 0 deletions src/Commands/LoadStartupConfigurationCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
namespace Native\Laravel\Commands;

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

#[AsCommand(
name: 'native:config',
description: 'Load the startup configuration for the NativePHP development environment',
)]
class LoadStartupConfigurationCommand extends Command
{
protected $signature = 'native:config';
Expand Down
7 changes: 5 additions & 2 deletions src/Commands/MigrateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@
use Illuminate\Database\Console\Migrations\MigrateCommand as BaseMigrateCommand;
use Illuminate\Database\Migrations\Migrator;
use Native\Laravel\NativeServiceProvider;
use Symfony\Component\Console\Attribute\AsCommand;

#[AsCommand(
name: 'native:migrate',
description: 'Run the database migrations in the NativePHP development environment',
)]
class MigrateCommand extends BaseMigrateCommand
{
protected $description = 'Run the database migrations in the NativePHP development environment';

public function __construct(Migrator $migrator, Dispatcher $dispatcher)
{
$this->signature = 'native:'.$this->signature;
Expand Down
9 changes: 5 additions & 4 deletions src/Commands/SeedDatabaseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@

use Illuminate\Database\Console\Seeds\SeedCommand as BaseSeedCommand;
use Native\Laravel\NativeServiceProvider;
use Symfony\Component\Console\Attribute\AsCommand;

#[AsCommand(
name: 'native:seed',
description: 'Seed the database in the NativePHP development environment',
)]
class SeedDatabaseCommand extends BaseSeedCommand
{
protected $name = 'native:db:seed';

protected $description = 'Run the database seeders in the NativePHP development environment';

public function handle()
{
(new NativeServiceProvider($this->laravel))->rewriteDatabase();
Expand Down