Skip to content

Commit

Permalink
Include the omDrivers default driver when creating our own DriverChain
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert-Jan Bijl committed Nov 16, 2023
1 parent 96b3749 commit d1b5c80
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Mapping/Driver/DoctrineAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ public static function fromMetadataDriver(MappingDriver $omDriver)
$drivers[] = self::fromMetadataDriver($nestedOmDriver);
}

// the DriverChain may also have a defaultDriver, we should not forget to add that as well
// mainly here to make this work in combination with Sylius
if (null !== $omDriver->getDefaultDriver()) {
$drivers[] = self::fromMetadataDriver($omDriver->getDefaultDriver());
}

return new DriverChain($drivers);
}

Expand Down

0 comments on commit d1b5c80

Please sign in to comment.