Skip to content

Commit

Permalink
Merge branch '7.0' into 7.1
Browse files Browse the repository at this point in the history
* 7.0:
  add the Workflow component
  install the AssetMapper recipe
  Update actions/checkout
  update ramsey/composer-install GitHub action to version 2 (#23)
  • Loading branch information
xabbuh committed Apr 21, 2024
2 parents 235f3e5 + 6e42d18 commit d4b76ab
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up PHP
uses: shivammathur/setup-php@v2
Expand All @@ -20,7 +20,7 @@ jobs:
coverage: none

- name: Download dependencies
uses: ramsey/composer-install@v1
uses: ramsey/composer-install@v2

- name: Run tests
run: ./bin/console cache:warmup --env dev
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,8 @@
npm-debug.log
yarn-error.log
###< symfony/webpack-encore-bundle ###
composer.lock
composer.lock
###> symfony/asset-mapper ###
/public/assets/
/assets/vendor/
###< symfony/asset-mapper ###
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"symfony/validator": "*",
"symfony/web-link": "*",
"symfony/webpack-encore-bundle": "^2.1",
"symfony/workflow": "*",
"symfony/yaml": "*",
"twig/extra-bundle": "^3.0",
"twig/twig": "^3.0"
Expand Down Expand Up @@ -85,7 +86,8 @@
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
"assets:install %PUBLIC_DIR%": "symfony-cmd",
"importmap:install": "symfony-cmd"
},
"post-install-cmd": [
"@auto-scripts"
Expand Down
5 changes: 5 additions & 0 deletions config/packages/asset_mapper.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
framework:
asset_mapper:
# The paths to make available to the asset mapper.
paths:
- assets/
2 changes: 2 additions & 0 deletions config/packages/workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
framework:
workflows: null
19 changes: 19 additions & 0 deletions importmap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

/**
* Returns the importmap for this application.
*
* - "path" is a path inside the asset mapper system. Use the
* "debug:asset-map" command to see the full list of paths.
*
* - "entrypoint" (JavaScript only) set to true for any module that will
* be used as an "entrypoint" (and passed to the importmap() Twig function).
*
* The "importmap:require" command can be used to add new entries to this file.
*/
return [
'app' => [
'path' => './assets/app.js',
'entrypoint' => true,
],
];
27 changes: 27 additions & 0 deletions symfony.lock
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,21 @@
"symfony/asset": {
"version": "v5.4.0"
},
"symfony/asset-mapper": {
"version": "7.1",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
"version": "6.4",
"ref": "6c28c471640cc2c6e60812ebcb961c526ef8997f"
},
"files": [
"assets/app.js",
"assets/styles/app.css",
"config/packages/asset_mapper.yaml",
"importmap.php"
]
},
"symfony/browser-kit": {
"version": "v5.4.0"
},
Expand Down Expand Up @@ -559,6 +574,18 @@
"webpack.config.js"
]
},
"symfony/workflow": {
"version": "5.4",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
"version": "3.3",
"ref": "3b2f8ca32a07fcb00f899649053943fa3d8bbfb6"
},
"files": [
"config/packages/workflow.yaml"
]
},
"symfony/yaml": {
"version": "v5.4.0"
},
Expand Down
1 change: 1 addition & 0 deletions templates/base.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
{% endblock %}

{% block javascripts %}
{% block importmap %}{{ importmap('app') }}{% endblock %}
{#{{ encore_entry_script_tags('app') }}#}
{% endblock %}
</head>
Expand Down

0 comments on commit d4b76ab

Please sign in to comment.