The conditional for old classes of Doctrine is wrong. The class_exists method only works for classes but the compatibility is over interfaces.
When you uses an old version of Doctrine, php raise the next warning:
Warning: Cannot declare interface Doctrine\Common\Persistence\Mapping\ClassMetadata, because the name is already in use in vendor/fakerphp/faker/src/Faker/ORM/Doctrine/backward-compatibility.php on line 6
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 1 week if no further activity occurs. Thank you for your contributions.
What is the reason for this PR?
The conditional for old classes of Doctrine is wrong. The
class_exists
method only works for classes but the compatibility is over interfaces. When you uses an old version of Doctrine, php raise the next warning:[ ] A new feature [ X] Fixed an issue
Author's checklist
[X ] Follow the Contribution Guide [ X] New features and changes are documented
Summary of changes
Fixed
backward-compatibility.php
Review checklist
CHANGELOG.md