Skip to content

Commit

Permalink
Defer RegisterPropelModelsPass
Browse files Browse the repository at this point in the history
The service 'cache.annotations', which is resolved when the metadata
reader is received from the container in the Pass, is not available
at that point in the container compilation process.

This changeset defers the PropelModelsPass until a point in time, where the
container is fully accessible.

Ref: symfony/symfony#19205
  • Loading branch information
cedricziel committed Jan 17, 2017
1 parent 2f19166 commit bf58e01
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion VichUploaderBundle.php
Expand Up @@ -2,6 +2,7 @@

namespace Vich\UploaderBundle;

use Symfony\Component\DependencyInjection\Compiler\PassConfig;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
use Vich\UploaderBundle\DependencyInjection\Compiler\RegisterPropelModelsPass;
Expand All @@ -20,6 +21,6 @@ public function build(ContainerBuilder $container)
{
parent::build($container);

$container->addCompilerPass(new RegisterPropelModelsPass());
$container->addCompilerPass(new RegisterPropelModelsPass(), PassConfig::TYPE_BEFORE_REMOVING);
}
}

0 comments on commit bf58e01

Please sign in to comment.