Skip to content

Commit

Permalink
feat: Make commands lazy
Browse files Browse the repository at this point in the history
laravel/framework#50617

No need to instantiate all 3 of these commands when
running another command.
  • Loading branch information
derekmd committed Oct 20, 2024
1 parent b8eb1a8 commit ef799cc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Console/ChromeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
use Derekmd\Dusk\DuskFile;
use Illuminate\Console\Command;
use Illuminate\Support\Str;
use Symfony\Component\Console\Attribute\AsCommand;

#[AsCommand(name: 'dusk:chrome')]
class ChromeCommand extends Command
{
/**
Expand Down
2 changes: 2 additions & 0 deletions src/Console/FirefoxDriverCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@
use Derekmd\Dusk\OperatingSystem;
use Illuminate\Console\Command;
use RuntimeException;
use Symfony\Component\Console\Attribute\AsCommand;

/**
* @copyright Proxy downloads are based on https://github.com/staudenmeir/dusk-updater
* by Jonas Staudenmeir.
*/
#[AsCommand(name: 'dusk:firefox-driver')]
class FirefoxDriverCommand extends Command
{
use DownloadsBinaries;
Expand Down
2 changes: 2 additions & 0 deletions src/Console/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
namespace Derekmd\Dusk\Console;

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

#[AsCommand(name: 'dusk:install-firefox')]
class InstallCommand extends Command
{
/**
Expand Down

0 comments on commit ef799cc

Please sign in to comment.