Skip to content

Commit 9f5768d

Browse files
committed
do not have a fatal error if doctrine bridge is too old
1 parent 973ad2c commit 9f5768d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

FOSUserBundle.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ public function build(ContainerBuilder $container)
2828
parent::build($container);
2929
$container->addCompilerPass(new ValidationPass());
3030

31+
if (! class_exists('Symfony\Bridge\Doctrine\DependencyInjection\CompilerPass\RegisterMappingsPass')) {
32+
// TODO: provide a temporary implementation of the compiler pass in FOSUserBundle
33+
// so people can already use the Model class even with older symfony?
34+
return;
35+
}
36+
3137
$mappings = array(
3238
realpath(__DIR__.'/Resources/config/doctrine/model') => 'FOS\UserBundle\Model',
3339
);

0 commit comments

Comments
 (0)