Skip to content

Commit 4901980

Browse files
authored
[8.x] Make commands lazy (#1092)
* Make commands lazy * Make commands lazy
1 parent 50e5938 commit 4901980

7 files changed

+14
-0
lines changed

src/Console/ChromeDriverCommand.php

+2
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@
88
use Illuminate\Console\Command;
99
use Illuminate\Support\Str;
1010
use Laravel\Dusk\OperatingSystem;
11+
use Symfony\Component\Console\Attribute\AsCommand;
1112
use Symfony\Component\Process\Process;
1213
use ZipArchive;
1314

1415
/**
1516
* @copyright Originally created by Jonas Staudenmeir: https://github.com/staudenmeir/dusk-updater
1617
*/
18+
#[AsCommand(name: 'dusk:chrome-driver')]
1719
class ChromeDriverCommand extends Command
1820
{
1921
/**

src/Console/ComponentCommand.php

+2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
use Illuminate\Console\GeneratorCommand;
66
use Illuminate\Support\Str;
7+
use Symfony\Component\Console\Attribute\AsCommand;
78

9+
#[AsCommand(name: 'dusk:component')]
810
class ComponentCommand extends GeneratorCommand
911
{
1012
/**

src/Console/DuskCommand.php

+2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77
use Illuminate\Support\Str;
88
use NunoMaduro\Collision\Adapters\Phpunit\Subscribers\EnsurePrinterIsRegisteredSubscriber;
99
use PHPUnit\Runner\Version;
10+
use Symfony\Component\Console\Attribute\AsCommand;
1011
use Symfony\Component\Finder\Finder;
1112
use Symfony\Component\Process\Exception\ProcessSignaledException;
1213
use Symfony\Component\Process\Exception\RuntimeException;
1314
use Symfony\Component\Process\Process;
1415

16+
#[AsCommand(name: 'dusk')]
1517
class DuskCommand extends Command
1618
{
1719
use Concerns\InteractsWithTestingFrameworks;

src/Console/InstallCommand.php

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

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

8+
#[AsCommand(name: 'dusk:install')]
79
class InstallCommand extends Command
810
{
911
use Concerns\InteractsWithTestingFrameworks;

src/Console/MakeCommand.php

+2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
use Illuminate\Console\GeneratorCommand;
66
use Illuminate\Support\Str;
7+
use Symfony\Component\Console\Attribute\AsCommand;
78

9+
#[AsCommand(name: 'dusk:make')]
810
class MakeCommand extends GeneratorCommand
911
{
1012
use Concerns\InteractsWithTestingFrameworks;

src/Console/PageCommand.php

+2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
use Illuminate\Console\GeneratorCommand;
66
use Illuminate\Support\Str;
7+
use Symfony\Component\Console\Attribute\AsCommand;
78

9+
#[AsCommand(name: 'dusk:page')]
810
class PageCommand extends GeneratorCommand
911
{
1012
/**

src/Console/PurgeCommand.php

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

55
use Illuminate\Console\Command;
6+
use Symfony\Component\Console\Attribute\AsCommand;
67
use Symfony\Component\Console\Output\OutputInterface;
78
use Symfony\Component\Finder\Finder;
89

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

0 commit comments

Comments
 (0)