You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's hard to keep Twig blocks up to date after Shopware update or plugin update, when the extended block has been changed. This is true for complete replacements/before and after changes.
So when developers update Shopware or a plugin, where they changed blocks, they manually check every block they overwritten if the content is still the same, or they check the styling of the page.
Both options are time-intensive:
Solution
A solution for this problem could be to add versioning to the Twig blocks
This PhpStorm Plugin can read that comment and differentiate the generated hash from the current hash. The hash is generated from the original template. When you are on the same Shopware version, they match.
If not, we can highlight the block in yellow and say something changed in this block in the upstream template.
To simplify the lookup for changes, we can add an Intention (CMD/Control + Enter) to show a git diff between the previous and the current version of the block using the version added in the comment. So the user can directly see what has been changed.
After they made the changes, they can run a second Intention (CMD/Control + Enter) to update the hash to the newest version and go to the next block.
Migration
We can add a simple Intention to blocks to add the versioning if it's missing from the current value.
Configuration
We should add a config for opt-in for this feature for any theme/plugin/app. Some plugins are intentionally made for a lot of Shopware versions like Store Plugins, where this feature may not wanted.
The text was updated successfully, but these errors were encountered:
Problem
It's hard to keep Twig blocks up to date after Shopware update or plugin update, when the extended block has been changed. This is true for complete replacements/before and after changes.
So when developers update Shopware or a plugin, where they changed blocks, they manually check every block they overwritten if the content is still the same, or they check the styling of the page.
Both options are time-intensive:
Solution
A solution for this problem could be to add versioning to the Twig blocks
This PhpStorm Plugin can read that comment and differentiate the generated hash from the current hash. The hash is generated from the original template. When you are on the same Shopware version, they match.
If not, we can highlight the block in yellow and say something changed in this block in the upstream template.
To simplify the lookup for changes, we can add an Intention (CMD/Control + Enter) to show a git diff between the previous and the current version of the block using the version added in the comment. So the user can directly see what has been changed.
After they made the changes, they can run a second Intention (CMD/Control + Enter) to update the hash to the newest version and go to the next block.
Migration
We can add a simple Intention to blocks to add the versioning if it's missing from the current value.
Configuration
We should add a config for opt-in for this feature for any theme/plugin/app. Some plugins are intentionally made for a lot of Shopware versions like Store Plugins, where this feature may not wanted.
The text was updated successfully, but these errors were encountered: