Skip to content

Commit

Permalink
bug #2416 [Icons] Fix LockIconsCommand definition when Iconify disabl…
Browse files Browse the repository at this point in the history
…ed (smnandre)

This PR was squashed before being merged into the 2.x branch.

Discussion
----------

[Icons] Fix LockIconsCommand definition when Iconify disabled

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| Issues        | Fix #2415
| License       | MIT

When iconify is disabled, LockIconsCommand definition is accessed without been set first.

Commits
-------

6ba36f7 [Icons] Fix LockIconsCommand definition when Iconify disabled
  • Loading branch information
javiereguiluz committed Dec 2, 2024
2 parents a11f1c5 + 6ba36f7 commit ec4cfa1
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/Icons/src/DependencyInjection/UXIconsExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,16 +173,15 @@ protected function loadInternal(array $mergedConfig, ContainerBuilder $container
$container->getDefinition('.ux_icons.iconify_on_demand_registry')
->setArgument(1, $iconSetAliases);

$container->getDefinition('.ux_icons.command.lock')
->setArgument(3, $mergedConfig['aliases'])
->setArgument(4, $iconSetAliases);

if (!$mergedConfig['iconify']['on_demand']) {
$container->removeDefinition('.ux_icons.iconify_on_demand_registry');
}
}

$container->getDefinition('.ux_icons.command.lock')
->setArgument(3, $mergedConfig['aliases'])
->setArgument(4, $iconSetAliases)
;

if (!$container->getParameter('kernel.debug')) {
$container->removeDefinition('.ux_icons.command.import');
}
Expand Down

0 comments on commit ec4cfa1

Please sign in to comment.