php - 如何在 Doctrine 中使用 "comment out"注释条目

标签 php doctrine-orm

给定以下带有 PHPDoc 注释的属性,其中包含 Doctrine 的注释:

/**
 * @ORM\Column(name="id", type="integer")
 * @ORM\Id
 * @ORM\GeneratedValue(strategy="AUTO")
 */
private $id;

“注释掉”注释行之一的最佳方法是什么?例如像这样:

/**
 * @ORM\Column(name="id", type="integer")
 * @ORM\Id
 * //Comment out please// @ORM\GeneratedValue(strategy="AUTO")
 */
private $id;

这样做是否有受支持的方式或一般惯例?

最佳答案

只需删除用于注释识别的@。

/**
 * @ORM\Column(name="id", type="integer")
 * @ORM\Id
 * ORM\GeneratedValue(strategy="AUTO")
 */
private $id;

关于php - 如何在 Doctrine 中使用 "comment out"注释条目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13175078/

相关文章:

php - FOSUserBundle:如何允许注册、确认但不激活?

sql - 更新数据库架构 Doctrine 时执行 sql 脚本

php - Doctrine 2 需要 Symfony 吗?

mysql - Doctrine2 以错误的方式将日期类型值转换为 SQL 格式

php - 学说 2.0 Bootstrap ?

php - 排序 multidim 数组 : prioritize if column contains substring, 然后按第二列排序

php - 可排序表安全问题

PhpStorm Xdebug 过早退出方法

php - 在 apache 中出现任何错误时显示 500 错误

Symfony 2 覆盖实体并添加额外属性