Skip to content

Commit

Permalink
Merge 5.x into 6.x
Browse files Browse the repository at this point in the history
  • Loading branch information
SonataCI authored Oct 2, 2023
2 parents a415ad7 + 4314383 commit 5d5af9a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Form/Type/RolesMatrixType.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'expanded' => true,
'multiple' => true,
'choices' => function (Options $options, ?array $parentChoices): array {
if (null !== $parentChoices && [] !== $parentChoices) {
return [];
Expand Down
2 changes: 2 additions & 0 deletions tests/Form/Type/RolesMatrixTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ public function testGetDefaultOptions(): void
$choices = $options['choices'];
static::assertCount(2, $choices);
static::assertNotContains(UserInterface::ROLE_DEFAULT, $choices);
static::assertTrue($options['expanded']);
static::assertTrue($options['multiple']);
}

public function testDifferentExcludedRoles(): void
Expand Down

0 comments on commit 5d5af9a

Please sign in to comment.