Reputation: 49533
I am trying to make Doctrine 2 work. But on the documentation page about the CLI tool, it's including something in Symfony...
$helperSet = new \Symfony\Component\Console\Helper\HelperSet(array(
'db' => new \Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper($em->getConnection()),
'em' => new \Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper($em)
));
What * * is that ? Why do you need Symfony to make Doctrine work ?
It seems completely odd to me, but I can't make my mind to download Symfony just for the missing class... Can you help me ?
Upvotes: 3
Views: 1046
Reputation: 3740
If you download the latest Doctrine tar.gz file, the Symfony Console comes prepackaged with it. No need to do a separate download. You'll find a folder named Symfony in the Doctrine folder. It has the Console and Yaml components.
Upvotes: 2
Reputation: 62874
The doctrine console stuff uses some Symfony Components (which are standalone libraries, packaged separately from the full framework).
So it's nothing strange -- the doctrine team just avoided reinventing a perfectly good wheel.
Upvotes: 11
Reputation: 932
Installing the DoctrineSymfonyConsole will probably fix it:
pear install doctrine/DoctrineSymfonyConsole
If you installed Doctrine from pear, you probably had errors that were handled gracefully. try installing all dependencies:
pear install -af doctrine/DoctrineORM
Make sure there are no problems. If there are missing packages, it should warn you and you'll want to install those. I've had issues in the past where -a (all dependencies) didn't error if there was a problem installing a dependency, and the install halted even though it reported success.
http://pear.doctrine-project.org/
Upvotes: 3