Skip to content

Commit 48c73a8

Browse files
Define requirement to the twig bundle
1 parent f174955 commit 48c73a8

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

src/LiveComponent/composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@
2929
"php": ">=8.0",
3030
"symfony/property-access": "^5.4|^6.0",
3131
"symfony/serializer": "^5.4|^6.0",
32-
"symfony/ux-twig-component": "^2.5"
32+
"symfony/twig-bundle": "^5.4|^6.0",
33+
"symfony/ux-twig-component": "^2.5",
34+
"twig/twig": "^2.0|^3.0"
3335
},
3436
"require-dev": {
3537
"doctrine/annotations": "^1.0",
@@ -40,7 +42,6 @@
4042
"symfony/framework-bundle": "^5.4|^6.0",
4143
"symfony/phpunit-bridge": "^6.0",
4244
"symfony/security-csrf": "^5.4|^6.0",
43-
"symfony/twig-bundle": "^5.4|^6.0",
4445
"symfony/validator": "^5.4|^6.0",
4546
"zenstruck/browser": "^1.2.0",
4647
"zenstruck/foundry": "^1.10"

src/TwigComponent/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@
3030
"symfony/dependency-injection": "^5.4|^6.0",
3131
"symfony/event-dispatcher": "^5.4|^6.0",
3232
"symfony/property-access": "^5.4|^6.0",
33+
"symfony/twig-bundle": "^5.4|^6.0",
3334
"twig/twig": "^2.0|^3.0"
3435
},
3536
"require-dev": {
3637
"symfony/framework-bundle": "^5.4|^6.0",
37-
"symfony/phpunit-bridge": "^6.0",
38-
"symfony/twig-bundle": "^5.4|^6.0"
38+
"symfony/phpunit-bridge": "^6.0"
3939
},
4040
"conflict": {
4141
"symfony/config": "<5.4.0"

src/TwigComponent/src/DependencyInjection/TwigComponentExtension.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument;
1717
use Symfony\Component\DependencyInjection\ChildDefinition;
1818
use Symfony\Component\DependencyInjection\ContainerBuilder;
19-
use Symfony\Component\DependencyInjection\Exception\LogicException;
2019
use Symfony\Component\DependencyInjection\Extension\Extension;
2120
use Symfony\Component\DependencyInjection\Reference;
2221
use Symfony\UX\TwigComponent\Attribute\AsTwigComponent;
@@ -38,10 +37,6 @@ final class TwigComponentExtension extends Extension
3837
{
3938
public function load(array $configs, ContainerBuilder $container): void
4039
{
41-
if (!isset($container->getParameter('kernel.bundles')['TwigBundle'])) {
42-
throw new LogicException('The TwigBundle is not registered in your application. Try running "composer require symfony/twig-bundle".');
43-
}
44-
4540
$container->registerAttributeForAutoconfiguration(
4641
AsTwigComponent::class,
4742
static function (ChildDefinition $definition, AsTwigComponent $attribute) {

0 commit comments

Comments
 (0)