Doctrine ships with a number of command line tools that are very helpful
during development. You can call this command from the Composer binary
directory:

$ php vendor/bin/doctrine

You need to register your applications EntityManager to the console tool
to make use of the tasks by creating a cli-config.php file with the
following content:

On Doctrine 2.4 and above:

<?phpuseDoctrine\ORM\Tools\Console\ConsoleRunner;// replace with file to your own project bootstraprequire_once'bootstrap.php';// replace with mechanism to retrieve EntityManager in your app$entityManager=GetEntityManager();returnConsoleRunner::createHelperSet($entityManager);

On Doctrine 2.3 and below:

<?php// cli-config.phprequire_once'my_bootstrap.php';// Any way to access the EntityManager from your application$em=GetMyEntityManager();$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)));