Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/228.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 使用symfony中的条令从yaml文件创建实体_Php_Symfony_Doctrine Orm_Doctrine - Fatal编程技术网

Php 使用symfony中的条令从yaml文件创建实体

Php 使用symfony中的条令从yaml文件创建实体,php,symfony,doctrine-orm,doctrine,Php,Symfony,Doctrine Orm,Doctrine,我有一个symfony条令yaml文件,内容如下: Symchat\SymchatBundle\Entity\Messages: type: entity table: messages id: id: type: integer scale: 0 length: null unique: false nullable: false

我有一个symfony条令yaml文件,内容如下:

Symchat\SymchatBundle\Entity\Messages:
    type: entity
    table: messages
    id:
        id:
            type: integer
            scale: 0
            length: null
            unique: false
            nullable: false
            precision: 0
            id: true
            generator:
                strategy: IDENTITY
    fields:
        message:
            type: string
            scale: 0
            length: 250
            unique: false
            nullable: false
            precision: 0
        date:
            type: datetime
            scale: 0
            length: null
            unique: false
            nullable: false
            precision: 0
    lifecycleCallbacks: {  }
但是如何让symfony/doctor自动生成实体php文件呢

这看起来很简单,但一直在文件中循环寻找这个


我只想通过symfony读取doctrine文件并创建Messages.php实体类。

php应用程序/控制台生成:doctrine:entities-Symchat\SymchatBundle
不行!非常感谢你