FakerPHP / Faker

Faker is a PHP library that generates fake data for you
https://fakerphp.github.io
Other
3.63k stars 353 forks source link

fix (Doctrine backward-compatibility) Fixed conditional to avoid raise warning when old interface exists #862

Closed Wtyd closed 2 weeks ago

Wtyd commented 9 months ago

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:

 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

[ ] 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

stale[bot] commented 8 months ago

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.