New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support user defined repositories #857
Conversation
use Doctrine\ORM\Mapping\ClassMetadata; | ||
use Doctrine\ORM\Repository\RepositoryFactory; | ||
use Psr\Container\ContainerInterface; | ||
use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass; | ||
use Doctrine\Common\Persistence\ObjectRepository; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
duplicate
f0dd12e
to
e0649ca
Compare
Errors looks not related. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An additional test should verify that it is indeed possible to use a repository class that doesn't extend EntityRepository
- you can use the other tests in ContainerRepositoryFactory
for guidance.
@alcaeus feedback done 😃 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functionality looks good - @kimhemsoe or @Majkl578, could you confirm that checking for ObjectRepository
is safe for ORM 2.4?
A verification was done with EntityRepository inheritance. This commit drop it in favor of a check on interface ObjectRepository which allow user to define its own complete repository.
Older versions of PHP does not support the current implementation so I changed it. Also in order to be able to run the test suite with old versions of Doctrine, this change was also required (because the interface differ).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@Nek- Thanks |
A verification was done with EntityRepository inheritance. This commit drop it in favor of a check on interface ObjectRepository which allow the user to define its own complete repository.
Closes #856