-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[Theme] Make themes persistable & huuuge refactoring #4268
[Theme] Make themes persistable & huuuge refactoring #4268
Conversation
What about Another question is about repository, who is responsible to fill it up with available themes? ThemeLocator or just like other resources (fixtures, controllers, etc.)? |
Hello Aram! In fact, currently only theme repository and translation files are set during container compilation. Templates can be loaded without being warmed up first (but it will be needed for production), translations sources are required to be added by compiler pass (for now), assets need to be dumped first (but can be also managed by some kind of a frontend controller in the future). The themes will be synchronized by a command (I'm just writing it) that runs |
why you breaks |
@liverbool Symfony 2.8 caused some issues and I'd rather fix it in another PR as this is getting too big (also that requirement is not a part of this one). |
Hi @pamil, if I understood correctly, every time I will want to add a new theme I will need to run |
9e23b0a
to
5337d46
Compare
5337d46
to
51115d0
Compare
/** | ||
* @author Kamil Kokot <kamil.kokot@lakion.com> | ||
*/ | ||
final class SynchronizeCommand extends ContainerAwareCommand |
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.
Maybe ThemeSynchronizeCommand
? as there is also ThemeDebugCommand
etc.
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'm thinking about removing Theme
from ThemeDebugCommand
, as it only makes the class name longer and does not add much context.
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.
Just keep consistent and it will be good 😄
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.
Done, 👍
@takeit for now the only synchronizer job is to update persisted themes with the real state, the usage of events is a really good idea worth implementing, but for sure not in this PR :) |
@@ -31,6 +31,7 @@ | |||
"doctrine/doctrine-cache-bundle": "~1.0", | |||
"doctrine/doctrine-fixtures-bundle": "~2.2", | |||
"doctrine/doctrine-migrations-bundle": "~1.0", | |||
"doctrine/doctrine-module": "^1.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.
Requring this in Sylius sounds like an overkill, I guess I will learn what is needed in the rest of the PR but that's quite big deps to add.
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'll use another hydrator instead of the Doctrine one and it can be removed.
…emoved unused files & fixed bundle BC changes in previous commits
…tead of repository
me happy now 👯 |
b3c3718
to
37d10df
Compare
great job @pamil |
[Theme] Make themes persistable & huuuge refactoring
Great work @pamil! :D Hopefully this is last PR of this size before 1.0. :) 👍 |
Do you know when https://github.com/Sylius/SyliusThemeBundle repo will be synchronized? |
@ahilles107 Subtree split is running right now. :) |
In Readme link to docs is broken: http://sylius.org/en/latest/bundles/SyliusThemeBundle/index.html |
So if you want to use the ThemeBundle you also need to configure the ResourceBundle? |
after this PR - yes |
OK.. That actually makes me sad as it was a killer feature and now I need to configure the ResourceBundle only to use this. I can understand the integration, but please reconsider the coupling to the Sylius system and make it easier for others to use this. |
👍 @sstok |
@sstok It's quite unfortunate, I'm thinking about making ThemeBundle independent of ResourceBundle and themes persistance, but for now it's required. @liverbool PR is coming, |
@pamil We should be consistent with other bundles and use |
@liverbool should be all right now (there may be some delay because of a subtree split). |
Unfortunately I had to do some refactoring, so the diff might be a little biased, but it's the last time as v0.17 is coming.
Based on #4287.