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

[5.5] Ensure config load order across multiple installations #21634

Merged
merged 1 commit into from
Oct 12, 2017

Conversation

IanCaunce
Copy link
Contributor

After reading this article it concerned me that the load order of config files could lead to inconsistent behaviour across multiple installations.

Although I agree with the original author that you shouldn't use config() inside config files, I do think that its a reasonable mistake to make, especially if your new to Laravel and there is merit in fixing the issue with consistency. A developer may only realise that the bug exists once it is deployed to a live environment even though it has passed testing in a matching test/dev environment.

This pull request addresses this issue by naturally sorting the array of config files, ensuring that they are loaded in a deterministic order therefore protecting developers from this subtle bug.

@taylorotwell taylorotwell merged commit 45dfc96 into laravel:5.5 Oct 12, 2017
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.

2 participants