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.2] Use DIRECTORY_SEPARATOR to create migrations path #13254

Merged
merged 1 commit into from
Apr 25, 2016

Conversation

mnabialek
Copy link
Contributor

I believe it should be changed also in many other places but I've changed it only in this place for now.

The problem:

$path = $this->getMigrationPath() 

if ($path == database_path('migrations'))

On Windows this could will evaluate to false, because getMigrationPath() function is using now / as separator but on Windows database_path method will use DIRECTORY_SEPARATOR what is \ for Windows and it might cause unexpected behaviour for users launching code on Windows.

I've found this issue today when my colleagues tried to launch code on Windows whereas other developer run it in native Linux or use Homestead so this problem was not experienced by others.

@mnabialek mnabialek changed the title Use DIRECTORY_SEPARATOR to create migrations path [5.2] Use DIRECTORY_SEPARATOR to create migrations path Apr 21, 2016
@taylorotwell taylorotwell merged commit 93dae52 into laravel:5.2 Apr 25, 2016
@vlakoff
Copy link
Contributor

vlakoff commented May 3, 2016

This has broken several tests on Windows because they haven't been updated accordingly.

@mnabialek mnabialek deleted the migrations-path-fix branch January 1, 2018 17:18
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