Skip to content

Commit

Permalink
Merge pull request #4198 from neos/bugfix/allow-non-entity-asset-vari…
Browse files Browse the repository at this point in the history
…ants

BUGFIX: Allow non-entity asset variants
  • Loading branch information
mhsdesign authored Feb 22, 2024
2 parents 85c5e2d + 8e2e1b9 commit 30b7afa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Neos.Media/Classes/Domain/Repository/AssetRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,10 @@ protected function addAssetVariantToQueryConstraints(QueryInterface $query): voi
$variantsConstraints = [];
$variantClassNames = $this->reflectionService->getAllImplementationClassNamesForInterface(AssetVariantInterface::class);
foreach ($variantClassNames as $variantClassName) {
if (!$this->reflectionService->isClassAnnotatedWith($variantClassName, Flow\Entity::class)) {
// ignore non-entity classes to prevent "class schema found" error
continue;
}
$variantsConstraints[] = 'e NOT INSTANCE OF ' . $variantClassName;
}

Expand Down

0 comments on commit 30b7afa

Please sign in to comment.