Skip to content

Commit 8b70334

Browse files
committed
minor #19763 [Testing] Fix nullable entitymanager in functional repository tests (Constantin Ross)
This PR was merged into the 6.4 branch. Discussion ---------- [Testing] Fix nullable entitymanager in functional repository tests 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:** ```php private EntityManager $entityManager; ``` **Change:** ```php private ?EntityManager $entityManager; ``` Commits ------- c4ed2ed Fix nullable entitymanager in functional repository tests
2 parents fcef907 + c4ed2ed commit 8b70334

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

testing/database.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ so, get the entity manager via the service container as follows::
9999

100100
class ProductRepositoryTest extends KernelTestCase
101101
{
102-
private EntityManager $entityManager;
102+
private ?EntityManager $entityManager;
103103

104104
protected function setUp(): void
105105
{

0 commit comments

Comments
 (0)