Skip to content

Commit

Permalink
Merge pull request #575 from fabpot/optional-orm-dep
Browse files Browse the repository at this point in the history
Add a proper exception when Doctrine ORM is not installed
  • Loading branch information
kimhemsoe committed Oct 16, 2016
2 parents 74b408d + 25d3030 commit 4121db2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions DependencyInjection/DoctrineExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ public function load(array $configs, ContainerBuilder $container)
throw new \LogicException('Configuring the ORM layer requires to configure the DBAL layer as well.');
}

if (!class_exists('Doctrine\ORM\Version')) {
throw new \LogicException('To configure the ORM layer, you must first install the doctrine/orm package.');
}

$this->ormLoad($config['orm'], $container);
}

Expand Down

0 comments on commit 4121db2

Please sign in to comment.