Skip to content

fix: symfony console deprecation notice #227

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
5 changes: 5 additions & 0 deletions src/Commands/BuildCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,15 @@
use Native\Electron\Traits\OsAndArch;
use Native\Electron\Traits\PatchesPackagesJson;
use Native\Electron\Traits\PrunesVendorDirectory;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Process\Process as SymfonyProcess;

use function Laravel\Prompts\intro;

#[AsCommand(
name: 'native:build',
description: 'Build the NativePHP application for the specified operating system and architecture.',
)]
class BuildCommand extends Command
{
use CleansEnvFile;
Expand Down
7 changes: 5 additions & 2 deletions src/Commands/BundleCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,16 @@
use Native\Electron\Traits\LocatesPhpBinary;
use Native\Electron\Traits\PatchesPackagesJson;
use Native\Electron\Traits\PrunesVendorDirectory;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Finder\Finder;
use ZipArchive;

use function Laravel\Prompts\intro;

#[AsCommand(
name: 'native:bundle',
description: 'Bundle your application for distribution.',
)]
class BundleCommand extends Command
{
use CleansEnvFile;
Expand All @@ -35,8 +40,6 @@ class BundleCommand extends Command

protected $signature = 'native:bundle {--fetch} {--clear} {--without-cleanup}';

protected $description = 'Bundle your application for distribution.';

private ?string $key;

private string $zipPath;
Expand Down
5 changes: 5 additions & 0 deletions src/Commands/DevelopCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@
use Native\Electron\Traits\Installer;
use Native\Electron\Traits\InstallsAppIcon;
use Native\Electron\Traits\PatchesPackagesJson;
use Symfony\Component\Console\Attribute\AsCommand;

use function Laravel\Prompts\intro;
use function Laravel\Prompts\note;

#[AsCommand(
name: 'native:serve',
description: 'Start the NativePHP development server with the Electron app',
)]
class DevelopCommand extends Command
{
use CopiesCertificateAuthority;
Expand Down
7 changes: 5 additions & 2 deletions src/Commands/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,18 @@
use Illuminate\Console\Command;
use Native\Electron\Traits\Installer;
use RuntimeException;
use Symfony\Component\Console\Attribute\AsCommand;

use function Laravel\Prompts\confirm;
use function Laravel\Prompts\info;
use function Laravel\Prompts\intro;
use function Laravel\Prompts\note;
use function Laravel\Prompts\outro;

#[AsCommand(
name: 'native:install',
description: 'Install all of the NativePHP resources',
)]
class InstallCommand extends Command
{
use Installer;
Expand All @@ -20,8 +25,6 @@ class InstallCommand extends Command
{--force : Overwrite existing files by default}
{--installer=npm : The package installer to use: npm, yarn or pnpm}';

protected $description = 'Install all of the NativePHP resources';

public function handle(): void
{
intro('Publishing NativePHP Service Provider...');
Expand Down
5 changes: 5 additions & 0 deletions src/Commands/PublishCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@
use Illuminate\Support\Facades\Artisan;
use Native\Electron\Traits\LocatesPhpBinary;
use Native\Electron\Traits\OsAndArch;
use Symfony\Component\Console\Attribute\AsCommand;

#[AsCommand(
name: 'native:publish',
description: 'Build and publish the NativePHP app for the specified operating system and architecture',
)]
class PublishCommand extends Command
{
use LocatesPhpBinary;
Expand Down
7 changes: 5 additions & 2 deletions src/Commands/ResetCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,21 @@

use Illuminate\Console\Command;
use Native\Electron\Traits\PatchesPackagesJson;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Filesystem\Filesystem;

use function Laravel\Prompts\intro;

#[AsCommand(
name: 'native:reset',
description: 'Clear all build and dist files',
)]
class ResetCommand extends Command
{
use PatchesPackagesJson;

protected $signature = 'native:reset {--with-app-data : Clear the app data as well}';

protected $description = 'Clear all build and dist files';

public function handle(): int
{
intro('Clearing build and dist directories...');
Expand Down