Closed tacman closed 2 days ago
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.
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.
I had the same issue after running a symfony new --webapp
. Huuuum not sure what's happen here... I am digging in to it
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],
];
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
Posted a PR to fix this.... would love a second eye (@nicolas-grekas ?)
Confirmed here (if i read it correctly): we do need at least one working recipe https://github.com/symfony/flex/pull/865
Not sure if this works (only once for me ... maybe)
... could you try @tacman with the instructions provider in the PR ?
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
This fails, I reported it at https://github.com/symfony/symfony/issues/58926 but probably belongs in this repo.
But if I remove ux-turbo, it works: