File tree 6 files changed +22
-7
lines changed
6 files changed +22
-7
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:
@@ -101,6 +107,8 @@ jobs:
101
107
102
108
- name: Run tests
103
109
working-directory: src/Turbo
104
- run: vendor/bin/simple-phpunit
110
+ run: |
111
+ [ 'lowest' = '${{ matrix.dependency-version }}' ] && export SYMFONY_DEPRECATIONS_HELPER=weak
112
+ vendor/bin/simple-phpunit
105
113
env:
106
114
SYMFONY_DEPRECATIONS_HELPER: 'max[self]=1'
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();
@@ -120,6 +122,11 @@ protected function configureContainer(ContainerConfigurator $container): void
120
122
],
121
123
],
122
124
]);
125
+
126
+ $container->extension('twig_component', [
127
+ 'anonymous_template_directory' => 'components/',
128
+ 'defaults' => ['App\Twig\Components\\' => 'components/'],
129
+ ]);
123
130
}
124
131
125
132
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