Skip to content

[Bug] SearchProviderInterface createAssetSearch returns all elements #171

@mattamon

Description

@mattamon

For the dependencies it does not matter if we create a AssetSearch or ElementSearch.

The AssetSearch returns all element types non the less. May also be a problem with all other searches. (Did not test everything)

public function listRequiresDependencies(
      ElementParameters $elementParameters,
      DependencyParameters $parameters,
      UserInterface $user
  ): ElementSearchResult
  {
      $search = $this->searchProvider->createAssetSearch();
      $search->addModifier(
          new RequiresFilter(
              $elementParameters->getId(),
              ElementType::tryFrom($elementParameters->getType())
          )
      );

      return $this->elementSearchService->search($search);
  }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions