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

[Turbo] symfony/ux-turbo doesn't install correctly when using --webapp #2391

Closed
tacman opened this issue Nov 19, 2024 · 10 comments
Closed

[Turbo] symfony/ux-turbo doesn't install correctly when using --webapp #2391

tacman opened this issue Nov 19, 2024 · 10 comments
Labels
Bug Bug Fix Status: Needs Review Needs to be reviewed Turbo

Comments

@tacman
Copy link
Contributor

tacman commented Nov 19, 2024

This fails, I reported it at symfony/symfony#58926 but probably belongs in this repo.

symfony new TurboBug  --webapp && cd TurboBug
bin/console make:controller AppController
symfony server:start -d
symfony open:local --path=/app

image

But if I remove ux-turbo, it works:

symfony new NewApp  --webapp && cd NewApp
composer remove symfony/ux-turbo
bin/console make:controller AppController
symfony server:start -d
symfony open:local --path=/app
@nicolas-grekas
Copy link
Member

nicolas-grekas commented Nov 19, 2024

Let's figure this out. Did you run assets:install et al commands? They should be in the composer.json script's entry already.
Turbo is part of the core DX we want to promote out of the box so we should make it work.

@tacman
Copy link
Contributor Author

tacman commented Nov 19, 2024

No change:

symfony new NewApp  --webapp && cd NewApp
bin/console assets:install
bin/console make:controller AppController
symfony server:start -d
symfony open:local --path=/app

Unless my composer has some global to block scripts, this has always worked for me, so I think it's something in ux-turbo.

@WebMamba
Copy link
Contributor

I had the same issue after running a symfony new --webapp. Huuuum not sure what's happen here... I am digging in to it

@smnandre
Copy link
Member

So... it appears Turbo is not present in the bundle.php file after install

Had to manually add it (and then everything worked as expected)

<?php

return [
    Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
    Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
    Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
    Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true],
    Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
    Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
    Symfony\UX\StimulusBundle\StimulusBundle::class => ['all' => true],
+    Symfony\UX\Turbo\TurboBundle::class => ['all' => true],
    Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true],
    Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
    Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
    Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
];

@smnandre
Copy link
Member

I guess the "bundle" lines are missing from the recipes ... we did not have one before so the registration was automatic, but now we have one, i think we need to add these lines in https://github.com/symfony/recipes/blob/main/symfony/ux-turbo/2.20/manifest.json

    "bundles": {
        "Symfony\\UX\\Turbo\\TurboBundle": ["all"]
    },

See https://github.com/symfony/recipes/blob/main/symfony/stimulus-bundle/2.20/manifest.json for comparaison

smnandre added a commit to smnandre/recipes that referenced this issue Nov 19, 2024
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 ?
@smnandre
Copy link
Member

Posted a PR to fix this.... would love a second eye (@nicolas-grekas ?)

@smnandre smnandre added the Turbo label Nov 19, 2024
@smnandre smnandre changed the title symfony/ux-turbo doesn't install correctly when using --webapp [Turbo] symfony/ux-turbo doesn't install correctly when using --webapp Nov 19, 2024
@smnandre
Copy link
Member

Confirmed here (if i read it correctly): we do need at least one working recipe symfony/flex#865

@smnandre
Copy link
Member

Not sure if this works (only once for me ... maybe)

... could you try @tacman with the instructions provider in the PR ?

@smnandre
Copy link
Member

symfony/recipes#1357

@tacman
Copy link
Contributor Author

tacman commented Nov 19, 2024

Yep, works as expected!

export SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes/flex/pull-1357/index.json
symfony new TurboTest  --webapp && cd TurboTest
bin/console make:controller AppController
symfony server:start -d
symfony open:local --path=/app

symfony-recipes-bot pushed a commit to symfony/recipes that referenced this issue Nov 20, 2024
* [UX Turbo] Fix recipe does not install bundle

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 ?

* add 2.19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bug Fix Status: Needs Review Needs to be reviewed Turbo
Projects
None yet
Development

No branches or pull requests

5 participants