File tree Expand file tree Collapse file tree 10 files changed +47
-74
lines changed Expand file tree Collapse file tree 10 files changed +47
-74
lines changed Original file line number Diff line number Diff line change 6565 - name : Checkout
6666 uses : actions/checkout@v4
6767
68- - run : corepack enable
69-
7068 - name : Setup PHP
7169 uses : shivammathur/setup-php@v2
7270 with :
8179 working-directory : src/Turbo
8280 dependency-versions : ${{ matrix.dependency-version }}
8381
84- - name : Get yarn cache directory path
85- id : yarn-cache-dir-path
86- run : echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
87-
88- - uses : actions/cache@v4
89- id : yarn-cache
90- with :
91- path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
92- key : ${{ runner.os }}-yarn-${{ hashFiles('**/package.json') }}
93- restore-keys : |
94- ${{ runner.os }}-yarn-
95-
9682 - name : Install JavaScript dependencies
9783 working-directory : src/Turbo/tests/app
98- run : touch yarn.lock && yarn install --mode update-lockfile && yarn install
99-
100- - name : Build JavaScript
101- working-directory : src/Turbo/tests/app
102- run : yarn build
84+ run : php public/index.php importmap:install
10385
10486 - name : Create DB
10587 working-directory : src/Turbo/tests/app
Original file line number Diff line number Diff line change 55/composer.lock
66/phpunit.xml
77/vendor /
8- /tests /app /var
8+ /tests /app /assets /vendor /
9+ /tests /app /var /
910/tests /app /public /build /
1011node_modules /
11- package-lock.json
12- yarn.lock
Original file line number Diff line number Diff line change 4141 "doctrine/doctrine-bundle" : " ^2.4.3" ,
4242 "doctrine/orm" : " ^2.8 | 3.0" ,
4343 "phpstan/phpstan" : " ^1.10" ,
44+ "symfony/asset-mapper" : " ^6.4|^7.0" ,
4445 "symfony/debug-bundle" : " ^5.4|^6.0|^7.0" ,
4546 "symfony/form" : " ^5.4|^6.0|^7.0" ,
4647 "symfony/framework-bundle" : " ^5.4|^6.0|^7.0" ,
Original file line number Diff line number Diff line change @@ -67,10 +67,13 @@ protected function configureContainer(ContainerConfigurator $container): void
6767 {
6868 $ container ->extension ('framework ' , [
6969 'secret ' => 'ChangeMe ' ,
70- 'test ' => 'test ' === ( $ _SERVER [ ' APP_ENV ' ] ?? ' dev ' ) ,
70+ 'test ' => 'test ' === $ this -> environment ,
7171 'router ' => [
7272 'utf8 ' => true ,
7373 ],
74+ 'asset_mapper ' => [
75+ 'paths ' => ['assets/ ' ]
76+ ],
7477 'profiler ' => [
7578 'only_exceptions ' => false ,
7679 ],
Original file line number Diff line number Diff line change 1+ {
2+ "controllers" : {
3+ },
4+ "entrypoints" : []
5+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ /**
4+ * Returns the importmap for this application.
5+ *
6+ * - "path" is a path inside the asset mapper system. Use the
7+ * "debug:asset-map" command to see the full list of paths.
8+ *
9+ * - "entrypoint" (JavaScript only) set to true for any module that will
10+ * be used as an "entrypoint" (and passed to the importmap() Twig function).
11+ *
12+ * The "importmap:require" command can be used to add new entries to this file.
13+ */
14+ return [
15+ 'app ' => [
16+ 'path ' => './assets/app.js ' ,
17+ 'entrypoint ' => true ,
18+ ],
19+ '@hotwired/stimulus ' => [
20+ 'version ' => '3.2.2 ' ,
21+ ],
22+ '@symfony/stimulus-bundle ' => [
23+ 'path ' => '../../vendor/symfony/stimulus-bundle/assets/dist/loader.js ' ,
24+ ],
25+ '@symfony/ux-turbo/dist/turbo_stream_controller ' => [
26+ 'path ' => '../../assets/dist/turbo_stream_controller.js '
27+ ],
28+ '@hotwired/turbo ' => [
29+ 'version ' => '7.3.0 ' ,
30+ ],
31+ ];
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 44 <meta charset =" UTF-8" >
55 <title >Symfony UX Turbo</title >
66 {% block stylesheets %}{% endblock %}
7- {{ encore_entry_script_tags(' app' ) }}
7+ {% block javascripts %}
8+ {% block importmap %}{{ importmap(' app' ) }}{% endblock %}
9+ {% endblock %}
810 </head >
911 <body >
1012 <nav id =" navigation" >
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments