Skip to content

Commit

Permalink
Merge pull request #4 from fyrye/patch-2
Browse files Browse the repository at this point in the history
Fix Missing Service Definitions
  • Loading branch information
nicklog authored Sep 10, 2020
2 parents aec1a1d + bd5f2a3 commit 599c379
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/DependencyInjection/Compiler/EventHandlerCompiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace Shapecode\Bundle\TwigTemplateEventBundle\DependencyInjection\Compiler;

use Shapecode\Bundle\TwigTemplateEventBundle\Manager\HandlerManagerInterface;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
Expand All @@ -15,7 +16,7 @@ final class EventHandlerCompiler implements CompilerPassInterface
*/
public function process(ContainerBuilder $container): void
{
$manager = $container->getDefinition('shapecode_twig_template_event.handler_manager');
$manager = $container->findDefinition(HandlerManagerInterface::class);
$tags = $container->findTaggedServiceIds('shapecode_twig_template_event.handler');

foreach ($tags as $id => $config) {
Expand Down
6 changes: 6 additions & 0 deletions src/Resources/config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ services:
Shapecode\Bundle\TwigTemplateEventBundle\Services\EventService: ~
Shapecode\Bundle\TwigTemplateEventBundle\Twig\EventExtension: ~
Shapecode\Bundle\TwigTemplateEventBundle\Manager\HandlerManager: ~

# aliases
Shapecode\Bundle\TwigTemplateEventBundle\Manager\HandlerManagerInterface:
alias: Shapecode\Bundle\TwigTemplateEventBundle\Manager\HandlerManager
Shapecode\Bundle\TwigTemplateEventBundle\Services\EventServiceInterface:
alias: Shapecode\Bundle\TwigTemplateEventBundle\Services\EventService

# handler
Shapecode\Bundle\TwigTemplateEventBundle\Event\Handler\IncludeHandler:
Expand Down

0 comments on commit 599c379

Please sign in to comment.