Skip to content

Update the DSN format in XML, it should be escaped #8977

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 2 commits into from
Jan 5, 2018

Conversation

pouyana
Copy link
Contributor

@pouyana pouyana commented Jan 4, 2018

So using the same setting gives

Could not load "/var/www/app/phpunit.xml.dist".
EntityRef: expecting ';'

The DSN should be escaped before added in the XML file.

So using the same setting gives

```
Could not load "/var/www/app/phpunit.xml.dist".
EntityRef: expecting ';'
```

The DSN should be escaped before added in the XML file.
Copy link
Member

@javiereguiluz javiereguiluz left a comment

Choose a reason for hiding this comment

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

@pouyana thanks for this fix. You are right. However, since this doc was written, Symfony has changed a bit the Doctrine config.

Now in the env var we only put the host, username and password --> https://github.com/symfony/recipes/blob/3cb189ae3473066e3cb4d405c19c5fdc051fecee/doctrine/doctrine-bundle/1.6/manifest.json#L13

And in the normal Doctrine config file we put the other values -> https://github.com/symfony/recipes/blob/3cb189ae3473066e3cb4d405c19c5fdc051fecee/doctrine/doctrine-bundle/1.6/config/packages/doctrine.yaml#L11-L13 because they don't change as often as the other config.

So, I've reworded a bit your changes. Thanks and congrats on your first Symfony Docs contribution!

@javiereguiluz javiereguiluz merged commit a1486af into symfony:4.0 Jan 5, 2018
javiereguiluz added a commit that referenced this pull request Jan 5, 2018
…na, javiereguiluz)

This PR was merged into the 4.0 branch.

Discussion
----------

Update the DSN format in XML, it should be escaped

So using the same setting gives

```
Could not load "/var/www/app/phpunit.xml.dist".
EntityRef: expecting ';'
```

The DSN should be escaped before added in the XML file.

Commits
-------

a1486af Removed additional Doctrine config params
cbffec3 Update the DSN format in XML, it should be escaped
@pouyana pouyana deleted the patch-1 branch January 29, 2018 17:15
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.

3 participants