Skip to content

Commit

Permalink
added deprecation trigger and nonamed service parameter config
Browse files Browse the repository at this point in the history
  • Loading branch information
mart-insiders authored Jan 27, 2025
1 parent 2afd9f9 commit 8070991
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,13 @@ public function load(array $configs, ContainerBuilder $container): void
$loader->load('services.yml');
$loader->load('commands.yml');

if ($enableImprovedUrlchooser) {
$container->removeDefinition(URLChooserFormSubscriber::class);
$container->removeDefinition(URLChooserLinkTypeSubscriber::class);
if (!$enableImprovedUrlchooser) {
trigger_deprecation('kunstmaan/node-bundle', '7.2', 'Not setting the "kunstmaan_node.enable_improved_urlchooser" config to true is deprecated, it will always be true in 8.0.');
return;
}

$container->removeDefinition(URLChooserFormSubscriber::class);
$container->removeDefinition(URLChooserLinkTypeSubscriber::class);
}

public function prepend(ContainerBuilder $container): void
Expand Down
2 changes: 1 addition & 1 deletion src/Kunstmaan/NodeBundle/Resources/config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ services:
kunstmaan_node.form.type.urlchooser:
class: Kunstmaan\NodeBundle\Form\Type\URLChooserType
arguments:
$improvedUrlChooser: '%kunstmaan_node.enable_improved_urlchooser%'
- '%kunstmaan_node.enable_improved_urlchooser%'
tags:
- { name: 'form.type' }

Expand Down

0 comments on commit 8070991

Please sign in to comment.