Fixed issue with EntityImported that was caused by the changes to PartNormalizer

We now have a possibility to skip API Platforms serializer subsystem
This commit is contained in:
Jan Böhmer 2024-03-03 20:24:02 +01:00
parent 42e604245c
commit 33e36f3d2b
3 changed files with 100 additions and 3 deletions

View file

@ -119,10 +119,9 @@ class FileTypeFilterTools
//Convert jpg to .jpg
$element = '.'.$element;
}
//Prevent weird side effects
unset($element);
}
//Prevent weird side effects
unset($element);
$elements = array_unique($elements);

View file

@ -26,6 +26,7 @@ use App\Entity\Base\AbstractNamedDBElement;
use App\Entity\Base\AbstractStructuralDBElement;
use App\Entity\Parts\Category;
use App\Entity\Parts\Part;
use App\Serializer\APIPlatform\SkippableItemNormalizer;
use Composer\Semver\Constraint\Constraint;
use Symfony\Component\Validator\ConstraintViolationList;
use Symplify\EasyCodingStandard\ValueObject\Option;
@ -157,6 +158,8 @@ class EntityImporter
'create_unknown_datastructures' => $options['create_unknown_datastructures'],
'path_delimiter' => $options['path_delimiter'],
'partdb_import' => true,
//Disable API Platform normalizer, as we don't want to use it here
SkippableItemNormalizer::DISABLE_ITEM_NORMALIZER => true,
]);
//Ensure we have an array of entity elements.