I start with doctrine and want to create a db or php class from table with doctrine.
First i try create db. My bootstrap.php:
<?php
use Doctrine\ORM\Tools\Setup;
use Doctrine\ORM\EntityManager;
require_once "vendor/autoload.php";
require_once "src/BugRepository.php";
$isDevMode = true;
$config = Setup::createAnnotationMetadataConfiguration(array(__DIR__."/src"), $isDevMode);
$conn = array(
'driver' => 'pdo_pgsql',
'user' => 'postgres',
'password' => '123456',
'host' => 'localhost',
'dbname' =>'testdata',
);
$entityManager = EntityManager::create($conn, $config);
and i do:
php vendor/bin/doctrine doctrine:database:create
my output:
SRC_DIR="`pwd`"
cd "`dirname "$0"`"
cd "../doctrine/orm/bin"
BIN_TARGET="`pwd`/doctrine"
cd "$SRC_DIR"
"$BIN_TARGET" "$@"
But db testdata
not created.
Same with creating php class from table:
php vendor/bin/doctrine doctrine:mapping:import YourAppBundle yml --filter="bugs"
But yml file not created.
Whats can be wrong?