I ran doctrine console tool:
$ php vendor/doctrine/orm/bin/doctrine orm:schema-tool:create --dump-sql
I got this instead of expected functionality:
You are missing a "cli-config.php" or "config/cli-config.php" file in your
project, which is required to get the Doctrine Console working. You can use the
following sample as a template:
<?php
use Doctrine\ORM\Tools\Console\ConsoleRunner;
// replace with file to your own project bootstrap
require_once 'bootstrap.php';
// replace with mechanism to retrieve EntityManager in your app
$entityManager = GetEntityManager();
return ConsoleRunner::createHelperSet($entityManager);
Issues:
bootstrap.php
GetEntityManager
How do I make this work?
Use Doctrine Module:
vendor/bin/doctrine-module orm:schema-tool:create --dump-sql
Note: this answer may be specific to these frameworks:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With