Fix symfony deprecation #1501
Annotations
11 warnings
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/cache@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
src/DependencyInjection/Compiler/MenuCompilerPass.php#L23
Escaped Mutant for Mutator "LogicalOr":
@@ @@
public function process(ContainerBuilder $container): void
{
$groups = $container->getParameter('nucleos_menu.groups');
- if (!\is_array($groups) || 0 === \count($groups)) {
+ if (!\is_array($groups) && 0 === \count($groups)) {
return;
}
$registry = $container->getDefinition('sonata.block.menu.registry');
|
src/DependencyInjection/Configuration.php#L58
Escaped Mutant for Mutator "MethodCallRemoval":
@@ @@
{
$menuNode = $node->children()->arrayNode('groups')->useAttributeAsKey('id')->prototype('array')->fixXmlConfig('attribute')->fixXmlConfig('item')->addDefaultsIfNotSet()->children()->scalarNode('name')->defaultNull()->end()->arrayNode('attributes')->useAttributeAsKey('id')->defaultValue([])->prototype('scalar')->end()->end()->arrayNode('items')->useAttributeAsKey('id')->defaultValue([])->prototype('array');
$this->buildPathNode($menuNode);
- $menuNode->end()->end()->end()->end();
+
}
private function buildPathNode(NodeDefinition $node): void
{
|
src/Menu/ConfigBuilder.php#L31
Escaped Mutant for Mutator "ArrayItemRemoval":
@@ @@
{
$this->factory = $factory;
$this->translator = $translator;
- $this->defaultOptions = ['attributes' => ['class' => 'dropdown'], 'childrenAttributes' => ['class' => 'dropdown-menu'], 'linkAttributes' => ['class' => 'dropdown-toggle', 'data-toggle' => 'dropdown', 'data-target' => '#'], 'extras' => ['safe_label' => true, 'translation_domain' => false]];
+ $this->defaultOptions = ['childrenAttributes' => ['class' => 'dropdown-menu'], 'linkAttributes' => ['class' => 'dropdown-toggle', 'data-toggle' => 'dropdown', 'data-target' => '#'], 'extras' => ['safe_label' => true, 'translation_domain' => false]];
}
public function buildMenu(array $menu, array $options): ItemInterface
{
|
src/Menu/ConfigBuilder.php#L32
Escaped Mutant for Mutator "ArrayItemRemoval":
@@ @@
{
$this->factory = $factory;
$this->translator = $translator;
- $this->defaultOptions = ['attributes' => ['class' => 'dropdown'], 'childrenAttributes' => ['class' => 'dropdown-menu'], 'linkAttributes' => ['class' => 'dropdown-toggle', 'data-toggle' => 'dropdown', 'data-target' => '#'], 'extras' => ['safe_label' => true, 'translation_domain' => false]];
+ $this->defaultOptions = ['attributes' => [], 'childrenAttributes' => ['class' => 'dropdown-menu'], 'linkAttributes' => ['class' => 'dropdown-toggle', 'data-toggle' => 'dropdown', 'data-target' => '#'], 'extras' => ['safe_label' => true, 'translation_domain' => false]];
}
public function buildMenu(array $menu, array $options): ItemInterface
{
|
src/Menu/ConfigBuilder.php#L35
Escaped Mutant for Mutator "ArrayItemRemoval":
@@ @@
{
$this->factory = $factory;
$this->translator = $translator;
- $this->defaultOptions = ['attributes' => ['class' => 'dropdown'], 'childrenAttributes' => ['class' => 'dropdown-menu'], 'linkAttributes' => ['class' => 'dropdown-toggle', 'data-toggle' => 'dropdown', 'data-target' => '#'], 'extras' => ['safe_label' => true, 'translation_domain' => false]];
+ $this->defaultOptions = ['attributes' => ['class' => 'dropdown'], 'childrenAttributes' => [], 'linkAttributes' => ['class' => 'dropdown-toggle', 'data-toggle' => 'dropdown', 'data-target' => '#'], 'extras' => ['safe_label' => true, 'translation_domain' => false]];
}
public function buildMenu(array $menu, array $options): ItemInterface
{
|
src/Menu/ConfigBuilder.php#L38
Escaped Mutant for Mutator "ArrayItemRemoval":
@@ @@
{
$this->factory = $factory;
$this->translator = $translator;
- $this->defaultOptions = ['attributes' => ['class' => 'dropdown'], 'childrenAttributes' => ['class' => 'dropdown-menu'], 'linkAttributes' => ['class' => 'dropdown-toggle', 'data-toggle' => 'dropdown', 'data-target' => '#'], 'extras' => ['safe_label' => true, 'translation_domain' => false]];
+ $this->defaultOptions = ['attributes' => ['class' => 'dropdown'], 'childrenAttributes' => ['class' => 'dropdown-menu'], 'linkAttributes' => ['data-toggle' => 'dropdown', 'data-target' => '#'], 'extras' => ['safe_label' => true, 'translation_domain' => false]];
}
public function buildMenu(array $menu, array $options): ItemInterface
{
|
src/Menu/ConfigBuilder.php#L43
Escaped Mutant for Mutator "ArrayItemRemoval":
@@ @@
{
$this->factory = $factory;
$this->translator = $translator;
- $this->defaultOptions = ['attributes' => ['class' => 'dropdown'], 'childrenAttributes' => ['class' => 'dropdown-menu'], 'linkAttributes' => ['class' => 'dropdown-toggle', 'data-toggle' => 'dropdown', 'data-target' => '#'], 'extras' => ['safe_label' => true, 'translation_domain' => false]];
+ $this->defaultOptions = ['attributes' => ['class' => 'dropdown'], 'childrenAttributes' => ['class' => 'dropdown-menu'], 'linkAttributes' => ['class' => 'dropdown-toggle', 'data-toggle' => 'dropdown', 'data-target' => '#'], 'extras' => ['translation_domain' => false]];
}
public function buildMenu(array $menu, array $options): ItemInterface
{
|
src/Menu/ConfigBuilder.php#L44
Escaped Mutant for Mutator "TrueValue":
@@ @@
{
$this->factory = $factory;
$this->translator = $translator;
- $this->defaultOptions = ['attributes' => ['class' => 'dropdown'], 'childrenAttributes' => ['class' => 'dropdown-menu'], 'linkAttributes' => ['class' => 'dropdown-toggle', 'data-toggle' => 'dropdown', 'data-target' => '#'], 'extras' => ['safe_label' => true, 'translation_domain' => false]];
+ $this->defaultOptions = ['attributes' => ['class' => 'dropdown'], 'childrenAttributes' => ['class' => 'dropdown-menu'], 'linkAttributes' => ['class' => 'dropdown-toggle', 'data-toggle' => 'dropdown', 'data-target' => '#'], 'extras' => ['safe_label' => false, 'translation_domain' => false]];
}
public function buildMenu(array $menu, array $options): ItemInterface
{
|
src/Menu/ConfigBuilder.php#L45
Escaped Mutant for Mutator "FalseValue":
@@ @@
{
$this->factory = $factory;
$this->translator = $translator;
- $this->defaultOptions = ['attributes' => ['class' => 'dropdown'], 'childrenAttributes' => ['class' => 'dropdown-menu'], 'linkAttributes' => ['class' => 'dropdown-toggle', 'data-toggle' => 'dropdown', 'data-target' => '#'], 'extras' => ['safe_label' => true, 'translation_domain' => false]];
+ $this->defaultOptions = ['attributes' => ['class' => 'dropdown'], 'childrenAttributes' => ['class' => 'dropdown-menu'], 'linkAttributes' => ['class' => 'dropdown-toggle', 'data-toggle' => 'dropdown', 'data-target' => '#'], 'extras' => ['safe_label' => true, 'translation_domain' => true]];
}
public function buildMenu(array $menu, array $options): ItemInterface
{
|
src/Menu/ConfigBuilder.php#L96
Escaped Mutant for Mutator "GreaterThan":
@@ @@
{
$label = $this->createLabel($itemDefinition);
$menuOptions = self::getOptions($baseMenuOptions, $itemDefinition);
- $hasChildren = \array_key_exists('children', $itemDefinition) && \count($itemDefinition['children']) > 0;
+ $hasChildren = \array_key_exists('children', $itemDefinition) && \count($itemDefinition['children']) >= 0;
if ($hasChildren) {
$label .= ' <b class="caret caret-menu"></b>';
$menuOptions = array_merge($menuOptions, $this->defaultOptions, ['label' => $label]);
|
This job succeeded
Loading