Skip to content

Conversation

amirhshokri
Copy link
Contributor

@amirhshokri amirhshokri commented Aug 8, 2025

This PR adds path normalization to the make:migration command by replacing forward slashes with backslashes on Windows.

Why?

Currently, the make:migration command in Laravel generates migration file paths using mixed directory separators on Windows systems.
This differs from other make: commands that extend the src/Illuminate/Console/GeneratorCommand.php class, which normalize paths by replacing forward slashes with backslashes on Windows:

https://github.com/laravel/framework/blob/12.x/src/Illuminate/Console/GeneratorCommand.php#L189

Changes

Before:

INFO  Migration [C:\path\to\project\database\migrations/2025_08_08_083902_test.php] created successfully.  

After:

INFO  Migration [C:\path\to\project\database\migrations\2025_08_08_083902_test.php] created successfully.  

@taylorotwell taylorotwell merged commit b735473 into laravel:12.x Aug 8, 2025
62 checks passed
@amirhshokri amirhshokri deleted the 12.x-improve-make-migration-output branch August 8, 2025 14:30
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