Doctrine Common
  1. Doctrine Common
  2. DCOM-192

[GH-274] Improve code on loadMetadata() to verify if class exists

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.4
    • Component/s: None
    • Labels:
      None

      Description

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

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

      Message:

      Improve code on loadMetadata() to verify if class exists, avoid a later warning when calling class_parents()

      Instead throws a \RuntimeException if class doesn't exists.

      Before changing code, just after add test:
      ```
      1) Doctrine\Tests\Common\Persistence\Mapping\ClassMetadataFactoryTest::testGetMetadataForAbsentClass
      class_parents(): Class Doctrine\Tests\Common\Persistence\Mapping\AbsentClass does not exist and could not be loaded

      /home/www/common/lib/Doctrine/Common/Persistence/Mapping/RuntimeReflectionService.php:38
      /home/www/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php:257
      /home/www/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php:281
      /home/www/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php:212
      /home/www/common/tests/Doctrine/Tests/Common/Persistence/Mapping/ClassMetadataFactoryTest.php:44
      ```

        Activity

        Doctrine Bot created issue -
        Hide
        Doctrine Bot added a comment -

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

        Show
        Doctrine Bot added a comment - A related Github Pull-Request [GH-274] was closed: https://github.com/doctrine/common/pull/274
        Marco Pivetta made changes -
        Field Original Value New Value
        Assignee Benjamin Eberlei [ beberlei ] Marco Pivetta [ ocramius ]
        Hide
        Marco Pivetta added a comment -

        Merged

        Show
        Marco Pivetta added a comment - Merged
        Marco Pivetta made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Benjamin Eberlei made changes -
        Fix Version/s 2.4 [ 10327 ]
        Benjamin Eberlei made changes -
        Issue Type Bug [ 1 ] Improvement [ 4 ]

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

          People

          • Assignee:
            Marco Pivetta
            Reporter:
            Doctrine Bot
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: