mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-24 17:15:36 +08:00
change commands definition to attribute
This commit is contained in:
@@ -4,21 +4,16 @@ declare(strict_types=1);
|
||||
|
||||
namespace ZM\Command;
|
||||
|
||||
use Symfony\Component\Console\Attribute\AsCommand;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
#[AsCommand(name: 'check:config', description: '检查配置文件是否和框架当前版本有更新')]
|
||||
class CheckConfigCommand extends Command
|
||||
{
|
||||
protected static $defaultName = 'check:config';
|
||||
|
||||
private $need_update = false;
|
||||
|
||||
protected function configure()
|
||||
{
|
||||
$this->setDescription('检查配置文件是否和框架当前版本有更新');
|
||||
}
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output): int
|
||||
{
|
||||
if (LOAD_MODE !== 1) {
|
||||
|
||||
Reference in New Issue
Block a user