Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 2 additions & 14 deletions src/Autocomplete/src/AutocompleteResultsExecutor.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use Doctrine\ORM\Tools\Pagination\Paginator;
use Symfony\Bundle\SecurityBundle\Security;
use Symfony\Component\PropertyAccess\Exception\UnexpectedTypeException;
use Symfony\Component\PropertyAccess\PropertyAccessor;
use Symfony\Component\PropertyAccess\PropertyAccessorInterface;
use Symfony\Component\PropertyAccess\PropertyPath;
use Symfony\Component\PropertyAccess\PropertyPathInterface;
Expand All @@ -26,22 +25,11 @@
*/
final class AutocompleteResultsExecutor
{
private PropertyAccessorInterface $propertyAccessor;
private ?Security $security;

public function __construct(
private DoctrineRegistryWrapper $managerRegistry,
$propertyAccessor,
/* Security $security = null */
private PropertyAccessorInterface $propertyAccessor,
private ?Security $security = null,
) {
if ($propertyAccessor instanceof Security) {
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);
$this->security = $propertyAccessor;
$this->propertyAccessor = new PropertyAccessor();
} else {
$this->propertyAccessor = $propertyAccessor;
$this->security = \func_num_args() >= 3 ? func_get_arg(2) : null;
}
}

public function fetchResults(EntityAutocompleterInterface $autocompleter, string $query, int $page): AutocompleteResults
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
use Symfony\UX\Autocomplete\Form\AsEntityAutocompleteField;
use Symfony\UX\Autocomplete\Form\AutocompleteChoiceTypeExtension;
use Symfony\UX\Autocomplete\Form\BaseEntityAutocompleteType;
use Symfony\UX\Autocomplete\Form\ParentEntityAutocompleteType;
use Symfony\UX\Autocomplete\Form\WrappedEntityTypeAutocompleter;
use Symfony\UX\Autocomplete\Maker\MakeAutocompleteField;

Expand Down Expand Up @@ -147,14 +146,6 @@ private function registerFormServices(ContainerBuilder $container): void
])
->addTag('form.type');

$container
->register('ux.autocomplete.entity_type', ParentEntityAutocompleteType::class)
->setDeprecated('symfony/ux-autocomplete', '2.13', 'The "%service_id%" form type is deprecated since 2.13. Use "ux.autocomplete.base_entity_type" instead.')
->setArguments([
new Reference('router'),
])
->addTag('form.type');

$container
->register('ux.autocomplete.choice_type_extension', AutocompleteChoiceTypeExtension::class)
->setArguments([
Expand Down
11 changes: 0 additions & 11 deletions src/Autocomplete/src/Doctrine/EntityMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,6 @@ public function isEmbeddedClassProperty(string $propertyName): bool
return \array_key_exists($propertyNameParts[0], $this->metadata->embeddedClasses);
}

public function getPropertyMetadata(string $propertyName): array
{
trigger_deprecation('symfony/ux-autocomplete', '2.15.0', 'Calling EntityMetadata::getPropertyMetadata() is deprecated. You should stop using it, as it will be removed in the future.');

try {
return $this->getFieldMetadata($propertyName);
} catch (\InvalidArgumentException $e) {
return $this->getAssociationMetadata($propertyName);
}
}

/**
* @internal
*
Expand Down
110 changes: 0 additions & 110 deletions src/Autocomplete/src/Form/AutocompleteEntityTypeSubscriber.php

This file was deleted.

7 changes: 1 addition & 6 deletions src/Autocomplete/src/Form/BaseEntityAutocompleteType.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
use Symfony\Component\OptionsResolver\Options;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\UX\Autocomplete\Form\ChoiceList\Loader\ExtraLazyChoiceLoader;

/**
* All form types that want to expose autocomplete functionality should use this for its getParent().
Expand All @@ -43,11 +42,7 @@ public function configureOptions(OptionsResolver $resolver): void
return null;
}

if (class_exists(LazyChoiceLoader::class)) {
return new LazyChoiceLoader($loader);
}

return new ExtraLazyChoiceLoader($loader);
return new LazyChoiceLoader($loader);
};

$resolver->setDefaults([
Expand Down

This file was deleted.

118 changes: 0 additions & 118 deletions src/Autocomplete/src/Form/ParentEntityAutocompleteType.php

This file was deleted.

Loading