Hi!
I believe there's an issue with how copy-from-package works in recipes when directory is copied.
Given following recipe:
{
"copy-from-package": {
"testSourceDir/": "testTargetDir/",
}
}
Once files exist in testTargetDir they will never be updated, even when --force is used when running recipes.
The behaviour I'd expect is as follows:
- When running
composer symfony:recipes:install <package> without --force the files are not overwritten (their state is not updated).
- When running
composer symfony:recipes:install <package> with --force the files are overwritten (their state is updated).
I believe this behaviour (overwriting existing files when force is used) is consistent with what's written here: https://symfony.com/doc/current/setup/upgrade_major.html#updating-recipes
Instead, the updates process re-installs the latest version of the recipe which means that your custom code will be overridden completely. After updating a recipe, you need to carefully choose which changes you want, and undo the rest.
I've created a PR here: #756
Hi!
I believe there's an issue with how
copy-from-packageworks in recipes when directory is copied.Given following recipe:
Once files exist in testTargetDir they will never be updated, even when
--forceis used when running recipes.The behaviour I'd expect is as follows:
composer symfony:recipes:install <package>without--forcethe files are not overwritten (their state is not updated).composer symfony:recipes:install <package>with--forcethe files are overwritten (their state is updated).I believe this behaviour (overwriting existing files when force is used) is consistent with what's written here: https://symfony.com/doc/current/setup/upgrade_major.html#updating-recipes
I've created a PR here: #756