doctrine/doctrine2 — pull request #1052 by cstea (2014-06-07 03:00:33+00:00)
Title: [DDC-3087] Add readonly attribute to Field ORM Mapping to avoid generating a setter

The change allows one to enter a field attribute called "readonly". What this does is when using doctrine:generate:entities, only a getter is generated, setter is omitted.

Example use on a created field that uses Timestampable and should not have a setter:
/**
* @var /DateTime $createdAt
*
* @Gedmo\Timestampable(on="create")
* @ORM\Column(type="datetime", readonly=true)
*/
private $createdAt;