mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-14 06:11:35 +08:00
Enh: yii fixture
command now offers help if no arguments are provided instead of crashing
This commit is contained in:
@ -91,6 +91,15 @@ class FixtureController extends Controller
|
||||
public function actionLoad()
|
||||
{
|
||||
$fixturesInput = func_get_args();
|
||||
if ($fixturesInput === []) {
|
||||
$this->stdout($this->getHelpSummary() . "\n");
|
||||
|
||||
$helpCommand = Console::ansiFormat("yii help fixture", [Console::FG_CYAN]);
|
||||
$this->stdout("Use $helpCommand to get usage info.\n");
|
||||
|
||||
return self::EXIT_CODE_NORMAL;
|
||||
}
|
||||
|
||||
$filtered = $this->filterFixtures($fixturesInput);
|
||||
$except = $filtered['except'];
|
||||
|
||||
|
Reference in New Issue
Block a user