Skip to content

Override DATABASE_URL by setting default parameter's value #573

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
May 31, 2017

Conversation

voronkovich
Copy link
Contributor

This approach is more flexible than we used in #572

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.

@voronkovich that was the solution I was looking for and I wasn't able to find it! Much better than suing the PHPUnit config file.

Looking at it, it's so obvious now 😄

Thanks!

@dmaicher
Copy link
Contributor

Indeed much nicer 👍

@javiereguiluz javiereguiluz merged commit 9ea6fc8 into symfony:master May 31, 2017
javiereguiluz added a commit that referenced this pull request May 31, 2017
… (voronkovich)

This PR was merged into the master branch.

Discussion
----------

Override DATABASE_URL by setting default parameter's value

This approach is more flexible than we used in #572

Commits
-------

9ea6fc8 Override DATABASE_URL by setting default parameter's value
@ancyrweb
Copy link

Just wondering... now to use a testing database we must define this in an environment variable set in a phpunit.xml.dist which is suggested to be committed with the project. But these credentials are unique to each machine, And I certainly don't want to commit my credentials.

I know it's an old commit but being concerned with this issue I want to point that using a good .env file for credentials seems to be a better fit than using a commited phpunit file.

@uuf6429
Copy link

uuf6429 commented Jul 29, 2018

@rewieer the point of the phpunit.xml.dist is to not commit your specific changes.

You can have your own phpunit.xml that overrides changes. Eg; you can remove the entry from your customer xml file and user the environment variable provided by your machine.

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.

5 participants