英文:
Can I automatically update Shopware plugins from store.shopware.com taking care of the compatibility?
问题
我们通过composer管理我们的Shopware 6插件。
简而言之,
如果您不通过composer管理商店,我认为扩展商店的版本兼容性会被考虑在内。
但是,当使用composer时,我认为这些有价值的信息没有被使用?
因此,我们项目的composer.json
包含了例如:
"store.shopware.com/froshproductcompare": "^1.2",
我想知道是否可以安全地将其更改为
"store.shopware.com/froshproductcompare": "*",
以获得与当前核心兼容的最新版本。
插件的composer.json
包含:
"require": {
"shopware/core": "^6.4",
"shopware/storefront": "^6.4"
},
而商店中的信息包含了更现实的约束:
这些来自商店的兼容性信息是否可以在composer更新中以任何方式使用,还是我们必须手动检查与商店信息的兼容性?
是否有改进计划?
英文:
We are managing our Shopware 6 plugins via composer.
TL;DR
In case you don't manage the store via composer, I believe the extension store's version compatibility is taken into account.
But when using composer, I think this valuable information is not used?
So our project' composer.json
contains for example:
"store.shopware.com/froshproductcompare": "^1.2",
I am wondering if I could safely change this to
"store.shopware.com/froshproductcompare": "*",
to get the recent version compatible with the current core.
The composer.json
of the plugin contains:
"require": {
"shopware/core": "^6.4",
"shopware/storefront": "^6.4"
},
While the information in the store contains a more realistic constraint:
Can this compatibility info from the store be used in composer updates in any way or do we have to manually check the compatibility with the store info?
Are there any plans to improve this?
答案1
得分: 2
"store.shopware.com/froshproductcompare": "*",
这将最终导致版本冲突。星号将与插件的最新版本匹配,如果它们的要求与本地的 `shopware/core` 版本不匹配,我认为无法自动解决。它只是看到两个依赖项冲突,它怎么知道哪个优先级更高?
> 这个存储的兼容性信息是否可以在Composer更新中以任何方式使用,还是我们必须手动检查与存储信息的兼容性?
>
> 有没有改进的计划?
如果插件开发者不保持版本约束与他们在商店中要求的内容同步,那对他们来说不是一个好的做法。在这方面没有太多改进的空间,除非更严格地强制执行,但从回顾来看,这可能无法实现。
英文:
"store.shopware.com/froshproductcompare": "*",
This would sooner or later end up with a version conflict. The asterisk will match the latest version of the plugin and if their requirement mismatches with the local shopware/core
version, I don't it can be resolved automatically. It just sees two dependencies clashing, how would it know that one takes priority?
> Can this compatibility info from the store be used in composer updates in any way or do we have to manually check the compatibility with the store info?
>
> Are there any plans to improve this?
If the plugin developer doesn't keep the version constraints in sync with what they require in the store, that's not good practice on their part. There's not a whole lot to improve in that regard, other than maybe enforcing it more strictly, which retroactively likely wouldn't be possible anyways.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论