It is not a big deal, but I used to define constants and used them to define discriminator in ORM mapping of inheritance discriminator map.
/**
* @ORM\Entity(repositoryClass="RecordRepository")
* @ORM\Table(name="record")
* @ORM\InheritanceType("SINGLE_TABLE")
* @ORM\DiscriminatorColumn(name="discr", type="string")
* @ORM\DiscriminatorMap({
* Record::RECORD_TYPE_OFFER:"Offer",
* Record::RECORD_TYPE_ORDER:"Order",
* Record::RECORD_TYPE_INVOICE:"Invoice"
* })
* @ORM\HasLifecycleCallbacks
*/
abstract class Record implements Commentable, Editable, Deletable, DetailPath, Loggable
{
use LoggedEntity, CommentedEntity;
const RECORD_TYPE_INVOICE = 'INVOICE';
const RECORD_TYPE_OFFER = 'OFFER';
const RECORD_TYPE_ORDER = 'ORDER';
Skipper changes those constants after export to strings. It would be nice, if skipper detects these constant by having two colons in name and not putting those quotes in annotation.