Error generating the model
cufano opened this issue · 2 comments
cufano commented
Hello, when generating the model with
#php yii schema/schema-org
I get this error:
Exception 'yii\base\UnknownPropertyException' with message 'Setting unknown property: yii\console\Application::schema'
simialbi commented
How does your config/console.php
respectively your console/config/main.php
looks like?
Should be something like this:
<?php
$params = require __DIR__ . '/params.php';
$db = require __DIR__ . '/db.php';
$config = [
'id' => 'basic-console',
'basePath' => dirname(__DIR__),
'bootstrap' => ['log', 'schema'],
'controllerNamespace' => 'app\commands',
'aliases' => [
'@bower' => '@vendor/bower-asset',
'@npm' => '@vendor/npm-asset',
],
'components' => [
'cache' => [
'class' => 'yii\caching\FileCache',
],
'log' => [
'targets' => [
[
'class' => 'yii\log\FileTarget',
'levels' => ['error', 'warning'],
],
],
],
'db' => $db,
],
'params' => $params,
'modules' => [
'schema' => [
'class' => 'simialbi\yii2\schemaorg\Module'
]
]
];
return $config;
Consider the bootstrap
and modules
parts.