Skip to content

Commit f2c85ac

Browse files
committed
Support for trait mapping files
1 parent 9f22673 commit f2c85ac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Doctrine/Persistence/Mapping/RuntimeReflectionService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ public function __construct()
3535
*/
3636
public function getParentClasses($class)
3737
{
38-
if (! class_exists($class)) {
38+
if (! (class_exists($class) || trait_exists($class)) ) {
3939
throw MappingException::nonExistingClass($class);
4040
}
4141

42-
$parents = class_parents($class);
42+
$parents = class_parents($class) + class_uses($class);
4343

4444
assert($parents !== false);
4545

0 commit comments

Comments
 (0)