Hi, I used the composer to create the ZF2 skeleton. Installed module doctrine-module, doctrine-orm-module, etc. Below:
{
"name": "zendframework/skeleton-application",
"description": "Skeleton Application for ZF2",
"license": "BSD-3-Clause",
"keywords": [
"framework",
"zf2"
],
"homepage": "http://framework.zend.com/",
"require": {
"php": ">=5.3.3",
"zendframework/zendframework": "2.2.*",
"doctrine/doctrine-orm-module": "0.*",
"doctrine/data-fixtures": "dev-master",
"zendframework/zend-developer-tools": "dev-master",
"doctrine/migrations": "dev-master",
"bjyoungblood/bjy-profiler": "dev-master",
"zendframework/zftool": "dev-master"
}
}
The doctrine configuration is added to the module as follows:
'doctrine' => array(
'driver' => array(
__NAMESPACE__.'_entities' => array(
'class' =>'Doctrine\ORM\Mapping\Driver\AnnotationDriver',
//'cache' => 'array',
'paths' => array(
__DIR__ . '/../src/'. __NAMESPACE__ .'/Entity',
)
),
'orm_default' => array(
'drivers' => array(
__NAMESPACE__ . '\Entity' => __NAMESPACE__ . '_entities'
)
))),
And I added my essence to:
Module / Application / SRC / Application / Object / User.php
But when I run: php zf.php orm: info
I get the following message:
[Exception]
You do not have attached doctrine ORM objects according to your current configuration. If you have entities or mapping files, you should check the display configuration for errors.
If i try
php zf.php orm: schema-tool: create
I get:
There are no metadata classes to process.
Doctrine ? ?
:
, :
<?php
namespace Application\Entity;
use Doctrine\ORM\Mapping as ORM;
class User {
protected $id;
protected $fullName;
}
,
. , , . tmp, . php zf.php orm: info , .
Paralles 8, OSX, - Debian 7.
/media/psf/mount.