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

Use of ObjectManager->getClassMetadata on the className in ReferenceRepository methods breaks expected behaviour #426

Open
hitsuji opened this issue Feb 8, 2023 · 0 comments

Comments

@hitsuji
Copy link

hitsuji commented Feb 8, 2023

Symfony Documentation suggests Fixtures can share any PHP object between each other using the addReference and getReference methods. https://symfony.com/bundles/DoctrineFixturesBundle/current/index.html#sharing-objects-between-fixtures

However,
tracing through these calls through to the ReferenceRepository, both will eventually call ObjectManager->getClassMetadata which will require the classes namespace to be configure in the ORM EntityManager, otherwise throwing an error.

So attempting to store an stdClass will throw an error similar to: The class 'stdClass' was not found in the chain configured namespaces App\Entity.

Either Documentation needs to be corrected or the behavior needs to be corrected.

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

No branches or pull requests

1 participant