Skip to content

[Testing] Fix nullable entitymanager in functional repository tests #19763

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

Merged

Conversation

c0nst4ntin
Copy link

In Version 6.4 the a type was introduced to the $entityManager property in this example.
In the tearDown() method the entityManager is set to null ($this->entityManager = null;).

Docs (v5.x): https://symfony.com/doc/5.x/testing/database.html#functional-testing-of-a-doctrine-repository
Docs (v6.4): https://symfony.com/doc/6.4/testing/database.html#functional-testing-of-a-doctrine-repository

Currently:

private EntityManager $entityManager;

Change:

private ?EntityManager $entityManager;

@carsonbot carsonbot added this to the 6.4 milestone Apr 6, 2024
@carsonbot carsonbot changed the title Fix nullable entitymanager in functional repository tests [Testing] Fix nullable entitymanager in functional repository tests Apr 9, 2024
@javiereguiluz
Copy link
Member

Good catch Constantin! Thanks and congrats on your first Symfony Docs contribution 🎉

@javiereguiluz javiereguiluz merged commit 8b70334 into symfony:6.4 Apr 9, 2024
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.

4 participants