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

[7.x] Restore app()->getCached*Path() absolute '/' behavior in Windows #32969

Merged

Conversation

derekmd
Copy link
Contributor

@derekmd derekmd commented May 26, 2020

Fixes: #32960

testEnvPathsAreUsedForCachePathsWhenSpecified is currently failing when run in Windows environments.

7.2.1 started enforcing DIRECTORY_SEPARATOR (#31985) as the path prefix to be treated as absolute. For a point release, this breaks Windows environments in existing apps that use environment variables to set absolute '/'-prefixed paths.

$_SERVER['APP_CONFIG_CACHE'] = '/ext/cache/config.php';
echo app()->getCachedConfigPath();
// C:\Users\Foo\projects\blog\/ext/cache/config.php

This should still be '/ext/cache/config.php' which PHP will likely resolve to 'C:\ext\cache\config.php'.

7.2.1 started enforcing DIRECTORY_SEPARATOR
as the path prefix to be treated as absolute.
For a point release, this breaks Windows
environments in existing apps that use
environment variables to set absolute
'/'-prefixed paths.

$_SERVER['APP_CONFIG_CACHE'] = '/ext/cache/config.php';
echo app()->getCachedConfigPath();
// C:\Users\Foo\projects\blog\/ext/cache/config.php

This should still be '/ext/cache/config.php'.
@taylorotwell taylorotwell merged commit 29d714d into laravel:7.x May 26, 2020
@derekmd derekmd deleted the fix-app-cache-config-windows-forward-slash branch May 26, 2020 15:03
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.

[7.2.1 to 7.12.0] Config cache path breaking change in Windows environments
2 participants