Skip to content

Commit d4b76ab

Browse files
committed
Merge branch '7.0' into 7.1
* 7.0: add the Workflow component install the AssetMapper recipe Update actions/checkout update ramsey/composer-install GitHub action to version 2 (#23)
2 parents 235f3e5 + 6e42d18 commit d4b76ab

File tree

8 files changed

+64
-4
lines changed

8 files changed

+64
-4
lines changed

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111

1212
steps:
1313
- name: Checkout code
14-
uses: actions/checkout@v2
14+
uses: actions/checkout@v4
1515

1616
- name: Set up PHP
1717
uses: shivammathur/setup-php@v2
@@ -20,7 +20,7 @@ jobs:
2020
coverage: none
2121

2222
- name: Download dependencies
23-
uses: ramsey/composer-install@v1
23+
uses: ramsey/composer-install@v2
2424

2525
- name: Run tests
2626
run: ./bin/console cache:warmup --env dev

.gitignore

+5-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,8 @@
2020
npm-debug.log
2121
yarn-error.log
2222
###< symfony/webpack-encore-bundle ###
23-
composer.lock
23+
composer.lock
24+
###> symfony/asset-mapper ###
25+
/public/assets/
26+
/assets/vendor/
27+
###< symfony/asset-mapper ###

composer.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"symfony/validator": "*",
4242
"symfony/web-link": "*",
4343
"symfony/webpack-encore-bundle": "^2.1",
44+
"symfony/workflow": "*",
4445
"symfony/yaml": "*",
4546
"twig/extra-bundle": "^3.0",
4647
"twig/twig": "^3.0"
@@ -85,7 +86,8 @@
8586
"scripts": {
8687
"auto-scripts": {
8788
"cache:clear": "symfony-cmd",
88-
"assets:install %PUBLIC_DIR%": "symfony-cmd"
89+
"assets:install %PUBLIC_DIR%": "symfony-cmd",
90+
"importmap:install": "symfony-cmd"
8991
},
9092
"post-install-cmd": [
9193
"@auto-scripts"

config/packages/asset_mapper.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
framework:
2+
asset_mapper:
3+
# The paths to make available to the asset mapper.
4+
paths:
5+
- assets/

config/packages/workflow.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
framework:
2+
workflows: null

importmap.php

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+
];

symfony.lock

+27
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,21 @@
125125
"symfony/asset": {
126126
"version": "v5.4.0"
127127
},
128+
"symfony/asset-mapper": {
129+
"version": "7.1",
130+
"recipe": {
131+
"repo": "github.com/symfony/recipes",
132+
"branch": "main",
133+
"version": "6.4",
134+
"ref": "6c28c471640cc2c6e60812ebcb961c526ef8997f"
135+
},
136+
"files": [
137+
"assets/app.js",
138+
"assets/styles/app.css",
139+
"config/packages/asset_mapper.yaml",
140+
"importmap.php"
141+
]
142+
},
128143
"symfony/browser-kit": {
129144
"version": "v5.4.0"
130145
},
@@ -559,6 +574,18 @@
559574
"webpack.config.js"
560575
]
561576
},
577+
"symfony/workflow": {
578+
"version": "5.4",
579+
"recipe": {
580+
"repo": "github.com/symfony/recipes",
581+
"branch": "main",
582+
"version": "3.3",
583+
"ref": "3b2f8ca32a07fcb00f899649053943fa3d8bbfb6"
584+
},
585+
"files": [
586+
"config/packages/workflow.yaml"
587+
]
588+
},
562589
"symfony/yaml": {
563590
"version": "v5.4.0"
564591
},

templates/base.html.twig

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
{% endblock %}
1111

1212
{% block javascripts %}
13+
{% block importmap %}{{ importmap('app') }}{% endblock %}
1314
{#{{ encore_entry_script_tags('app') }}#}
1415
{% endblock %}
1516
</head>

0 commit comments

Comments
 (0)