File tree 6 files changed +22
-6
lines changed
6 files changed +22
-6
lines changed Original file line number Diff line number Diff line change 8
8
paths :
9
9
- ' src/Turbo/**'
10
10
11
+ env :
12
+ SYMFONY_REQUIRE : ' >=5.4'
13
+
11
14
jobs :
12
15
phpstan :
13
16
runs-on : ubuntu-latest
@@ -38,11 +41,11 @@ jobs:
38
41
strategy :
39
42
fail-fast : false
40
43
matrix :
41
- php-version : ['8.1', '8.3 ']
44
+ php-version : ['8.1', '8.4 ']
42
45
include :
43
46
- php-version : ' 8.1'
44
47
dependency-version : ' lowest'
45
- - php-version : ' 8.3 '
48
+ - php-version : ' 8.4 '
46
49
dependency-version : ' highest'
47
50
48
51
services :
69
72
with :
70
73
php-version : ${{ matrix.php-version }}
71
74
75
+ - name : Install symfony/flex
76
+ run : composer global config allow-plugins.symfony/flex true && composer global require symfony/flex
77
+
72
78
- name : Install Turbo packages
73
79
uses : ramsey/composer-install@v3
74
80
with :
Original file line number Diff line number Diff line change 52
52
"symfony/property-access" : " ^5.4|^6.0|^7.0" ,
53
53
"symfony/security-core" : " ^5.4|^6.0|^7.0" ,
54
54
"symfony/stopwatch" : " ^5.4|^6.0|^7.0" ,
55
- "symfony/ux-twig-component" : " ^2.0 " ,
55
+ "symfony/ux-twig-component" : " ^2.13 " ,
56
56
"symfony/twig-bundle" : " ^5.4|^6.0|^7.0" ,
57
57
"symfony/web-profiler-bundle" : " ^5.4|^6.0|^7.0" ,
58
58
"symfony/webpack-encore-bundle" : " ^2.1.1" ,
Original file line number Diff line number Diff line change 38
38
use Symfony \Component \Routing \Loader \Configurator \RoutingConfigurator ;
39
39
use Symfony \UX \StimulusBundle \StimulusBundle ;
40
40
use Symfony \UX \Turbo \TurboBundle ;
41
+ use Symfony \UX \TwigComponent \TwigComponentBundle ;
41
42
use Symfony \WebpackEncoreBundle \WebpackEncoreBundle ;
42
43
use Twig \Environment ;
43
44
@@ -54,6 +55,7 @@ public function registerBundles(): iterable
54
55
yield new DoctrineBundle ();
55
56
yield new TwigBundle ();
56
57
yield new MercureBundle ();
58
+ yield new TwigComponentBundle ();
57
59
yield new TurboBundle ();
58
60
yield new WebpackEncoreBundle ();
59
61
yield new StimulusBundle ();
@@ -72,6 +74,9 @@ protected function configureContainer(ContainerConfigurator $container): void
72
74
'profiler ' => [
73
75
'only_exceptions ' => false ,
74
76
],
77
+ 'messenger ' => [
78
+ 'reset_on_message ' => true ,
79
+ ],
75
80
]);
76
81
77
82
$ doctrineConfig = [
@@ -120,6 +125,11 @@ protected function configureContainer(ContainerConfigurator $container): void
120
125
],
121
126
],
122
127
]);
128
+
129
+ $ container ->extension ('twig_component ' , [
130
+ 'anonymous_template_directory ' => 'components/ ' ,
131
+ 'defaults ' => ['App\Twig\Components \\' => 'components/ ' ],
132
+ ]);
123
133
}
124
134
125
135
protected function configureRoutes (RoutingConfigurator $ routes ): void
Original file line number Diff line number Diff line change 1
1
{% block create %}
2
2
<twig:Turbo:Stream:Append target =" #artists" >
3
- <div id =" {{ ' artist_ ' ~ id }}" ><a href =" {{ path(' artist' , {id : id }) }}" >{{ entity .name }} (#{{ id }})</a ></div >
3
+ <div id =" artist_{{ id }}" ><a href =" {{ path(' artist' , {id : id }) }}" >{{ entity .name }} (#{{ id }})</a ></div >
4
4
</twig:Turbo:Stream:Append >
5
5
{% endblock %}
6
6
Original file line number Diff line number Diff line change 1
1
{% block create %}
2
2
<twig:Turbo:Stream:Append target =" #books" >
3
- <div id =" {{ ' book_ ' ~ id }}" >{{ entity .title }} (#{{ id }})</div >
3
+ <div id =" book_{{ id }}" >{{ entity .title }} (#{{ id }})</div >
4
4
</twig:Turbo:Stream:Append >
5
5
{% endblock %}
6
6
Original file line number Diff line number Diff line change 1
1
{% block create %}
2
2
<twig:Turbo:Stream:Append target =" #songs" >
3
- <div id =" {{ ' song_ ' ~ id }}" >{{ entity .title }} (#{{ id }}){% if entity .artist %} by {{ entity .artist .name }} (#{{ entity .artist .id }}){% endif %}</div >
3
+ <div id =" song_{{ id }}" >{{ entity .title }} (#{{ id }}){% if entity .artist %} by {{ entity .artist .name }} (#{{ entity .artist .id }}){% endif %}</div >
4
4
</twig:Turbo:Stream:Append >
5
5
{% endblock %}
6
6
You can’t perform that action at this time.
0 commit comments