[DCOM-219] [GH-301] fix hasPublicMethod implementations for abstract functions in ReflectionService Created: 10/Oct/13  Updated: 03/Feb/14  Resolved: 03/Feb/14

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4.2

Type: Bug Priority: Major
Reporter: Doctrine Bot Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

This issue is created automatically through a Github pull request on behalf of kmohrf:

Url: https://github.com/doctrine/common/pull/301

Message:

Since php >=5.4.8 the method is_callable returns false for
abstract functions. As the documentation for the
hasPublicMethod method states that it is sufficient
for the class to have a public method with that name it���s
not necessary to check whether the method is abstract or not.

The mentioned method is currently used in the doctrine2-orm
project where it helps with the validation of lifecycle callbacks.
As lifecycle callbacks must be callable but considering the fact
that abstract functions can only be used in abstract classes it
should be OK to rely on php for the assumption that the method
is in fact not abstract when it is called because php would be
unable to instantiate abstract classes.

this fixes DDC-2708.

there are currently no tests in this pull request. i���d volunteer for writing one or two (one for common, one for orm) but i would like to talk to someone first .



 Comments   
Comment by Doctrine Bot [ 03/Feb/14 ]

A related Github Pull-Request [GH-301] was closed:
https://github.com/doctrine/common/pull/301

Generated at Fri Apr 18 21:01:42 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.