symfony警告:array_merge():参数#2不是/ home /中的数组

时间:2011-02-12 23:39:43

标签: php symfony1 doctrine

我刚开始使用symfony并且正在尝试构建数据库但是我收到以下错误:

./symfony doctrine:build --model
  

警告:array_merge():参数#2是   不是一个数组   /home/nicky/symfony/symfony-1.4.8/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineBaseTask.class.php   在第182行

我在schema.yml

中有以下内容
# config/doctrine/schema.yml
JobeetCategory:
actAs: { Timestampable: ~ }
columns:
name: { type: string(255), notnull: true, unique: true }
JobeetJob:
actAs: { Timestampable: ~ }
columns:
category_id:  { type: integer, notnull: true }
type:         { type: string(255) }
company:      { type: string(255), notnull: true }
logo:         { type: string(255) }
url:          { type: string(255) }
position:     { type: string(255), notnull: true }
location:     { type: string(255), notnull: true }
description:  { type: string(4000), notnull: true }
how_to_apply: { type: string(4000), notnull: true }
token:        { type: string(255), notnull: true, unique: true }
is_public:    { type: boolean, notnull: true, default: 1 }
is_activated: { type: boolean, notnull: true, default: 0 }
email:        { type: string(255), notnull: true }
expires_at:   { type: timestamp, notnull: true }

感谢您的帮助!

1 个答案:

答案 0 :(得分:2)

如果这就是你的文件实际看起来的样子,那就是YAML无效。它是一种基于缩进的语言,您的模型名称下没有缩进。

相关问题