schranz-php-recipes / symfony-recipes-php

Provides https://github.com/symfony/recipes as PHP instead of YAML configs.
MIT License
13 stars 3 forks source link

Update recipes 2024-02-01 #77

Closed symfony-php-recipes-bot closed 9 months ago

symfony-php-recipes-bot commented 9 months ago
Q A
License MIT

The Symfony Recipes changed with version . This PR contains the new definition for recipes.

github-actions[bot] commented 9 months ago

Thanks for the PR 😍

How to test these changes in your application

  1. Define the SYMFONY_ENDPOINT environment variable:

    # On Unix-like (BSD, Linux and macOS)
    export SYMFONY_ENDPOINT=https://raw.githubusercontent.com/schranz-php-recipes/symfony-recipes-php/flex/pull-77/index.json
    # On Windows
    SET SYMFONY_ENDPOINT=https://raw.githubusercontent.com/schranz-php-recipes/symfony-recipes-php/flex/pull-77/index.json
  2. Install the package(s) related to this recipe:

    composer req 'symfony/flex:^1.16'
    composer req 'symfony/asset-mapper:^6.4' 'symfony/smsapi-notifier:^5.2'
  3. Don't forget to unset the SYMFONY_ENDPOINT environment variable when done:

    # On Unix-like (BSD, Linux and macOS)
    unset SYMFONY_ENDPOINT
    # On Windows
    SET SYMFONY_ENDPOINT=

Diff between recipe versions

In order to help with the review stage, I'm in charge of computing the diff between the various versions of patched recipes. I'm going keep this comment up to date with any updates of the attached patch.

symfony/asset-mapper

6.3 vs 6.4 ```diff diff --git a/symfony/asset-mapper/6.3/assets/app.js b/symfony/asset-mapper/6.4/assets/app.js index cb0082a..6174cc6 100644 --- a/symfony/asset-mapper/6.3/assets/app.js +++ b/symfony/asset-mapper/6.4/assets/app.js @@ -4,4 +4,6 @@ * This file will be included onto the page via the importmap() Twig function, * which should already be in your base.html.twig. */ -console.log('This log comes from assets/app.js - welcome to AssetMapper! 🎉') +import './styles/app.css'; + +console.log('This log comes from assets/app.js - welcome to AssetMapper! 🎉'); diff --git a/symfony/asset-mapper/6.3/importmap.php b/symfony/asset-mapper/6.4/importmap.php index 5c2c21d..70ebf14 100644 --- a/symfony/asset-mapper/6.3/importmap.php +++ b/symfony/asset-mapper/6.4/importmap.php @@ -1,21 +1,19 @@ [ - 'path' => 'app.js', - 'preload' => true, + 'path' => './assets/app.js', + 'entrypoint' => true, ], ]; diff --git a/symfony/asset-mapper/6.3/manifest.json b/symfony/asset-mapper/6.4/manifest.json index c6fb477..cebb7e6 100644 --- a/symfony/asset-mapper/6.3/manifest.json +++ b/symfony/asset-mapper/6.4/manifest.json @@ -6,22 +6,19 @@ }, "aliases": ["asset-mapper", "importmap"], "gitignore": [ - "/%PUBLIC_DIR%/assets/" + "/%PUBLIC_DIR%/assets/", + "/assets/vendor/" ], + "composer-scripts": { + "importmap:install": "symfony-cmd" + }, "add-lines": [ { "file": "templates/base.html.twig", - "content": " {{ importmap() }}", + "content": "{% block importmap %}{{ importmap('app') }}{% endblock %}", "position": "after_target", "target": "{% block javascripts %}", "warn_if_missing": true - }, - { - "file": "templates/base.html.twig", - "content": " ", - "position": "after_target", - "target": "{% block stylesheets %}", - "warn_if_missing": true } ], "conflict": { ```