File tree Expand file tree Collapse file tree 11 files changed +51
-78
lines changed Expand file tree Collapse file tree 11 files changed +51
-78
lines changed Original file line number Diff line number Diff line change 65
65
- name : Checkout
66
66
uses : actions/checkout@v4
67
67
68
- - run : corepack enable
69
-
70
68
- name : Setup PHP
71
69
uses : shivammathur/setup-php@v2
72
70
with :
81
79
working-directory : src/Turbo
82
80
dependency-versions : ${{ matrix.dependency-version }}
83
81
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
-
96
82
- name : Install JavaScript dependencies
97
83
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
103
85
104
86
- name : Create DB
105
87
working-directory : src/Turbo/tests/app
Original file line number Diff line number Diff line change 5
5
/composer.lock
6
6
/phpunit.xml
7
7
/vendor /
8
- /tests /app /var
8
+ /tests /app /assets /vendor /
9
+ /tests /app /var /
9
10
/tests /app /public /build /
10
11
node_modules /
11
- package-lock.json
12
- yarn.lock
Original file line number Diff line number Diff line change 41
41
"doctrine/doctrine-bundle" : " ^2.4.3" ,
42
42
"doctrine/orm" : " ^2.8 | 3.0" ,
43
43
"phpstan/phpstan" : " ^1.10" ,
44
+ "symfony/asset-mapper" : " ^6.4|^7.0" ,
44
45
"symfony/debug-bundle" : " ^5.4|^6.0|^7.0" ,
45
46
"symfony/form" : " ^5.4|^6.0|^7.0" ,
46
- "symfony/framework-bundle" : " ^5.4|^6.0 |^7.0" ,
47
+ "symfony/framework-bundle" : " ^6.4 |^7.0" ,
47
48
"symfony/mercure-bundle" : " ^0.3.7" ,
48
49
"symfony/messenger" : " ^5.4|^6.0|^7.0" ,
49
- "symfony/panther" : " ^1.0|^2.0 " ,
50
+ "symfony/panther" : " ^2.1 " ,
50
51
"symfony/phpunit-bridge" : " ^5.4|^6.0|^7.0" ,
51
52
"symfony/process" : " ^5.4|6.3.*|^7.0" ,
52
53
"symfony/property-access" : " ^5.4|^6.0|^7.0" ,
Original file line number Diff line number Diff line change @@ -26,8 +26,8 @@ class BroadcastTest extends PantherTestCase
26
26
27
27
protected function setUp (): void
28
28
{
29
- if (!file_exists (__DIR__ .'/app/public/build ' )) {
30
- throw new \Exception (\sprintf ('Move into "%s" and execute Encore before running this test. ' , realpath (__DIR__ .'/app ' )));
29
+ if (!file_exists (__DIR__ .'/app/assets/vendor/installed.php ' )) {
30
+ throw new \Exception (\sprintf ('Move into "%s" and execute `php public/index.php importmap:install` before running this test. ' , realpath (__DIR__ .'/app ' )));
31
31
}
32
32
33
33
parent ::setUp ();
Original file line number Diff line number Diff line change @@ -67,10 +67,13 @@ protected function configureContainer(ContainerConfigurator $container): void
67
67
{
68
68
$ container ->extension ('framework ' , [
69
69
'secret ' => 'ChangeMe ' ,
70
- 'test ' => 'test ' === ( $ _SERVER [ ' APP_ENV ' ] ?? ' dev ' ) ,
70
+ 'test ' => 'test ' === $ this -> environment ,
71
71
'router ' => [
72
72
'utf8 ' => true ,
73
73
],
74
+ 'asset_mapper ' => [
75
+ 'paths ' => ['assets/ ' ]
76
+ ],
74
77
'profiler ' => [
75
78
'only_exceptions ' => false ,
76
79
],
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 4
4
<meta charset =" UTF-8" >
5
5
<title >Symfony UX Turbo</title >
6
6
{% block stylesheets %}{% endblock %}
7
- {{ encore_entry_script_tags(' app' ) }}
7
+ {% block javascripts %}
8
+ {% block importmap %}{{ importmap(' app' ) }}{% endblock %}
9
+ {% endblock %}
8
10
</head >
9
11
<body >
10
12
<nav id =" navigation" >
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments