[PR #498] [MERGED] Improve DocBlock annotations of generated entities #8293

Closed
opened 2026-01-22 15:59:14 +01:00 by admin · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/doctrine/orm/pull/498
Author: @lanthaler
Created: 11/2/2012
Status: Merged
Merged: 11/3/2012
Merged by: @guilhermeblanco

Base: masterHead: improve-generated-entity-doc


📝 Commits (1)

  • 1b7ca67 Improve DocBlock annotations of generated entities

📊 Changes

1 file changed (+2 additions, -2 deletions)

View changed files

📝 lib/Doctrine/ORM/Tools/EntityGenerator.php (+2 -2)

📄 Description

Currently, the DocBlock annotations for member variables contain the variable name as description which is redundant and should be removed. Furthermore the class is annotated with the FQN instead of just the name. This makes automatically generated documentation quite ugly.

These changes will result in entities that as follows

/**
 * User
 *
 * @ORM\Table()
 * @ORM\Entity
 */
class User
{
    /**
     * @var string
     *
     * @ORM\Column(name="name", type="string", length=255)
     */
    private $name;

instead of this:

/**
 * Some\Completely\Random\Namespace\User    <--- FQN is not needed here
 *
 * @ORM\Table()
 * @ORM\Entity
 */
class User
{
    /**
     * @var string $name  <--- description is better left blank instead of using variable name
     *
     * @ORM\Column(name="name", type="string", length=255)
     */
    private $name;

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/doctrine/orm/pull/498 **Author:** [@lanthaler](https://github.com/lanthaler) **Created:** 11/2/2012 **Status:** ✅ Merged **Merged:** 11/3/2012 **Merged by:** [@guilhermeblanco](https://github.com/guilhermeblanco) **Base:** `master` ← **Head:** `improve-generated-entity-doc` --- ### 📝 Commits (1) - [`1b7ca67`](https://github.com/doctrine/orm/commit/1b7ca67fdb08e934c3652eae0b9be5f6981b328c) Improve DocBlock annotations of generated entities ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `lib/Doctrine/ORM/Tools/EntityGenerator.php` (+2 -2) </details> ### 📄 Description Currently, the DocBlock annotations for member variables contain the variable name as description which is redundant and should be removed. Furthermore the class is annotated with the FQN instead of just the name. This makes automatically generated documentation quite ugly. These changes will result in entities that as follows ``` /** * User * * @ORM\Table() * @ORM\Entity */ class User { /** * @var string * * @ORM\Column(name="name", type="string", length=255) */ private $name; ``` instead of this: ``` /** * Some\Completely\Random\Namespace\User <--- FQN is not needed here * * @ORM\Table() * @ORM\Entity */ class User { /** * @var string $name <--- description is better left blank instead of using variable name * * @ORM\Column(name="name", type="string", length=255) */ private $name; ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
admin added the pull-request label 2026-01-22 15:59:14 +01:00
admin closed this issue 2026-01-22 15:59:15 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#8293