gpt4 book ai didi

shopware - Shopware 6 插件的加载顺序是什么?

转载 作者:行者123 更新时间:2023-12-05 08:48:01 27 4
gpt4 key购买 nike

Composer 依赖链是否得到尊重或仍然是安装日期as written here

最佳答案

2022 年 7 月更新:它是 now possible for plugins to define the template priority .以下对于翻译优先级等其他内容仍然适用。


根据 changelog entry in Nov 2019 , 插件按安装日期顺序加载。

The order of the loaded plugins has changed. Before, the plugins has been sorted by the ID column. Because of the UUIDs stored here, the order was random and changed on every (re)installation of Shopware.

From now on, the plugins are loaded in the order of their installation date. So the first installed plugin is the first, which is initialised on kernel boot.

This is temporary solution, as this will not fully resolve dependencies problems between plugins. There are already tickets open, which have the goal to improve the whole plugin loading process.

the latest revision (25 Feb 2021) 中仍然如此,

protected function loadPluginInfos(): void
{
$sql = <<<SQL
# dbal-plugin-loader
SELECT
[...]
FROM `plugin`
ORDER BY `installed_at`; <---- here the sort order is defined
SQL;

因此,即使解决方案也不是临时的,至少目前已经建立了一致的加载顺序。

备注:关于主题覆盖的优先级,参见How to do a template multiple inheritance in Shopware 6?Override twig template from plugin

future :有一个core issue to tackle this .

关于shopware - Shopware 6 插件的加载顺序是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66627911/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com