Where did you define a function called `GetEntityManager`? That's supposed to be what your `bootstrap.php` does.
Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 10 June 2014 17:40, Sebastian Trueman <[email protected]> wrote: > Hi all, > > today I tried to setup doctrine with composer. I stopped at using the > console running commands like: > >> php .\vendor\doctrine\orm\bin\doctrine orm:schema-tool:create >> .\vendor\bin\doctrine.bat > > > I get the following message: > > Fatal error: Call to undefined function GetEntityManager() in > C:\Apache24\htdocs\template_lib_3\cli-config.php on line 8 > > My cli-config.php: > > > <?php > //cli-config.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); > > > My bootstrap.php: > > <?php >> // bootstrap.php >> require_once "vendor/autoload.php"; >> use Doctrine\ORM\Tools\Setup; >> use Doctrine\ORM\EntityManager; >> $paths = array("config/entitiy-files"); >> $isDevMode = false; >> // the connection configuration >> $dbParams = array( >> 'driver' => 'sqlsrv', >> 'user' => 'webapp_ptexperts', >> 'password' => 'jD^Q_h%9', >> 'dbname' => 'ptoutline', >> 'host' => '172.20.64.88' >> ); >> $config = Setup::createAnnotationMetadataConfiguration($paths, >> $isDevMode); >> $entityManager = EntityManager::create($dbParams, $config); > > > I'm using Windows 7 with PHP 5.3.28 and apache 2.0. > > Maybe you can help me to solve this configuration problem. > > Regards, > > Sebastian > > -- > 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/d/optout. > -- 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/d/optout.
