Added devmode built-in

This commit is contained in:
2021-12-30 00:55:30 +01:00
parent 5a1268aed6
commit 206ef1e259
3 changed files with 128 additions and 0 deletions

View File

@ -0,0 +1,29 @@
<?php
namespace Spark\Commands;
use Symfony\Component\Console\Attribute\AsCommand;
use Spark\Commands\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Spark\DevMode\DevMode;
#[AsCommand(name:'dev', description:'Enter development mode')]
class DevCommand extends Command
{
protected function configure()
{
}
protected function execute(InputInterface $input, OutputInterface $output)
{
$env = $this->getEnvironment();
$devmode = new DevMode($env);
$devmode->run();
return Command::SUCCESS;
}
}