The doctrine console will try to read `cli-config.php` in the "current directory", the directory you're calling the doctrine console from. This is indeed usually the root of your project.
But I never use the doctrine console. In stead I create a new script that looks very similar to the `index.php` of my project. This way my custom console will get bootstrapped the same way as the rest of my projects does. The only real difference is that in stead of firing up my application, I fire up the console. I hoop this helps :) -- Jasper N. Brouwer (@jaspernbrouwer) On 18 Feb 2014, at 18:16, Roy Epperson <[email protected]> wrote: > Jasper, Marco - > Thanks for the feedback. Got looking at my current setup for > creating/updating my class schema for the my_project\authorization namespace > which uses the ORM. > > If I read the current documentation correctly, when you use: > prompt> php vendor/bin/doctrine <tool name> > > It reads cli-config.php from the root directory to obtain the $entityManager > that has been configured. Is cli-config.php, a php or Doctrine "hard-coded" > filename requirement? If Doctrine, it sure would be nice if the filename > could be overridden by a CL argument. > > From the getting started if there are two files: > > cli-config.php: > <?php > // cli-config.php > require_once "bootstrap.php"; > return > \Doctrine\ORM\Tools\Console\ConsoleRunner::createHelperSet($entityManager); > > bootstrap.php: > // setup the Doctrine Configuration > > That said, I think my immediate strategy is to create a batch file which > either changes the contents of the of cli-config.php to use a different > bootstrap.php for each project, or the contents of bootstrap.php for the > specific project. > > Is that correct, or is there a better way? > > Cheers, > Roy -- You received this message because you are subscribed to the Google Groups "doctrine-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/doctrine-user. For more options, visit https://groups.google.com/groups/opt_out.
