contao / manager-plugin

Contao Manager Plugin
GNU Lesser General Public License v3.0
4 stars 9 forks source link

Do not merge ModuleConfig objects #34

Closed ausi closed 4 years ago

ausi commented 4 years ago

We discovered the strange error message The Symfony bundle "multicolumnwizard" does not exist.. This is because in https://github.com/terminal42/contao-leads/blob/0b60dc4b1d42d18bdfe4850008fe4fdc320b40d7/src/ContaoManager/Plugin.php#L37 the leads bundle creates a ModuleConfig instance (which we previously said is not a supported use case). Therefore two ModuleConfig instances exist and because ModuleConfig extends from BundleConfig the two ModuleConfigs are merged into one BundleConfig.

This is now fixed and tested with this PR. The error message now looks like Unable to merge "haste" ("Contao\ManagerPlugin\Bundle\Config\ModuleConfig" with "Contao\ManagerPlugin\Bundle\Config\ModuleConfig").

I also marked ModuleConfig as @internal to make it clear that this class should not be used by extensions.

ausi commented 4 years ago

/cc @discordier

discordier commented 4 years ago

Therefore two ModuleConfig instances exist and because ModuleConfig extends from BundleConfig the two ModuleConfigs are merged into one BundleConfig.

Gee I did not think of that one... good catch.

This is now fixed and tested with this PR. The error message now looks like Unable to merge "haste" ("Contao\ManagerPlugin\Bundle\Config\ModuleConfig" with "Contao\ManagerPlugin\Bundle\Config\ModuleConfig").

:+1:

I also marked ModuleConfig as @internal to make it clear that this class should not be used by extensions.

:+1:

leofeyer commented 4 years ago

Thank you @ausi.