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

Add 'entity_listener_resolver' config key #199

Merged

Conversation

danizord
Copy link
Contributor

@danizord danizord commented Apr 1, 2013

This introduces the possibility to use a custom implementation of Doctrine\ORM\Mapping\EntityListenerResolver
by setting entity_listener_resolver config key.

));
}

$config->setEntityListenerResolver($serviceLocator->get($entityListenerResolver));
Copy link
Member

Choose a reason for hiding this comment

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

This method is only available in master right now. You should probably throw an exception if method_exists returns false, or this PR has to wait lock onto 2.4 (which may be possible in 3~4 weeks)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can wait for 2.4 (:

@Ocramius
Copy link
Member

Ocramius commented Apr 1, 2013

Needs docs :)

@danizord
Copy link
Contributor Author

danizord commented Apr 1, 2013

Travis fail fixed by zendframework/zendframework#4216

@Ocramius
Copy link
Member

@danizord can you rebase this one?

@danizord
Copy link
Contributor Author

@Ocramius done.

@ghost ghost assigned Ocramius Jun 25, 2013
@Ocramius
Copy link
Member

@danizord ok, a couple more things:

  • documentation for the feature (in the .md files)
  • the @covers annotation need a FQCN (prefixed with \) for 5.3.3
  • the ORM dependency must be bumped to 2.4 in composer.json (and UPGRADE.md needs to be modified)

@@ -75,6 +75,21 @@ public function createService(ServiceLocatorInterface $serviceLocator)
}
}

if ($entityListenerResolver = $options->getEntityListenerResolver()) {
if (is_string($entityListenerResolver)) {
if (!$serviceLocator->has($entityListenerResolver)) {
Copy link
Member

Choose a reason for hiding this comment

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

Should probably just directly call get and let the exception bubble up

@bakura10
Copy link
Member

Any news about this? :)

@danizord
Copy link
Contributor Author

danizord commented Jan 2, 2014

I'll finish it next weekend.

@bakura10
Copy link
Member

News? :D

@bramstroker
Copy link

@danizord PR looks nice, I could use this as well. Are you able to finish this?

@danizord
Copy link
Contributor Author

danizord commented Feb 4, 2014

Sorry for delay guys (I completely forgot this PR), I'm finishing now.

@bramstroker
Copy link

@danizord Thanks for your efforts. We are all busy men, and forget to finish tasks from time to time ;-)

@danizord
Copy link
Contributor Author

danizord commented Feb 4, 2014

Ping @Ocramius - done ;)

) {
$this->entityListenerResolver = $entityListenerResolver;

return $this;
Copy link
Member

Choose a reason for hiding this comment

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

Can we avoid this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The entire class has fluent interface, It should not be homogeneous?

To ensure that the is_string call is executed last
@Ocramius Ocramius added this to the 0.9.0 milestone Feb 5, 2014
Ocramius added a commit that referenced this pull request Feb 5, 2014
…resolver

Add 'entity_listener_resolver' config key
@Ocramius Ocramius merged commit 1582e7d into doctrine:master Feb 5, 2014
@gianarb gianarb mentioned this pull request Apr 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants