I have clean project ZendSkeletonApplication with integrated Doctrine 2 module "doctrine-orm-module" etc via Composer. Doctrine CLI works from vendor/bin.
I have 'Application' and 'Blog' module, my module config:
<?php
namespace Blog;
return array(
'router' => array(
'routes' => array(
'post' => array(
'type' => 'segment',
'options' => array(
'route' => '/post[/:action][/:id]',
'constraints' => array(
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
'id' => '[0-9]+',
),
'defaults' => array(
'controller' => 'Blog\Controller\Post',
'action' => 'index',
),
),
),
),
),
'controllers' => array(
'invokables' => array(
'Blog\Controller\Post' => 'Blog\Controller\PostController'
),
),
'view_manager' => array(
'template_path_stack' => array(
'blog' => __DIR__ . '/../view',
),
),
'doctrine' => array(
'driver' => array(
__NAMESPACE__ . '_driver' => array(
'class' => 'Doctrine\ORM\Mapping\Driver\AnnotationDriver',
'cache' => 'array',
'paths' => array(__DIR__ . '/../src/' . __NAMESPACE__ . '/Entity')
),
'orm_default' => array(
'drivers' => array(
__NAMESPACE__ . '\Entity' => __NAMESPACE__ . '_driver'
)
)
)
)
);
How to generate Entities from YAML files each module and how to config my modules arrays to use YAML? For example I have my all .yml files in ZendSkeletonApplication/mapping/yml and few .yml files have definitions of Blog module entities and few have definitions of Application module entities.
My entities are in Blog/src/Blog/Entity folder for blog module. All I want its just by one call in Doctrine CLI generate-entities create all Entities each module from all .yml files which are placed in mapping/yml folder? Is it possible? Can anybody provide simple example with doctrine config?
./vendor/binand the commands are here: docs.doctrine-project.org/en/2.0.x/reference/… - Sam