Skip to content

Commit

Permalink
IBX-7946: [BC BREAK] Renamed main SA-aware config node from notificat…
Browse files Browse the repository at this point in the history
…ions to notifier (#8)

For more details see https://issues.ibexa.co/browse/IBX-7946 and #8

This commit introduces Backward Compatibility breaking change due to name collision in our configuration. See the mentioned Pull Request for more details.
  • Loading branch information
webhdx authored Apr 10, 2024
1 parent c957bb4 commit c55750b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,14 @@ final class NotificationsConfigParser extends AbstractParser

public function addSemanticConfig(NodeBuilder $nodeBuilder): void
{
/*
* Node name has been changed from "notifications" to "notifier" due to
* collision with Admin UI notifications parser.
*
* TODO: Change the name back to "notifications" in the next major version.
*/
$nodeBuilder
->arrayNode('notifications')
->arrayNode('notifier')
->children()
->arrayNode('subscriptions')
->info('Mandatory system notifications. Users cannot opt-out from below subscriptions.')
Expand All @@ -42,11 +48,11 @@ public function addSemanticConfig(NodeBuilder $nodeBuilder): void
*/
public function mapConfig(array &$scopeSettings, $currentScope, ContextualizerInterface $contextualizer): void
{
if (empty($scopeSettings['notifications'])) {
if (empty($scopeSettings['notifier'])) {
return;
}

$settings = $scopeSettings['notifications'];
$settings = $scopeSettings['notifier'];

foreach (self::MAPPED_SETTINGS as $key) {
if (!isset($settings[$key])) {
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/Resources/config/prepend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
ibexa:
system:
default:
notifications:
notifier:
subscriptions: []

0 comments on commit c55750b

Please sign in to comment.