Skip to content

Commit

Permalink
[1.x] Make commands lazy (#601)
Browse files Browse the repository at this point in the history
* Make commands lazy

* Fix soft dependency
  • Loading branch information
timacdonald authored May 16, 2024
1 parent 4db94bd commit e05a8bd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"require": {
"php": "^7.3|~8.0.0|~8.1.0|~8.2.0|~8.3.0",
"ext-json": "*",
"laravel/framework": "^8.74|^9.0|^10.0|^11.0"
"laravel/framework": "^8.74|^9.0|^10.0|^11.0",
"symfony/console": "^5.3|^6.0|^7.0"
},
"require-dev": {
"roave/security-advisories": "dev-master",
Expand Down
2 changes: 2 additions & 0 deletions src/Commands/CreateMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
namespace Inertia\Commands;

use Illuminate\Console\GeneratorCommand;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Input\InputOption;

#[AsCommand(name: 'inertia:middleware')]
class CreateMiddleware extends GeneratorCommand
{
/**
Expand Down
2 changes: 2 additions & 0 deletions src/Commands/StartSsr.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
use Inertia\Ssr\SsrException;
use Illuminate\Console\Command;
use Inertia\Ssr\BundleDetector;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Process\Process;

#[AsCommand(name: 'inertia:start-ssr')]
class StartSsr extends Command
{
/**
Expand Down
2 changes: 2 additions & 0 deletions src/Commands/StopSsr.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
namespace Inertia\Commands;

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

#[AsCommand(name: 'inertia:stop-ssr')]
class StopSsr extends Command
{
/**
Expand Down

0 comments on commit e05a8bd

Please sign in to comment.