Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UX Turbo] Fix recipe does not install bundle #1357

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

smnandre
Copy link
Member

@smnandre smnandre commented Nov 19, 2024

Q A
License MIT
Doc issue/PR symfony/ux#2391

Turbo is not installed correctly now (i guess now having this recipe, we do need to add the bundles entry in the manifest)

Issue: symfony/ux#2391

The "conflict" should not prevent the bundle to be configured, as the same thing occurs in the Stimulus Bundle with no problem


Update 1: not enough 😢

13 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
  - Skipping recipe for symfony/ux-turbo: all versions of the recipe conflict with your package versions.

Update2: added a 2.19 recipe


Update3: nope :/

It worked once, but i cannot make it work another time 🤔

Generating autoload files
> post-autoload-dump: Symfony\Component\Runtime\Internal\ComposerPlugin_composer_tmp1->updateAutoloadFile
113 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
> post-update-cmd: Symfony\Flex\Flex_composer_tmp0->update
Reading /Users/simonandre/Library/Caches/composer/repo/flex/symfony-recipes-flex-pull-1357-symfony.ux-turbo.2.19.json from cache
Downloading https://raw.githubusercontent.com/symfony/recipes/flex/pull-1357/symfony.ux-turbo.2.19.json
[304] https://raw.githubusercontent.com/symfony/recipes/flex/pull-1357/symfony.ux-turbo.2.19.json

Symfony operations: 1 recipe (be9bca5f1f656f87cb5b712afbd456f8)
  - Configuring symfony/ux-turbo (>=2.19): From github.com/symfony/recipes:main
    Enabling the package as a Symfony bundle
> post-update-cmd: Symfony\Thanks\Thanks_composer_tmp3->displayReminder
> post-update-cmd: @auto-scripts
> auto-scripts: Symfony\Flex\Flex_composer_tmp0->executeAutoScripts
Executing script cache:clear
Executed script cache:clear  [OK]

Turbo is not installed correctly now (i guess now having this recipe, we do need to add the `bundles` entry in the manifest)

Issue: symfony/ux#2391

I just hope the "conflict" will not prevent the bundle to be configured ?
Copy link

github-actions bot commented Nov 19, 2024

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/symfony/recipes/flex/pull-1357/index.json
    # On Windows
    SET SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes/flex/pull-1357/index.json
  2. Install the package(s) related to this recipe:

    composer req symfony/flex
    composer req 'symfony/ux-turbo:^2.20'
  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/ux-turbo

2.19 vs 2.20
diff --git a/symfony/ux-turbo/2.19/manifest.json b/symfony/ux-turbo/2.20/manifest.json
index 1fa03bf..b166a6c 100644
--- a/symfony/ux-turbo/2.19/manifest.json
+++ b/symfony/ux-turbo/2.20/manifest.json
@@ -1,5 +1,17 @@
 {
     "bundles": {
         "Symfony\\UX\\Turbo\\TurboBundle": ["all"]
-    }
+    },
+    "conflict": {
+        "symfony/framework-bundle": "<7.2",
+        "symfony/security-csrf": "<7.2"
+    },
+    "add-lines": [
+        {
+            "file": "config/packages/framework.yaml",
+            "position": "after_target",
+            "target": "        csrf_protection:",
+            "content": "            check_header: true"
+        }
+    ]
 }

auto-merge was automatically disabled November 19, 2024 20:13

Head branch was pushed to by a user without write access

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants