Skip to content

Commit

Permalink
Fix importing debug services
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubtobiasz committed Feb 8, 2024
1 parent c95ef0c commit a77600e
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 87 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Symfony\Component\DependencyInjection\Loader\Configurator;

use Sylius\TwigHooks\DependencyInjection\CompilerPass\UnregisterDebugServicesPass;
use Sylius\TwigHooks\Hook\Renderer\Debug\HookDebugCommentRenderer;
use Sylius\TwigHooks\Hook\Renderer\Debug\HookProfilerRenderer;
use Sylius\TwigHooks\Hookable\Renderer\Debug\HookableDebugCommentRenderer;
Expand All @@ -13,7 +12,6 @@

return static function (ContainerBuilder $container, ContainerConfigurator $configurator): void {
$services = $configurator->services();
$services->defaults()->tag(UnregisterDebugServicesPass::DEBUG_TAG);

$services->set('twig_hooks.renderer.hook.debug_comment', HookDebugCommentRenderer::class)
->decorate('twig_hooks.renderer.hook', priority: 256)
Expand Down

This file was deleted.

4 changes: 4 additions & 0 deletions src/TwigHooks/src/DependencyInjection/TwigHooksExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ public function load(array $configs, ContainerBuilder $container): void
$loader = new PhpFileLoader($container, new FileLocator(dirname(__DIR__, 2) . '/config'));
$loader->load('services.php');

if ($container->getParameter('kernel.debug')) {
$loader->load('services/debug/twig_events.php');
}

$configuration = $this->getConfiguration([], $container);
if ($configuration === null) {
return;
Expand Down
7 changes: 0 additions & 7 deletions src/TwigHooks/src/TwigHooksBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,10 @@

namespace Sylius\TwigHooks;

use Sylius\TwigHooks\DependencyInjection\CompilerPass\UnregisterDebugServicesPass;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;

final class TwigHooksBundle extends Bundle
{
public function build(ContainerBuilder $container): void
{
$container->addCompilerPass(new UnregisterDebugServicesPass());
}

public function getPath(): string
{
return \dirname(__DIR__);
Expand Down

This file was deleted.

0 comments on commit a77600e

Please sign in to comment.