Skip to content
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

[1.x] Patch issue with environment database password replacement #87

Merged
merged 1 commit into from
Mar 30, 2021

Conversation

EricPaulson
Copy link
Contributor

This update fixes an issue that is caused if you already have a DB_PASSWORD configured in your .env. Prior to this change, if you have this (for example):

DB_PASSWORD=mypassword

After running sail:install it would then look like this:

DB_PASSWORD=passwordmypassword

And each time you run sail install it'll keep growing. This is because only DB_PASSWORD= is being replaced, when it should be replacing the password as well, which can be accomplished using preg_replace and a simple regex as in this PR.

This update fixes an issue that is caused if you already have a DB_PASSWORD configured in your .env. Prior to this change, if you have this (for example):

```
DB_PASSWORD=mypassword
```

After running `sail:install` it would then look like this:

```
DB_PASSWORD=passwordmypassword
```

And each time you run `sail install` it'll keep growing. This is because only DB_PASSWORD= is being replaced, when it should be replacing the password as well, which can be accomplished using `preg_replace` and a simple regex as in this PR.
@driesvints driesvints changed the title Patch issue with environment database password replacement [1.x] Patch issue with environment database password replacement Mar 30, 2021
@taylorotwell taylorotwell merged commit 7327a31 into laravel:1.x Mar 30, 2021
oddvalue pushed a commit to oddvalue/sail that referenced this pull request May 26, 2021
This update fixes an issue that is caused if you already have a DB_PASSWORD configured in your .env. Prior to this change, if you have this (for example):

```
DB_PASSWORD=mypassword
```

After running `sail:install` it would then look like this:

```
DB_PASSWORD=passwordmypassword
```

And each time you run `sail install` it'll keep growing. This is because only DB_PASSWORD= is being replaced, when it should be replacing the password as well, which can be accomplished using `preg_replace` and a simple regex as in this PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants