Skip to content
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

Modified Hydrators to be per-query instances instead of a singleton-like approach #738

Merged
merged 2 commits into from
Jul 29, 2013

Conversation

guilhermeblanco
Copy link
Member

This fixes an old issue we have where we have a Query that triggers an entity-specific postLoad event which attempts to do another Query.
In this situation, developer will face an "Attempt to call method on a null object" error on PHP.

@doctrinebot
Copy link

Hello,

thank you for creating this pull request. I have automatically opened an issue
on our Jira Bug Tracker for you. See the issue link:

http://www.doctrine-project.org/jira/browse/DDC-2578

We use Jira to track the state of pull requests and the versions they got
included in.

@Ocramius
Copy link
Member

@guilhermeblanco was removing API necessary here?

@guilhermeblanco
Copy link
Member Author

@Ocramius it was not used anywhere else.

@Ocramius
Copy link
Member

Yes, but it's in an interface...
On 29 Jul 2013 04:10, "Guilherme Blanco" [email protected] wrote:

@Ocramius https://github.com/Ocramius it was not used anywhere else.


Reply to this email directly or view it on GitHubhttps://github.com//pull/738#issuecomment-21696267
.

@guilhermeblanco
Copy link
Member Author

@Ocramius which got created only on master because of EntityManagerDecorator (one of my modified files).

@Ocramius
Copy link
Member

Ah, wasn't aware of that. Nothing to argue about then :)
On 29 Jul 2013 04:14, "Guilherme Blanco" [email protected] wrote:

@Ocramius https://github.com/Ocramius which got created only on master
because of EntityManagerDecorator (one of my modified files).


Reply to this email directly or view it on GitHubhttps://github.com//pull/738#issuecomment-21696362
.

@@ -224,14 +224,6 @@ public function getUnitOfWork()
/**
* {@inheritdoc}
*/
public function getHydrator($hydrationMode)
Copy link
Member

Choose a reason for hiding this comment

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

this is a BC break, people are using this. You should delegate that call to newHydrator.

@Ocramius
Copy link
Member

@beberlei the API is not existing in 2.3.x. Would you still consider it a break since it's in the 2.4.x-RCy?

@beberlei
Copy link
Member

@Ocramius err yes of course, BC breaks are only allowed in MAJOR versions, i.e. 2.* => 3.0

guilhermeblanco added a commit that referenced this pull request Jul 29, 2013
Modified Hydrators to be per-query instances instead of a singleton-like approach
@guilhermeblanco guilhermeblanco merged commit 8d13601 into master Jul 29, 2013
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