Skip to content

Change the base class for Doctrine repositories #4

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

Merged
merged 1 commit into from
Nov 11, 2017
Merged

Conversation

fabpot
Copy link
Member

@fabpot fabpot commented Nov 11, 2017

No description provided.

{
public function __construct(RegistryInterface $registry)
{
parent::__construct($registry, {{ repository_class_name }}::class);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self::class?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{{ entity_class_name }} actually

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I the explicitness, but maybe it's not great if people rename the class at some point.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed :)

@fabpot fabpot merged commit 4f0114d into master Nov 11, 2017
fabpot added a commit that referenced this pull request Nov 11, 2017
This PR was merged into the master branch.

Discussion
----------

Change the base class for Doctrine repositories

Commits
-------

4f0114d changed the base class for Doctrine repositories
@chalasr chalasr deleted the doctrine-tweak branch November 12, 2017 03:41
{
public function __construct(RegistryInterface $registry)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parent class constructor only expects an instance of Doctrine\Common\Persistence\ManagerRegistry. Do we really want to restrict that here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants