Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 4 commits into
base: 1.23
Choose a base branch
from

Conversation

Wtyd
Copy link

@Wtyd Wtyd commented Feb 22, 2024

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

  • All checks have passed
  • Changes are added to the CHANGELOG.md
  • Changes are approved by maintainer

Copy link

stale bot commented Mar 13, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant