-
Notifications
You must be signed in to change notification settings - Fork 349
Remove reference to LiipThemeBundle and dispatch event instead #7004
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
Remove reference to LiipThemeBundle and dispatch event instead #7004
Conversation
@rogamoore the problem is we should not have any requirement to SyliusThemeBundle inside Sulu Core. So it would be more abstract and extendable if we would inject |
We also could use existing event from the Preview the |
@alexander-schranz I was thinking the same. Actually the whole bug is based on the hard coded reference to If you think we could re-use the Regarding tests I guess we could check somehow if the event has been dispatched here in |
We did keep the LiipthemeBundle in it because it was that case in the past. But with the Min Requirement to Symfony 5.4 it can completely removed as it can not longer exist in Symfony 5.4. And for SyliusTheme we should find a more general solution so we have not a dependency to a service which is actually not required by the composer.json of sulu.
I'm even not sure about the comment. I even think that it is with the change to SyliusThemeBundle again required to dispatch that event. But I would need to test it if we remove that event if theme is still correctly be used. But as it is still there I'm also fine to keep it if we have a usecase for it and remove the comment and deprecation.
From test point of view I think it make sense to check if the event was dispatched with correct webspace attribute. |
f6dd5f4
to
feddf60
Compare
fix: remove reference to LiipThemeBundle and dispatch event instead fix: remove support for LiipThemeBundle and use SyliusThemeBundle instead
feddf60
to
3826c2e
Compare
The CI errors seems unrelated to the changes here. I will have a look at it. |
I tested it out locally all works like expected for current stable and current I also updated the UPGRADE.md file, it is a small bc break in the constructor but not worth investing here as I don't think somebody changed here anything. |
Thanks a lot @alexander-schranz ! |
What's in this PR?
The SuluThemeBundle switched to SyliusThemeBundle some time ago. See sulu/SuluThemeBundle#19
This PR updates the ValidateWebspacesCommand to use the correct components to set the theme and use it when checking for the existence of templates.This PR updates the ValidateWebspacesComman 8000 d to dispatch a PreRenderEvent instead which causes the SuluThemeBundle to correctly set the correct theme.
Why?
Without this fix, when using themes, the command will report missing templates even if the templates exist.