DDC-502, DDC-507 - Changes to how Annotation Metadata Driver is handled in SchemaTool Command, Specifiying Mapping paths is now required for this to work.
This commit is contained in:
parent
5d329d7e2c
commit
b2fe3820fc
@ -27,7 +27,8 @@ use Symfony\Components\Console\Input\InputArgument,
|
|||||||
Symfony\Components\Console\Output\OutputInterface,
|
Symfony\Components\Console\Output\OutputInterface,
|
||||||
Symfony\Components\Console\Command\Command,
|
Symfony\Components\Console\Command\Command,
|
||||||
Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper,
|
Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper,
|
||||||
Doctrine\ORM\Tools\SchemaTool;
|
Doctrine\ORM\Tools\SchemaTool,
|
||||||
|
Doctrine\ORM\Mapping\Driver\AbstractFileDriver;
|
||||||
|
|
||||||
abstract class AbstractCommand extends Command
|
abstract class AbstractCommand extends Command
|
||||||
{
|
{
|
||||||
@ -51,7 +52,11 @@ abstract class AbstractCommand extends Command
|
|||||||
|
|
||||||
$reader = new \Doctrine\ORM\Tools\ClassMetadataReader();
|
$reader = new \Doctrine\ORM\Tools\ClassMetadataReader();
|
||||||
$reader->setEntityManager($em);
|
$reader->setEntityManager($em);
|
||||||
$reader->addMappingSource($em->getConfiguration()->getMetadataDriverImpl());
|
|
||||||
|
$metadataDriver = $em->getConfiguration()->getMetadataDriverImpl();
|
||||||
|
if ($metadataDriver instanceof AbstractFileDriver) {
|
||||||
|
$reader->addMappingSource($metadataDriver);
|
||||||
|
}
|
||||||
|
|
||||||
// Process source directories
|
// Process source directories
|
||||||
if ($emHelper->hasAdditionalMappingPathInformation()) {
|
if ($emHelper->hasAdditionalMappingPathInformation()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user