Cli命令行语法报错

1
PHP Deprecated:  Return type of Symfony\Component\Console\Helper\HelperSet::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///www/server/php/81/bin/composer/vendor/symfony/console/Helper/HelperSet.php on line 112
  • 起因:
    • 宝塔安装初始默认版本2.0.x
  • 版本:2.0.x
  • 问题:composer版本过低
  • 解决:更新composer版本 composer selfupdate