From b0b0323a3314067ea905343899e81fd3c0cdc5fd Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Thu, 21 Dec 2023 12:23:57 +0100 Subject: [PATCH 1/4] update ramsey/composer-install GitHub action to version 2 (#23) --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c9e64c4..106ab8e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 From aa0aeabc53cc7585fd0761364c9a32badb15bfb4 Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Thu, 21 Dec 2023 12:27:17 +0100 Subject: [PATCH 2/4] Update actions/checkout --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 106ab8e..025a76b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 From c1acc035152a990b58af5d1fac57b2e56dc08dc4 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Tue, 12 Mar 2024 09:27:14 +0100 Subject: [PATCH 3/4] install the AssetMapper recipe --- .gitignore | 6 +++++- composer.json | 3 ++- config/packages/asset_mapper.yaml | 5 +++++ importmap.php | 19 ++++++++++++++++ symfony.lock | 36 +++++++++++++------------------ templates/base.html.twig | 1 + 6 files changed, 47 insertions(+), 23 deletions(-) create mode 100644 config/packages/asset_mapper.yaml create mode 100644 importmap.php diff --git a/.gitignore b/.gitignore index 6a7987a..7c04f2c 100644 --- a/.gitignore +++ b/.gitignore @@ -20,4 +20,8 @@ npm-debug.log yarn-error.log ###< symfony/webpack-encore-bundle ### -composer.lock \ No newline at end of file +composer.lock +###> symfony/asset-mapper ### +/public/assets/ +/assets/vendor/ +###< symfony/asset-mapper ### diff --git a/composer.json b/composer.json index d51ed8e..e4a1688 100644 --- a/composer.json +++ b/composer.json @@ -86,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" diff --git a/config/packages/asset_mapper.yaml b/config/packages/asset_mapper.yaml new file mode 100644 index 0000000..d1ac653 --- /dev/null +++ b/config/packages/asset_mapper.yaml @@ -0,0 +1,5 @@ +framework: + asset_mapper: + # The paths to make available to the asset mapper. + paths: + - assets/ diff --git a/importmap.php b/importmap.php new file mode 100644 index 0000000..70ebf14 --- /dev/null +++ b/importmap.php @@ -0,0 +1,19 @@ + [ + 'path' => './assets/app.js', + 'entrypoint' => true, + ], +]; diff --git a/symfony.lock b/symfony.lock index 0d535c5..059d424 100644 --- a/symfony.lock +++ b/symfony.lock @@ -119,9 +119,6 @@ "psr/event-dispatcher": { "version": "1.0.0" }, - "psr/event-dispatcher": { - "version": "1.0.0" - }, "psr/link": { "version": "1.1.1" }, @@ -146,6 +143,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" }, @@ -282,18 +294,6 @@ "config/packages/lock.yaml" ] }, - "symfony/lock": { - "version": "6.0", - "recipe": { - "repo": "github.com/symfony/recipes", - "branch": "master", - "version": "5.2", - "ref": "a1c8800e40ae735206bb14586fdd6c4630a51b8d" - }, - "files": [ - "config/packages/lock.yaml" - ] - }, "symfony/mailer": { "version": "5.4", "recipe": { @@ -435,9 +435,6 @@ "symfony/proxy-manager-bridge": { "version": "v5.4.0" }, - "symfony/rate-limiter": { - "version": "v5.4.0" - }, "symfony/rate-limiter": { "version": "v6.0.0" }, @@ -525,9 +522,6 @@ "templates/base.html.twig" ] }, - "symfony/uid": { - "version": "v5.4.0" - }, "symfony/uid": { "version": "v6.0.0" }, diff --git a/templates/base.html.twig b/templates/base.html.twig index 16d7273..eb686a8 100644 --- a/templates/base.html.twig +++ b/templates/base.html.twig @@ -10,6 +10,7 @@ {% endblock %} {% block javascripts %} + {% block importmap %}{{ importmap('app') }}{% endblock %} {#{{ encore_entry_script_tags('app') }}#} {% endblock %} From ea421dab68e817b5f36d6dad852801f0857c9bdd Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 19 Apr 2024 16:17:13 +0200 Subject: [PATCH 4/4] add the Workflow component --- composer.json | 1 + config/packages/workflow.yaml | 2 ++ symfony.lock | 12 ++++++++++++ 3 files changed, 15 insertions(+) create mode 100644 config/packages/workflow.yaml diff --git a/composer.json b/composer.json index b23fef5..2e55d97 100644 --- a/composer.json +++ b/composer.json @@ -40,6 +40,7 @@ "symfony/validator": "5.4.*", "symfony/web-link": "5.4.*", "symfony/webpack-encore-bundle": "^1.11", + "symfony/workflow": "5.4.*", "symfony/yaml": "5.4.*", "twig/extra-bundle": "^3.0", "twig/twig": "^3.0" diff --git a/config/packages/workflow.yaml b/config/packages/workflow.yaml new file mode 100644 index 0000000..855df59 --- /dev/null +++ b/config/packages/workflow.yaml @@ -0,0 +1,2 @@ +framework: + workflows: null diff --git a/symfony.lock b/symfony.lock index 0356875..e329072 100644 --- a/symfony.lock +++ b/symfony.lock @@ -571,6 +571,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" },