symfony / flex

Composer plugin for Symfony
MIT License
4.17k stars 183 forks source link

fix jsonPath in ComposerScriptsConfigurator::update #1011

Open klkvsk opened 9 months ago

klkvsk commented 9 months ago

Fixes https://github.com/symfony/flex/issues/1010

https://github.com/symfony/flex/blob/bec213c39511eda66663baa2ee7440c65f89c695/src/Configurator/ComposerScriptsConfigurator.php#L52

In case when root dir = ".", it replaces the dot in filename, and then applying the patch is broken with:

NOTE:
  The file composerjson was not updated because it doesn't exist in your app.

Change to using Path::makeRelative for proper result.