-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New config property "converterSuffix" #75
base: main
Are you sure you want to change the base?
Conversation
What exactly is the problem? What breaks on “old” converter declarations? How do they look? |
@@ -28,6 +28,10 @@ private function addConverterSection(ArrayNodeDefinition $rootNode): void | |||
{ | |||
$rootNode | |||
->children() | |||
->scalarNode('converterSuffix') | |||
->info('consolidated suffix for all converters') | |||
->defaultValue('') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a breaking change. The default value should be the current one.
->defaultValue('') | |
->defaultValue('Converter') |
@@ -28,6 +28,10 @@ private function addConverterSection(ArrayNodeDefinition $rootNode): void | |||
{ | |||
$rootNode | |||
->children() | |||
->scalarNode('converterSuffix') | |||
->info('consolidated suffix for all converters') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This message is misleading. It only configures the suffix of the autowiring alias for converter arguments.
@@ -28,6 +28,10 @@ private function addConverterSection(ArrayNodeDefinition $rootNode): void | |||
{ | |||
$rootNode | |||
->children() | |||
->scalarNode('converterSuffix') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Config parameters should be in "snake_case":
->scalarNode('converterSuffix') | |
->scalarNode('converter_suffix') |
Maybe we should even rename this to be more specific, like argument_autowiring_alias_suffix
.
@@ -40,7 +40,7 @@ public function loadInternal(array $mergedConfig, ContainerBuilder $container): | |||
/** | |||
* @param array<string, mixed> $config | |||
*/ | |||
private function registerConverterConfiguration(string $id, array $config, ContainerBuilder $container): void | |||
private function registerConverterConfiguration(string $id, array $config, ContainerBuilder $container, ?string $converterSuffix): void |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this is not nullable when there's a default value defined in the config.
This property will be introduced to enable backwards compatibilty to "older" converter declarations.