Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

Clear DB Manager cached config values from the .env file #194

Merged
merged 2 commits into from
Apr 16, 2020
Merged

Clear DB Manager cached config values from the .env file #194

merged 2 commits into from
Apr 16, 2020

Conversation

pricop
Copy link
Contributor

@pricop pricop commented Apr 15, 2020

We should purge the connection config values before checking whether the SQL credentials inserted by the user are valid or not.

The DatabaseManager class caches the values at run-time from the auto-generated .env when installing/creating a laravel project. This makes changing the config values on the fly redundant without purging the values first.

Tested on Laravel 5.8 and 6.0 and works brilliantly.

We should purge the connection config values before checking whether the SQL credentials inserted by the user are valid or not.

The DatabaseManager class caches the values at run-time from the auto-generated .env when installing/creating a laravel project. This makes changing the config values on the fly redundant without purging the values first.

Tested on Laravel 5.8 and 6.0 and works brilliantly.
Copy link
Contributor Author

@pricop pricop left a comment

Choose a reason for hiding this comment

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

Removed the comment as the method itself is pretty self explanatory.

@pricop pricop changed the title Clear any cached config values from the .env file Clear DB Manager cached config values from the .env file Apr 16, 2020
@rashidlaasri
Copy link
Owner

Thanks @pricop

@rashidlaasri rashidlaasri merged commit 4fdb6c9 into rashidlaasri:master Apr 16, 2020
@pricop pricop deleted the patch-2 branch April 16, 2020 23:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants