Skip to content

Instantly share code, notes, and snippets.

@voltel
voltel / PhraseWorkLastShot.php
Last active May 22, 2020 10:23
Files supporting question on Slack
<?php
namespace App\Entity\Work\Phrase;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="phrase_work_last_shot", uniqueConstraints={
* @ORM\UniqueConstraint(columns={"phrase", "user"})
@voltel
voltel / DecoratedApiNormalizerAwareInterface.php
Last active October 5, 2022 18:53
A trait that can be used by custom normalizer that was decorated by "api_platform.jsonld.normalizer.item"and/or "api_platform.serializer.normalizer.item"as described here: https://api-platform.com/docs/core/serialization/#decorating-a-serializer-and-adding-extra-data
<?php
namespace App\EntityNormalizer\Common;
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
use Symfony\Component\Serializer\SerializerAwareInterface;
interface DecoratedApiNormalizerAwareInterface extends
DenormalizerInterface,