Uploaded image for project: 'Doctrine Common'
  1. Doctrine Common
  2. DCOM-231

Lifecycle-Callback MappingExceptions for abstract functions in PHP >=5.4.8

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.4.2
    • Component/s: None
    • Security Level: All
    • Labels:
      None
    • Environment:
      Windows 7 x64, PHP 5.5.3

      Description

      Hi,

      i noticed that in PHP starting with Version 5.4.8 the ReflectionService implementations returns a different result for the hasPublicMethod function than in PHP <= 5.4.7 when called on an abstract function. This prevents me from defining a lifecycle callback on an abstract function for a mapped superclass.

      I think that at least for mapped supperclasses it should be checked if the class and the function is abstract so it can be assumed that every extending class has this function and it is in fact callable.

      The bug was introduced by a bugfix in PHP 5.4.8.

      cheers

      konrad

        Activity

        kmohrf Konrad Mohrfeldt created issue -
        kmohrf Konrad Mohrfeldt made changes -
        Field Original Value New Value
        Summary Lifecycle-Callback MappingExceptions for abstract functions in PHP 5.5 Lifecycle-Callback MappingExceptions for abstract functions in PHP >=5.4.8
        kmohrf Konrad Mohrfeldt made changes -
        Description Hi,

        i noticed that under PHP 5.5 the ReflectionService implementations returns a different result for the hasPublicMethod function than in PHP 5.4 when called on an abstract function. This prevents me from defining a lifecycle callback on an abstract function for a mapped superclass.

        I think that at least for mapped supperclasses it should be checked if the class and the function is abstract so it can be assumed that every extending class has this function and it is in fact callable.

        cheers

        konrad
        Hi,

        i noticed that in PHP starting with Version 5.4.8 the ReflectionService implementations returns a different result for the hasPublicMethod function than in PHP <= 5.4.7 when called on an abstract function. This prevents me from defining a lifecycle callback on an abstract function for a mapped superclass.

        I think that at least for mapped supperclasses it should be checked if the class and the function is abstract so it can be assumed that every extending class has this function and it is in fact callable.

        The bug was introduced by a bugfix in PHP 5.4.8. see https://bugs.php.net/bug.php?id=63111

        cheers

        konrad
        kmohrf Konrad Mohrfeldt made changes -
        Description Hi,

        i noticed that in PHP starting with Version 5.4.8 the ReflectionService implementations returns a different result for the hasPublicMethod function than in PHP <= 5.4.7 when called on an abstract function. This prevents me from defining a lifecycle callback on an abstract function for a mapped superclass.

        I think that at least for mapped supperclasses it should be checked if the class and the function is abstract so it can be assumed that every extending class has this function and it is in fact callable.

        The bug was introduced by a bugfix in PHP 5.4.8. see https://bugs.php.net/bug.php?id=63111

        cheers

        konrad
        Hi,

        i noticed that in PHP starting with Version 5.4.8 the ReflectionService implementations returns a different result for the hasPublicMethod function than in PHP <= 5.4.7 when called on an abstract function. This prevents me from defining a lifecycle callback on an abstract function for a mapped superclass.

        I think that at least for mapped supperclasses it should be checked if the class and the function is abstract so it can be assumed that every extending class has this function and it is in fact callable.

        The bug was introduced by a [bugfix in PHP|https://bugs.php.net/bug.php?id=63111] 5.4.8.

        cheers

        konrad
        Hide
        kmohrf Konrad Mohrfeldt added a comment -

        i’ve created a pull request to fix this issue. see https://github.com/doctrine/common/pull/301

        Show
        kmohrf Konrad Mohrfeldt added a comment - i’ve created a pull request to fix this issue. see https://github.com/doctrine/common/pull/301
        Hide
        kmohrf Konrad Mohrfeldt added a comment -

        oh… and… this bug should probably be moved to common as it affects orm but is caused in common

        Show
        kmohrf Konrad Mohrfeldt added a comment - oh… and… this bug should probably be moved to common as it affects orm but is caused in common
        beberlei Benjamin Eberlei made changes -
        Project Doctrine 2 - ORM [ 10032 ] Doctrine Common [ 10043 ]
        Key DDC-2708 DCOM-231
        Affects Version/s 2.4 [ 10327 ]
        Affects Version/s 2.4 [ 10321 ]
        Component/s ORM [ 10012 ]
        Security All [ 10000 ]
        beberlei Benjamin Eberlei made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.4.2 [ 10525 ]
        Resolution Fixed [ 1 ]
        Hide
        doctrinebot Doctrine Bot added a comment -

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

        Show
        doctrinebot Doctrine Bot added a comment - A related Github Pull-Request [GH-301] was closed: https://github.com/doctrine/common/pull/301

        This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

        • Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={expand=changesets[0:20].revisions[0:29],reviews, query=DCOM-231}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

          People

          • Assignee:
            beberlei Benjamin Eberlei
            Reporter:
            kmohrf Konrad Mohrfeldt
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: