File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
src/TwigComponent/src/DependencyInjection Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -108,7 +108,6 @@ jobs:
108
108
- uses : shivammathur/setup-php@v2
109
109
with :
110
110
php-version : ' 8.0'
111
- - run : php .github/build-packages.php
112
111
113
112
- name : TwigComponent Dependencies
114
113
uses : ramsey/composer-install@v2
Original file line number Diff line number Diff line change 16
16
use Symfony \Component \DependencyInjection \Argument \TaggedIteratorArgument ;
17
17
use Symfony \Component \DependencyInjection \ChildDefinition ;
18
18
use Symfony \Component \DependencyInjection \ContainerBuilder ;
19
+ use Symfony \Component \DependencyInjection \Exception \LogicException ;
19
20
use Symfony \Component \DependencyInjection \Extension \Extension ;
20
21
use Symfony \Component \DependencyInjection \Reference ;
21
22
use Symfony \UX \TwigComponent \Attribute \AsTwigComponent ;
@@ -36,6 +37,10 @@ final class TwigComponentExtension extends Extension
36
37
{
37
38
public function load (array $ configs , ContainerBuilder $ container ): void
38
39
{
40
+ if (!isset ($ container ->getParameter ('kernel.bundles ' )['TwigBundle ' ])) {
41
+ throw new LogicException ('The TwigBundle is not registered in your application. Try running "composer require symfony/twig-bundle". ' );
42
+ }
43
+
39
44
$ container ->registerAttributeForAutoconfiguration (
40
45
AsTwigComponent::class,
41
46
static function (ChildDefinition $ definition , AsTwigComponent $ attribute ) {
You can’t perform that action at this time.
0 commit comments