Skip to content

Commit

Permalink
Support for trait mapping files
Browse files Browse the repository at this point in the history
  • Loading branch information
bigfoot90 committed Jan 5, 2022
1 parent 9f22673 commit f2c85ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Doctrine/Persistence/Mapping/RuntimeReflectionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ public function __construct()
*/
public function getParentClasses($class)
{
if (! class_exists($class)) {
if (! (class_exists($class) || trait_exists($class)) ) {
throw MappingException::nonExistingClass($class);
}

$parents = class_parents($class);
$parents = class_parents($class) + class_uses($class);

assert($parents !== false);

Expand Down

0 comments on commit f2c85ac

Please sign in to comment.