Given the following property with PHPDoc comment containing an annotation for Doctrine:
/**
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
What is the best way to “comment out” one of the annotation lines? e.g. something like this:
/**
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* //Comment out please// @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
Is there a supported way, or a general convention for doing this?
I usually add the
@fooannotation (this class will not issue any problem) in order to comment out inside of dockblocks. You can register a global annotation for ignore:This will be applied as:
You can verify it at doctrine 2.1 documentation:
According to quote below, the example should not throws any exception because the
@fooannotation was registed previously