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
[ISSUE/1227] parentTheme config field inheritance, add changelog #1960
[ISSUE/1227] parentTheme config field inheritance, add changelog #1960
Conversation
Hey @bjoern-flagbit could you please fill out the changelog and add a test based on the scenario in the Issue? |
Changelog file is there. How detailed you need the test base scenario because in some parts it is already described at point 3 (also in the linked issues). |
@bjoern-flagbit Jes it's described in the Issue, but we need it as a Unit Test to ensure that this doesn't break in the future again |
Hmm the main problem is that the existing test is not failing in both cases. So for this someone need to check why the current test was not failing and then we can run the test again on the changed version. Will think about this, but will take some time. |
@NiklasLimberg there is a general problem. Because: |
hey @bjoern-flagbit, @bneumann97 should come back to you regarding this. |
If you wanna I can for sure provide a test for |
+1 We need this! Sadly im also not good at writing unit test 😅 |
+1 |
+1 Would be useful! |
I researched a bit more about the test and I was wrong at the beginning so the I tried to reproduce the core error but this seams to me at the moment not possible because there is always an mocked object that will not run into this error. Need more time for this. 😿 |
Hey @bjoern-flagbit, thanks for your contribution 💙 Something seems to be wrong with your code style, Please run the PHP CS-Fixer on your branch. The tests are part of our contribution guideline, so we do need a test for this to accept the PR |
Fixed the code style but not the conflict. This commit 4925bcb makes the test also useless 🥱 |
Hello, thank you for creating this pull request. Please use this issue to track the state of your pull request. |
Hi @bjoern-flagbit, |
Ok the 2 days are up i'll close it |
This problem is still present in Shopware Version 6.4.7.0. Tested today. How you can reproduce this:
The suggested changes where reading also the parent theme config from file base and merging them together. Maybe need to update this PR. If I have time for this, would be cool. |
Here is a patch File you can use with Shopware 6.4.7.0 if you wanna use this feature:
|
Why this feature is needed?At the moment it is not possible for Shopware to load new config fields from parentThemes from file level. So when a parentTheme get updates and new config fields ... your childTheme can not use them. |
Hi @bjoern-flagbit |
@ssltg Did you also fixed the Bug in |
I can confirm that this is now working in core. I tested with Shopware Version Good job. Thx. 👍 |
1. Why is this change necessary?
It is useless to copy the same config fields accross themes.
Why can I set a parentThemeId when it is not using the inheritance (confusing).
2. What does this change do, exactly?
It allows to inherit the config fields from a parent theme
3. Describe each step to reproduce the issue or behaviour.
Create two themes, add one theme as parentTheme via API, try to build the childTheme after that (there will be also a core bug)
Create some config fields ... there is no inheritance from parent to child.
4. Please link to the relevant issues (if any).
See #1227 and #507
5. Checklist