File tree Expand file tree Collapse file tree 6 files changed +22
-7
lines changed Expand file tree Collapse file tree 6 files changed +22
-7
lines changed Original file line number Diff line number Diff line change 88 paths:
99 - 'src/Turbo/**'
1010
11+ env:
12+ SYMFONY_REQUIRE: '>=5.4'
13+
1114jobs:
1215 phpstan:
1316 runs-on: ubuntu-latest
@@ -38,11 +41,11 @@ jobs:
3841 strategy:
3942 fail-fast: false
4043 matrix:
41- php-version: ['8.1', '8.3 ']
44+ php-version: ['8.1', '8.4 ']
4245 include:
4346 - php-version: '8.1'
4447 dependency-version: 'lowest'
45- - php-version: '8.3 '
48+ - php-version: '8.4 '
4649 dependency-version: 'highest'
4750
4851 services:
6972 with:
7073 php-version: ${{ matrix.php-version }}
7174
75+ - name: Install symfony/flex
76+ run: composer global config allow-plugins.symfony/flex true && composer global require symfony/flex
77+
7278 - name: Install Turbo packages
7379 uses: ramsey/composer-install@v3
7480 with:
@@ -101,6 +107,8 @@ jobs:
101107
102108 - name: Run tests
103109 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
105113 env:
106114 SYMFONY_DEPRECATIONS_HELPER: 'max[self]=1'
Original file line number Diff line number Diff line change 5252 "symfony/property-access": "^5.4|^6.0|^7.0",
5353 "symfony/security-core": "^5.4|^6.0|^7.0",
5454 "symfony/stopwatch": "^5.4|^6.0|^7.0",
55- "symfony/ux-twig-component": "^2.0 ",
55+ "symfony/ux-twig-component": "^2.13 ",
5656 "symfony/twig-bundle": "^5.4|^6.0|^7.0",
5757 "symfony/web-profiler-bundle": "^5.4|^6.0|^7.0",
5858 "symfony/webpack-encore-bundle": "^2.1.1",
Original file line number Diff line number Diff line change 3838use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
3939use Symfony\UX\StimulusBundle\StimulusBundle;
4040use Symfony\UX\Turbo\TurboBundle;
41+ use Symfony\UX\TwigComponent\TwigComponentBundle;
4142use Symfony\WebpackEncoreBundle\WebpackEncoreBundle;
4243use Twig\Environment;
4344
@@ -54,6 +55,7 @@ public function registerBundles(): iterable
5455 yield new DoctrineBundle();
5556 yield new TwigBundle();
5657 yield new MercureBundle();
58+ yield new TwigComponentBundle();
5759 yield new TurboBundle();
5860 yield new WebpackEncoreBundle();
5961 yield new StimulusBundle();
@@ -120,6 +122,11 @@ protected function configureContainer(ContainerConfigurator $container): void
120122 ],
121123 ],
122124 ]);
125+
126+ $container->extension('twig_component', [
127+ 'anonymous_template_directory' => 'components/',
128+ 'defaults' => ['App\Twig\Components\\' => 'components/'],
129+ ]);
123130 }
124131
125132 protected function configureRoutes(RoutingConfigurator $routes): void
Original file line number Diff line number Diff line change 11{% block create %}
22 <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>
44 </twig:Turbo:Stream:Append>
55{% endblock %}
66
Original file line number Diff line number Diff line change 11{% block create %}
22 <twig:Turbo:Stream:Append target="#books">
3- <div id="{{ 'book_' ~ id }}">{{ entity.title }} (#{{ id }})</div>
3+ <div id="book_{{ id }}">{{ entity.title }} (#{{ id }})</div>
44 </twig:Turbo:Stream:Append>
55{% endblock %}
66
Original file line number Diff line number Diff line change 11{% block create %}
22 <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>
44 </twig:Turbo:Stream:Append>
55{% endblock %}
66
You can’t perform that action at this time.
0 commit comments