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

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

Original Pull Request: https://github.com/doctrine/orm/pull/108

State: closed
Merged: Yes


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.

**Original Pull Request:** https://github.com/doctrine/orm/pull/108 **State:** closed **Merged:** Yes --- 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.
admin added the pull-request label 2026-01-22 15:56:33 +01:00
admin closed this issue 2026-01-22 15:56:33 +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#7725