i'm trying to get my Doctrine CommandLine Tool working in Symfony 2 project on Windows 7 and I keep getting the same error message in console:
Fatal error: Call to protected Doctrine\ORM\EntityManager::__construct()
from invalid context in C:\wamp\www\firstSymfonyApp\cli-config.php on line 9
Call Stack:
0.0010 239440 1. {main}() C:\wamp\www\firstSymfonyApp\vendor\doctrine\orm\bin\doctrine.php:0
0.0090 621376 2. require('C:\wamp\www\firstSymfonyApp\cli-config.php') C:\wamp\www\firstSymfonyApp\vendor\doctrine\orm\bin\doctrine.php:48
Code of my cli-config.php file:
<?php
use Doctrine\ORM\Tools\Console\ConsoleRunner;
require_once 'app/bootstrap.php.cache';
$em = new \Doctrine\ORM\EntityManager();
return ConsoleRunner::createHelperSet($em);
Until today, I was only using doctrine on Linux where the installation was much more simple, please help me work this out.