symfony / flex

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

ComposerScriptsConfigurator can break "composer.json" filename in patch #1010

Open klkvsk opened 8 months ago

klkvsk commented 8 months ago

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.

Reported in https://github.com/symfony/recipes/issues/1271