laravel / valet

A more enjoyable local development experience for Mac.
https://laravel.com/docs/valet
MIT License
2.51k stars 695 forks source link

Add values() call to reset keys after modifying paths #1477

Closed adriaanzon closed 4 months ago

adriaanzon commented 6 months ago

This fixes an issue where running commands like valet link foo would cause the paths config array in ~/.config/valet/config.json to turn into an object with non-sequential keys. This in turn caused phpmon to fail with "Laravel Valet configuration file invalid or missing", when it tried to parse the config file.

mattstauffer commented 4 months ago

@adriaanzon sorry for the delay, but can you give an example of what caused this to happen? I can't reproduce it.

mattstauffer commented 4 months ago

Eh. Even if I can't repro it, it shouldn't have a negative effect because it's just enforcing that this does what we already expect it's going to do.