[PR #108] [MERGED] short classname support for custom repository class #7723

Open
opened 2026-01-22 15:56:32 +01:00 by admin · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/doctrine/orm/pull/108
Author: @lenar
Created: 8/18/2011
Status: Merged
Merged: 8/18/2011
Merged by: @guilhermeblanco

Base: masterHead: patch-1


📝 Commits (1)

  • d7fbd2c short classname support for custom repository class

📊 Changes

1 file changed (+4 additions, -0 deletions)

View changed files

📝 lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php (+4 -0)

📄 Description

Short classnames are suppported for targetEntity, so to be consistent they should be supported for repositoryClass too:

<?php
namespace Acme\Blog;

/*
 * @Entity(repositoryClass="PostRepository")
 **/
class Post 
{
    /** @ManyToOne(targetEntity="Author") */
    private $author;

Currently only @Entity(repositoryClass="Acme\Blog\PostRepository") works.


🔄 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/108 **Author:** [@lenar](https://github.com/lenar) **Created:** 8/18/2011 **Status:** ✅ Merged **Merged:** 8/18/2011 **Merged by:** [@guilhermeblanco](https://github.com/guilhermeblanco) **Base:** `master` ← **Head:** `patch-1` --- ### 📝 Commits (1) - [`d7fbd2c`](https://github.com/doctrine/orm/commit/d7fbd2cd146e68601d5aa25c95358a160bb7efd2) short classname support for custom repository class ### 📊 Changes **1 file changed** (+4 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php` (+4 -0) </details> ### 📄 Description Short classnames are suppported for `targetEntity`, so to be consistent they should be supported for `repositoryClass` too: ``` <?php namespace Acme\Blog; /* * @Entity(repositoryClass="PostRepository") **/ class Post { /** @ManyToOne(targetEntity="Author") */ private $author; ``` Currently only `@Entity(repositoryClass="Acme\Blog\PostRepository")` works. --- <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:56:32 +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#7723