Skip to content

Loading…

DCOM-192: [GH-274] Improve code on loadMetadata() to verify if class exists #494

Closed
doctrinebot opened this Issue · 4 comments

2 participants

@doctrinebot

Jira issue originally created by user @doctrinebot:

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

Url: #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
@doctrinebot

Comment created by @doctrinebot:

A related Github Pull-Request [GH-274] was closed:
#274

@doctrinebot

Comment created by @ocramius:

Merged

@doctrinebot

Issue was closed with resolution "Fixed"

@doctrinebot

Comment created by @doctrinebot:

A related Github Pull-Request [GH-274] was closed:
doctrine/dbal#274

@Ocramius Ocramius was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.4 milestone
@doctrinebot doctrinebot closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.