Skip to content

Commit e05a8bd

Browse files
authored
[1.x] Make commands lazy (#601)
* Make commands lazy * Fix soft dependency
1 parent 4db94bd commit e05a8bd

File tree

4 files changed

+8
-1
lines changed

4 files changed

+8
-1
lines changed

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
"require": {
2828
"php": "^7.3|~8.0.0|~8.1.0|~8.2.0|~8.3.0",
2929
"ext-json": "*",
30-
"laravel/framework": "^8.74|^9.0|^10.0|^11.0"
30+
"laravel/framework": "^8.74|^9.0|^10.0|^11.0",
31+
"symfony/console": "^5.3|^6.0|^7.0"
3132
},
3233
"require-dev": {
3334
"roave/security-advisories": "dev-master",

src/Commands/CreateMiddleware.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
namespace Inertia\Commands;
44

55
use Illuminate\Console\GeneratorCommand;
6+
use Symfony\Component\Console\Attribute\AsCommand;
67
use Symfony\Component\Console\Input\InputOption;
78

9+
#[AsCommand(name: 'inertia:middleware')]
810
class CreateMiddleware extends GeneratorCommand
911
{
1012
/**

src/Commands/StartSsr.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
use Inertia\Ssr\SsrException;
66
use Illuminate\Console\Command;
77
use Inertia\Ssr\BundleDetector;
8+
use Symfony\Component\Console\Attribute\AsCommand;
89
use Symfony\Component\Process\Process;
910

11+
#[AsCommand(name: 'inertia:start-ssr')]
1012
class StartSsr extends Command
1113
{
1214
/**

src/Commands/StopSsr.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
namespace Inertia\Commands;
44

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

8+
#[AsCommand(name: 'inertia:stop-ssr')]
79
class StopSsr extends Command
810
{
911
/**

0 commit comments

Comments
 (0)