Doctrine Common
  1. Doctrine Common
  2. DCOM-108

[GH-184] Fix bug in classExists when using multiple autoloaders (i.e. ZF2)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

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

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

      Message:

      The autoloading routine in the classExists method makes the assumption the autoload method always returns a value (i.e. no void) when the autoloading of a class is succesfull. When you have multiple autoloaders registered to the spl stack this can lead to problems. In my case I'm using ZF2 ClassmapAutoloader and StandardAutoloader as fallback. The classmapAutoloader returns nothing so the autoload method in the StandardAutoloader is called as well, because the for loop is continued. This results in a second include, and a fatal error "Cannot redeclare class" is triggered.

        Activity

        Benjamin Eberlei created issue -
        Hide
        Benjamin Eberlei added a comment -

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

        Show
        Benjamin Eberlei added a comment - A related Github Pull-Request [GH-184] was closed https://github.com/doctrine/common/pull/184
        Hide
        Benjamin Eberlei added a comment -

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

        Show
        Benjamin Eberlei added a comment - A related Github Pull-Request [GH-184] was reopened https://github.com/doctrine/common/pull/184
        Hide
        Marco Pivetta added a comment -

        Handled in DCOM-136

        Show
        Marco Pivetta added a comment - Handled in DCOM-136
        Marco Pivetta made changes -
        Field Original Value New Value
        Status Open [ 1 ] Closed [ 6 ]
        Assignee Benjamin Eberlei [ beberlei ] Marco Pivetta [ ocramius ]
        Resolution Duplicate [ 3 ]
        Hide
        Doctrine Bot added a comment -

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

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

        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={query=DCOM-108, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

          People

          • Assignee:
            Marco Pivetta
            Reporter:
            Benjamin Eberlei
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: