Reputation: 200
I started new project, based on Silex Micro Framework, but i stuck on doctrine cli extension. I used in some other projects, with Slim, or my own sample framework doctrine cli and there is work fine. Now, my cli-config.php is so simple:
require_once './vendor/autoload.php';
use App\Application;
use Symfony\Component\Console\Helper\HelperSet;
use Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper;
use Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper;
$app = Application::getInstance()->configure()->getApp();
$helperSet = new HelperSet(array(
'db' => new ConnectionHelper($app['em']->getConnection()),
'em' => new EntityManagerHelper($app['em'])
));
but not work very well, just return me doctrine.php contents
SRC_DIR="`pwd`"
cd "`dirname "$0"`"
cd '../doctrine/orm/bin'
BIN_TARGET="`pwd`/doctrine.php"
cd "$SRC_DIR"
"$BIN_TARGET" "$@"
I tried with this commands
php vendor/bin/doctrine.php orm
php vendor/doctrine/orm/bin/doctrine.php
and many other variations, none of these was helpful for me. Maybe this is so little change, or typo bug ...
PS I debug everything in my cli-config.php file, $app['em'] return right instnace of EntityManager, everything look good (for me).
Upvotes: 2
Views: 1945
Reputation: 200
I don't know when ... but, with
php vendor/doctrine/orm/bin/doctrine.php orm
everything work fine. I post this as a answer, but i wanna know why
php vendor/bin/doctrine.php
not work o.O
Upvotes: 2