aspendigital / fuel-doctrine2

A Doctrine2 package for the FuelPHP framework
GNU Lesser General Public License v2.1
11 stars 1 forks source link

Console #1

Closed joericochuyt closed 11 years ago

joericochuyt commented 12 years ago

Hi, i'm trying to use the doctrine console tool, I copied the Symfony folder into the vendor folder and made in the root a new executable file 'doctrine'

<?php

use \Doctrine_Fuel;

define('APPPATH', realpath(__DIR__.'/fuel/app/').DIRECTORY_SEPARATOR);

require APPPATH.'bootstrap.php';

Package::load('doctrine2');

$em = Doctrine_Fuel::manager();

$helperSet = new \Symfony\Component\Console\Helper\HelperSet(array(
    'db' => new \Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper($em->getConnection()),
    'em' => new \Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper($em)
));

\Doctrine\ORM\Tools\Console\ConsoleRunner::run($helperSet);

When I do php doctrine --list I get the available commands in my console output. When trying to create entities I get this response: orm:generate-entities => No Metadata Classes to process.

Also I'm new to FuelPHP

livedata commented 12 years ago

Do you have any entities in entities directory?