[5.0] Fix Windows path for nested config folders#7632
[5.0] Fix Windows path for nested config folders#7632taylorotwell merged 1 commit intolaravel:5.0from RomainLanz:patch-1
Conversation
|
Thank you. |
[5.0] Fix Windows path for nested config folders
|
Sigh this broke Laravel entirely. |
|
Reverted since this literally broke the entire framework. |
|
ty , in 5.0.10 :) it works fine |
|
That bug is unrelated. |
|
Yeah, it's broken on Windows. You can stop posting links. I don't have a Windows machine so I can't help you. You're fix broke it on Linux. |
|
I'll probably just rip out this feature entirely unless someone is able to get a fix soon. |
|
I'll try to find a fix, how many time can you wait? |
|
I don't know. Looking at the code I can't even figure out the problem, so... |
|
Hate to see features get ripped out.. The paths just need to be standardized. When I posted the first fix I knew it needed to be opposite. This will standardize Windows paths to Linux. Please PR it @RomainLanz You can format this better if you'd like to avoid the long line length (maybe do the $directory str_replace where the variable is set), I just don't have the time to do a PR right now. |
|
I don't even understand why any of that is necessary. Can someone please for the love of all that is holy explain it to me? We are using DIRECTORY_SEPARATOR. |
|
Tagged that fix. All good? |
|
5.0.12 no error message ... |
|
config_path() string (27) "C:\Development\boise/config" You can see how the str_replace on line 91 would be ineffective due to the strings not being equal. Using DIRECTORY_SEPARATOR is all fine (and preferred even), but you would need to use it where you define the paths. Illuminate\Foundation\Application: Line 279 - configPath() would need to be: return $this->basePath.DIRECTORY_SEPARATOR.'config';Ideally you would want to replace all references of '/' with DIRECTORY_SEPARATOR in that file. I will submit a PR when I get home later if you haven't done so by then. |
|
Gotcha. Thanks for explanation. |
|
@taylorotwell You can revert the fix that was posted in this thread and merge #7635 if you'd like. Just changes out the hard-coded separators for the constant. |
|
OK I merged #7635. Is anyone actually testing this stuff? I'm not tagging another release until someone posts a screenshot of this working or submits a unit tests (perferrably) |
|
With #7635 merged, those str_replaces are needed anymore so I removed it back to how it was. Can someone set minimum-stability to "dev" and make sure this is working on Windows? |
|
@taylorotwell I am currently running with minimum-stability at dev, and on Windows, and the above is working. The only fix that is needed is #7635 so you can surely revert the str_replace changes. |
|
So with latest commit hash on laravel/framework it is working for you and loading config directories that are nested? |
|
That's correct. I am running (dev-master eab95a8) on Windows, with the following config: config/test/foo.php <?php
return [
'bar' => 'baz'
];Result: All seems well. |
Fix 9aed416
Thanks to @portonefive