Skip to content

Commit cf670c0

Browse files
committed
feat: Make commands lazy
laravel/framework#50617 No need to instantiate all 3 of these commands when running another command.
1 parent 2d65c99 commit cf670c0

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

src/Console/ChromeCommand.php

+2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
use Derekmd\Dusk\DuskFile;
66
use Illuminate\Console\Command;
77
use Illuminate\Support\Str;
8+
use Symfony\Component\Console\Attribute\AsCommand;
89

10+
#[AsCommand(name: 'dusk:chrome')]
911
class ChromeCommand extends Command
1012
{
1113
/**

src/Console/FirefoxDriverCommand.php

+2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77
use Derekmd\Dusk\OperatingSystem;
88
use Illuminate\Console\Command;
99
use RuntimeException;
10+
use Symfony\Component\Console\Attribute\AsCommand;
1011

1112
/**
1213
* @copyright Proxy downloads are based on https://github.com/staudenmeir/dusk-updater
1314
* by Jonas Staudenmeir.
1415
*/
16+
#[AsCommand(name: 'dusk:firefox-driver')]
1517
class FirefoxDriverCommand extends Command
1618
{
1719
use DownloadsBinaries;

src/Console/InstallCommand.php

+2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
namespace Derekmd\Dusk\Console;
44

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

8+
#[AsCommand(name: 'dusk:install-firefox')]
79
class InstallCommand extends Command
810
{
911
/**

0 commit comments

Comments
 (0)