Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet committed Dec 7, 2024
1 parent 3898fbb commit 810d183
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
8 changes: 1 addition & 7 deletions src/Event/BatchActionEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ final class BatchActionEvent extends Event
{
public const TYPE_PRE_BATCH_ACTION = 'pre_batch_action';

/**
* @var mixed[]
*/
private readonly array $idx;

/**
* @param mixed[] $idx
*
Expand All @@ -49,10 +44,9 @@ public function __construct(
private readonly string $type,
private readonly string $actionName,
private readonly ProxyQueryInterface $proxyQuery,
array &$idx,
private array &$idx,
private readonly bool $allElements,
) {
$this->idx = &$idx;
}

/**
Expand Down
7 changes: 7 additions & 0 deletions src/EventListener/ConfigureCRUDControllerListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ public function onKernelController(ControllerEvent $event): void

if (\is_array($controller)) {
$controller = $controller[0];
} else {
try {
$reflection = new \ReflectionFunction($controller(...));
$controller = $reflection->getClosureThis();
} catch (\ReflectionException) {
return;
}
}

if (!$controller instanceof CRUDController) {
Expand Down
2 changes: 1 addition & 1 deletion src/Util/AdminObjectAclData.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ final class AdminObjectAclData
/**
* @param AdminInterface<object> $admin
* @param \Traversable<UserInterface|string> $aclUsers
* @param \Traversable<string>|null $aclRoles
* @param \Traversable<string> $aclRoles
*
* @phpstan-param class-string $maskBuilderClass
*/
Expand Down

0 comments on commit 810d183

Please sign in to comment.