Skip to content

Commit 0bc004d

Browse files
committed
Remove BC layer for constructor
1 parent db31dec commit 0bc004d

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

src/Autocomplete/src/AutocompleteResultsExecutor.php

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use Doctrine\ORM\Tools\Pagination\Paginator;
1515
use Symfony\Bundle\SecurityBundle\Security;
1616
use Symfony\Component\PropertyAccess\Exception\UnexpectedTypeException;
17-
use Symfony\Component\PropertyAccess\PropertyAccessor;
1817
use Symfony\Component\PropertyAccess\PropertyAccessorInterface;
1918
use Symfony\Component\PropertyAccess\PropertyPath;
2019
use Symfony\Component\PropertyAccess\PropertyPathInterface;
@@ -26,22 +25,11 @@
2625
*/
2726
final class AutocompleteResultsExecutor
2827
{
29-
private PropertyAccessorInterface $propertyAccessor;
30-
private ?Security $security;
31-
3228
public function __construct(
3329
private DoctrineRegistryWrapper $managerRegistry,
34-
$propertyAccessor,
35-
/* Security $security = null */
30+
private PropertyAccessorInterface $propertyAccessor,
31+
private ?Security $security = null,
3632
) {
37-
if ($propertyAccessor instanceof Security) {
38-
trigger_deprecation('symfony/ux-autocomplete', '2.8.0', 'Passing a "%s" instance as the second argument of "%s()" is deprecated, pass a "%s" instance instead.', Security::class, __METHOD__, PropertyAccessorInterface::class);
39-
$this->security = $propertyAccessor;
40-
$this->propertyAccessor = new PropertyAccessor();
41-
} else {
42-
$this->propertyAccessor = $propertyAccessor;
43-
$this->security = \func_num_args() >= 3 ? func_get_arg(2) : null;
44-
}
4533
}
4634

4735
public function fetchResults(EntityAutocompleterInterface $autocompleter, string $query, int $page): AutocompleteResults

0 commit comments

Comments
 (0)