-
-
Notifications
You must be signed in to change notification settings - Fork 364
Define requirement to the twig bundle for UX Component and UX Live Components #569
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
base: 2.x
Are you sure you want to change the base?
Define requirement to the twig bundle for UX Component and UX Live Components #569
Conversation
1871de9
to
c7095d4
Compare
c7095d4
to
48c73a8
Compare
@@ -29,7 +29,9 @@ | |||
"php": ">=8.0", | |||
"symfony/property-access": "^5.4|^6.0", | |||
"symfony/serializer": "^5.4|^6.0", | |||
"symfony/ux-twig-component": "^2.5" | |||
"symfony/twig-bundle": "^5.4|^6.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think TwigBundle
is not required here (nothing imported from TwigBundle
in src
only from twig
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like the component it requires the specific service twig
and so has a requirement to twig bundle itself. Because that is the bundle providing that service definition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh do you think about this one?
->setArguments([new Reference('twig')]); |
If, we add the bundle this can be removed
$bundles = $container->getParameter('kernel.bundles'); | |
if (!isset($bundles['TwigBundle'])) { | |
return; | |
} |
And there are other missing dependencies too, like dependency-injection, router, http-kernel, ... don't we should add those too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that is what currently failing the installation inside a empty skeleton. I personally would if they are required, but not sure, wait what @weaverryan think about that.
Thanks for looking into this! I can't remember exactly how it is related but the failing CI is what I ran into when iterating on #313: the form component not being available. Does manually enabling the form component in the test kernel help? |
@kbond I did found out it its an issue in the Symfony core here a little inconsistent is between |
So the issue is there's no way to enable the twig form extension if I think that was the nuance that #313 solved: adding twig-bundle and form to require-dev allowed it to be enabled. Agree that this is a problem - I remember it took me some time to figure out what was going on. |
Yes that is the case as then also the I think I will target a pull request in symfony/symfony so that issue is fixed in the core that it can not appear again. |
Define requirement to the twig bundle for UX Component and UX Live Components. Currently installing ux component and live component fails. Both have a direct requirement to the
TwigBundle
as both require a service namedtwig
.Without defining this requirement the installation of the package will fail when not already have twig-bundle installed: https://github.com/schranz-php-recipes/symfony-recipes-php/actions/runs/3567748595/jobs/5995813798
Related PR: #313