Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions extra/twig-extra-bundle/TwigExtraBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,17 @@

use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
use Symfony\Component\HttpKernel\Kernel;
use Twig\Extra\TwigExtraBundle\DependencyInjection\Compiler\MissingExtensionSuggestorPass;

if (!method_exists(ContainerBuilder::class, 'getAutoconfiguredAttributes')) {
$refMethod = new \ReflectionMethod(\Symfony\Component\HttpKernel\Bundle\Bundle::class, 'build');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be removed as this is unused.


if (Kernel::MAJOR_VERSION >= 8) {
class TwigExtraBundle extends Bundle
{
public function build(ContainerBuilder $container): void
{
parent::build($container);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be reverted

$container->addCompilerPass(new MissingExtensionSuggestorPass());
}
}
Expand All @@ -32,8 +34,8 @@ class TwigExtraBundle extends Bundle
public function build(ContainerBuilder $container)
{
parent::build($container);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be reverted

$container->addCompilerPass(new MissingExtensionSuggestorPass());
}
}
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be reverted