Skip to content

[Testing] Update database.rst #19394

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
merged 1 commit into from
Jan 17, 2024
Merged

Conversation

JeroenMoonen
Copy link
Contributor

Updated typo

@JeroenMoonen JeroenMoonen changed the title Update database.rst [Testing] Update database.rst Jan 8, 2024
@@ -98,7 +98,7 @@ so, get the entity manager via the service container as follows::

class ProductRepositoryTest extends KernelTestCase
{
private \Doctrine\ORM\EntityManager $entityManager;
private \Doctrine\Persistence\ObjectManager $entityManager;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please import the class

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've imported the class while merging.

@xabbuh
Copy link
Member

xabbuh commented Jan 8, 2024

Can you explain why you think that this change is necessary?

@javiereguiluz javiereguiluz changed the base branch from 7.0 to 6.3 January 17, 2024 10:43
@javiereguiluz javiereguiluz requested a review from xabbuh as a code owner January 17, 2024 10:43
@javiereguiluz javiereguiluz merged commit 899e2fe into symfony:6.3 Jan 17, 2024
@javiereguiluz
Copy link
Member

@xabbuh this article is one of the few in Symfony Docs that uses ObjectManager (it uses it in the example above the change made here). So, for consistency, let's use it in all the examples of this page.

In a separate PR, we might want to change all ObjectManager examples in docs (there aren't many) in favor of using EntityManagerInterface (which is much more common).

In any case, thanks @JeroenMoonen for your contribution.

javiereguiluz added a commit that referenced this pull request Jan 23, 2024
…ger/repository (xabbuh)

This PR was merged into the 6.3 branch.

Discussion
----------

use entity manager and repository instead of object manager/repository

see #19394 (comment)

Commits
-------

cf8bed8 use entity manager and repository instead of object manager/repository
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.

5 participants