Skip to content

Commit

Permalink
Change phase when PopulateDebugCommandPass is executed
Browse files Browse the repository at this point in the history
Without this change autowiring for EventListenerInterface and
EventSubscriberInterface won't work - autowired services won't have
their arguments at that moment to be able to be constructed
  • Loading branch information
thatside-zaraffa committed Dec 6, 2017
1 parent cdd43be commit 5c3c9e0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/TacticianDomainEventBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
namespace BornFree\TacticianDomainEventBundle;

use BornFree\TacticianDomainEventBundle\DependencyInjection\Compiler\PopulateDebugCommandPass;
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
use Symfony\Component\HttpKernel\Bundle\Bundle;
use Symfony\Component\DependencyInjection\ContainerBuilder;

class TacticianDomainEventBundle extends Bundle
{
public function build(ContainerBuilder $container)
{
$container->addCompilerPass(new PopulateDebugCommandPass());
$container->addCompilerPass(new PopulateDebugCommandPass(), PassConfig::TYPE_OPTIMIZE);
}
}

0 comments on commit 5c3c9e0

Please sign in to comment.