Problem/Motivation
I'm using Symfony Mailer v2.0.1 and just installed the mailer_policy submodule which created a new config/sync/mailer_policy.mailer_policy._.yml which I loaded and saved the form without changing, and resulted in a config entity which has the following:
uuid: ...
langcode: en
status: true
dependencies:
module:
- _
_core:
default_config_hash: ...
id: _
configuration:
mailer_inline_css: { }
email_theme:
theme: _active_fallback
mailer_url_to_absolute: { }
mailer_wrap_and_convert:
plain: false
Now all my config:import commands are blocked because of the dependencies line. Error message:
Configuration mailer_policy.mailer_policy._ depends on the _ module that will not be installed after import.
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Comments
Comment #2
adamps commentedIt works fine for me but I don't use config syncing.
The config file is fine config/sync/mailer_policy.mailer_policy._.yml is correct in the codebase, without any dependencies. So I don't know where the problem dependency comes from.
Comment #3
dave reidIf you inspect the config entity in the database after saving in the UI, you'll also see it's been changed. Is the third part in the filename supposed to be a module name for the other policy configs?
Comment #4
adamps commentedThanks now I see the bug. MR coming up.
Correct. There is code to declare a dependency based on this part of the name. We need to block it in the case of the '_' policy, in
MailerPolicy::fillDummy().I fixed a second bug that this dependency was missing on many config entries, in
MailerLookup::checkSubDef().The final change in
MailerLookup::processDefinition()is just a tidy upComment #5
adamps commentedComment #7
adamps commentedPossibly we should also have an update hook to correct all existing saved config.
Comment #9
adamps commented@dave reid please can you confirm this fixes it for you?
Comment #11
dave reidI have attempted the fix and it fixes it for the default or no-provider plugins, but I did create a new policy with id user.status_activated and it did not create a dependency on the user module. Should that be expected?
Comment #12
dave reidNevermind, I think I was just needing to use the Overrides module for those properly with a provider. Yes, I consider this resolved. +1 for a new release.
Comment #13
theodorosploumisMinor, fix title of the issue