Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix RepositoryGenerator

  • Loading branch information...
commit 4df2055b63eab05fcd2b010817ede4c59dd02f98 1 parent b911b63
@golovanov authored
View
4 Command/DoctrineOXMCommand.php
@@ -58,9 +58,7 @@ protected function getBundleMetadatas(Bundle $bundle)
$bundleMetadatas = array();
$xmlEntityManagers = $this->getDoctrineXmlEntityManagers();
foreach ($xmlEntityManagers as $key => $xem) {
- $cmf = new DisconnectedClassMetadataFactory();
- $cmf->setXmlEntityManager($xem);
- $cmf->setConfiguration($xem->getConfiguration());
+ $cmf = new DisconnectedClassMetadataFactory($xem->getConfiguration(), $xem->getEventManager());
$metadatas = $cmf->getAllMetadata();
foreach ($metadatas as $metadata) {
if (strpos($metadata->name, $namespace) === 0) {
View
4 Command/GenerateRepositoriesDoctrineOXMCommand.php
@@ -22,7 +22,7 @@ protected function configure()
->setName('doctrine:oxm:generate:repositories')
->setDescription('Generate repository classes from your mapping information.')
->addArgument('bundle', InputArgument::REQUIRED, 'The bundle to initialize the repositories in.')
- ->addOption('xm-entity', null, InputOption::VALUE_OPTIONAL, 'The xml-entity class to generate the repository for (shortname without namespace).')
+ ->addOption('xml-entity', null, InputOption::VALUE_OPTIONAL, 'The xml-entity class to generate the repository for (shortname without namespace).')
->setHelp(<<<EOT
The <info>doctrine:oxm:generate:repositories</info> command generates the configured dxml-entity repository classes from your mapping information:
@@ -43,7 +43,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$generator = new XmlEntityRepositoryGenerator();
foreach ($metadatas as $metadata) {
- if ($filterDocument && $filterXmlEntity !== $metadata->reflClass->getShortname()) {
+ if ($filterXmlEntity && $filterXmlEntity !== $metadata->reflClass->getShortname()) {
continue;
}
Please sign in to comment.
Something went wrong with that request. Please try again.