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

Ensure that AbstractHydrator#hydrateAll() detaches the hydrator from the event manager #6623

Merged
merged 1 commit into from
Aug 16, 2017

Conversation

echo511
Copy link
Contributor

@echo511 echo511 commented Aug 13, 2017

I think someone overlooked hydrateAll() method and edited only iterate(). #1515

As a result an event listener is not added which can cause problems if EventManager implementation does not check for existence of a listener upon its removal.

In my case it causes E_NOTICE (undefined index) because of https://github.com/Kdyby/Events/blob/master/src/Events/EventManager.php#L198

If my PR should be altered (commit message, etc.) please let me know.

@Ocramius
Copy link
Member

@echo511 this still requires a test case

@echo511
Copy link
Contributor Author

echo511 commented Aug 13, 2017

@Ocramius OK, I'll do it as a fix of DDC-3146 and its test case? Where should it go? On top of 2.5.8?

@echo511 echo511 changed the base branch from master to 2.5 August 13, 2017 20:44
@Ocramius
Copy link
Member

@echo511 all patches should go against master (this one included) - backporting is up to us

# Conflicts:
#	tests/Doctrine/Tests/ORM/Functional/Ticket/DDC3146Test.php
@echo511 echo511 changed the base branch from 2.5 to master August 13, 2017 22:46
@Ocramius Ocramius changed the title Fix AbstractHydrator Ensure that AbstractHydrator#hydrateAll() detaches the hydrator from the event manager Aug 16, 2017
@Ocramius Ocramius added the Bug label Aug 16, 2017
@Ocramius Ocramius self-assigned this Aug 16, 2017
@Ocramius Ocramius added this to the 2.5.9 milestone Aug 16, 2017
Copy link
Member

@Ocramius Ocramius left a comment

Choose a reason for hiding this comment

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

LGTM! Preparing for merge, thanks @echo511!

Ocramius added a commit that referenced this pull request Aug 16, 2017
…ns-up-on-unit-of-work-clear-2.5' into 2.5

Close #6623
@Ocramius Ocramius merged commit f0ed4e8 into doctrine:master Aug 16, 2017
Ocramius added a commit that referenced this pull request Aug 16, 2017
Ocramius added a commit that referenced this pull request Aug 16, 2017
Ocramius added a commit that referenced this pull request Aug 16, 2017
@Ocramius
Copy link
Member

@echo511 I manually merged and backported to 2.5, thanks!

master: 57a9509
2.5: 1554af0

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

Successfully merging this pull request may close these issues.

2 participants