Skip to content

[Doctrine] Cleaning up the config code samples #17755

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
Feb 11, 2023

Conversation

ThomasLandauer
Copy link
Contributor

Page: https://symfony.com/doc/5.4/doctrine/multiple_entity_managers.html

Things I've changed:

  1. Moved defaultConnection downwards (YAML & PHP). Setting the default before defining any connection looked awkward.
  2. Removed driver, server_version, charset. As I see it on https://symfony.com/doc/current/doctrine.html#configuring-the-database, the recommended way is to set this inside .env. Besides, it distracts from the important points here.
  3. Renamed DATABASE_CUSTOMER_URL to CUSTOMER_DATABASE_URL - in accordance with the way the dependency injection works: EntityManagerInterface $customerEntityManager.
    Plus renaming emDefault to defaultEntityManager in PHP config.

@javiereguiluz javiereguiluz added this to the 5.4 milestone Feb 11, 2023
@carsonbot carsonbot changed the title Cleaning up the config code samples [Doctrine] Cleaning up the config code samples Feb 11, 2023
@javiereguiluz
Copy link
Member

I like this change. The result is much more clear. Thanks Thomas!

@javiereguiluz javiereguiluz merged commit bd0595e into symfony:5.4 Feb 11, 2023
@ThomasLandauer ThomasLandauer deleted the patch-6 branch February 11, 2023 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants