Is the composer dependency chain honored or is is still the installation date as written here?.
Is the composer dependency chain honored or is is still the installation date as written here?.
Update Jul 2022: It is now possible for plugins to define the template priority. Below is still true for other things like translation priority.
According to a changelog entry in Nov 2019, plugins are loaded in the order of installation date.
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.
This is still true in 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;
So even the solution was not that temporary, at least a consistent loading order is currently established.
Remark: When it comes to the priority of Theme overrides, see How to do a template multiple inheritance in Shopware 6? and Override twig template from plugin
Future: There is a core issue to tackle this.
Alex already answered the question but here is a small hint if you want to have more control how plugins are loaded. You can define the order in your theme in src/Resources/theme.json.
For example to load plugin X before plugin Y:
"views": [
"@Storefront",
"@Plugins",
"@PluginX",
"@PluginY",
"@YourTheme"
]