Automatically detect the discriminator type of attachments and parameters based on the chosen element IRI

Related to issue #502
This commit is contained in:
Jan Böhmer 2024-03-02 23:14:40 +01:00
parent e843286ea7
commit f3bea68011
26 changed files with 152 additions and 40 deletions

View file

@ -22,7 +22,7 @@ declare(strict_types=1);
namespace App\Entity\Attachments;
use App\Serializer\OverrideClassDenormalizer;
use App\Serializer\APIPlatform\OverrideClassDenormalizer;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Serializer\Attribute\Context;

View file

@ -23,7 +23,7 @@ declare(strict_types=1);
namespace App\Entity\Attachments;
use App\Entity\Parts\Category;
use App\Serializer\OverrideClassDenormalizer;
use App\Serializer\APIPlatform\OverrideClassDenormalizer;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Serializer\Attribute\Context;

View file

@ -23,7 +23,7 @@ declare(strict_types=1);
namespace App\Entity\Attachments;
use App\Entity\PriceInformations\Currency;
use App\Serializer\OverrideClassDenormalizer;
use App\Serializer\APIPlatform\OverrideClassDenormalizer;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Serializer\Attribute\Context;

View file

@ -23,7 +23,7 @@ declare(strict_types=1);
namespace App\Entity\Attachments;
use App\Entity\Parts\Footprint;
use App\Serializer\OverrideClassDenormalizer;
use App\Serializer\APIPlatform\OverrideClassDenormalizer;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Serializer\Attribute\Context;

View file

@ -23,7 +23,7 @@ declare(strict_types=1);
namespace App\Entity\Attachments;
use App\Entity\UserSystem\Group;
use App\Serializer\OverrideClassDenormalizer;
use App\Serializer\APIPlatform\OverrideClassDenormalizer;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Serializer\Attribute\Context;

View file

@ -42,7 +42,7 @@ declare(strict_types=1);
namespace App\Entity\Attachments;
use App\Entity\LabelSystem\LabelProfile;
use App\Serializer\OverrideClassDenormalizer;
use App\Serializer\APIPlatform\OverrideClassDenormalizer;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Serializer\Attribute\Context;

View file

@ -23,7 +23,7 @@ declare(strict_types=1);
namespace App\Entity\Attachments;
use App\Entity\Parts\Manufacturer;
use App\Serializer\OverrideClassDenormalizer;
use App\Serializer\APIPlatform\OverrideClassDenormalizer;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Serializer\Attribute\Context;

View file

@ -22,9 +22,8 @@ declare(strict_types=1);
namespace App\Entity\Attachments;
use App\Entity\Parts\Manufacturer;
use App\Entity\Parts\MeasurementUnit;
use App\Serializer\OverrideClassDenormalizer;
use App\Serializer\APIPlatform\OverrideClassDenormalizer;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Serializer\Attribute\Context;

View file

@ -23,14 +23,11 @@ declare(strict_types=1);
namespace App\Entity\Attachments;
use App\Entity\Parts\Part;
use App\Serializer\OverrideClassDenormalizer;
use App\Serializer\APIPlatform\OverrideClassDenormalizer;
use App\Serializer\TypeOverride\TypeOverridableSerializer;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\PropertyInfo\Type;
use Symfony\Component\Serializer\Attribute\Context;
use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
use Symfony\Component\Serializer\Normalizer\AbstractObjectNormalizer;
/**
* A attachment attached to a part element.

View file

@ -23,7 +23,7 @@ declare(strict_types=1);
namespace App\Entity\Attachments;
use App\Entity\ProjectSystem\Project;
use App\Serializer\OverrideClassDenormalizer;
use App\Serializer\APIPlatform\OverrideClassDenormalizer;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Serializer\Attribute\Context;

View file

@ -23,7 +23,7 @@ declare(strict_types=1);
namespace App\Entity\Attachments;
use App\Entity\Parts\StorageLocation;
use App\Serializer\OverrideClassDenormalizer;
use App\Serializer\APIPlatform\OverrideClassDenormalizer;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Serializer\Attribute\Context;

View file

@ -23,7 +23,7 @@ declare(strict_types=1);
namespace App\Entity\Attachments;
use App\Entity\Parts\Supplier;
use App\Serializer\OverrideClassDenormalizer;
use App\Serializer\APIPlatform\OverrideClassDenormalizer;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Serializer\Attribute\Context;

View file

@ -23,7 +23,7 @@ declare(strict_types=1);
namespace App\Entity\Attachments;
use App\Entity\UserSystem\User;
use App\Serializer\OverrideClassDenormalizer;
use App\Serializer\APIPlatform\OverrideClassDenormalizer;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Serializer\Attribute\Context;