symfony-bridge icon indicating copy to clipboard operation
symfony-bridge copied to clipboard

serverless.yml file is deleted when package is uninstalled

Open driskell opened this issue 3 years ago • 3 comments

Hello.

When removing the package it seems unexpected to me for serverless.yml to be removed and any active changes lost, as it's usually created by bref init so I didn't expect something else to take control of it.

I wonder if perhaps it shouldn't be bundled in the recipe?

driskell avatar Jan 13 '22 18:01 driskell

Hi! This is very surprising indeed, that's not intended to behave that way.

Could it be because serverless.yml is created via a recipe? 🤔

@ker0x since you created the recipe in https://github.com/symfony/recipes-contrib/pull/1129 do you have any idea about that?

mnapoli avatar Jan 16 '22 14:01 mnapoli

I think the is the intended behaviour from a Flex perspective.

AFAIK, everything created on composer require is deleted on composer remove.

I don't think this is configurable.

The paved way for installing this package is to go througth the Symfony part of Bref docs which doesn't involve a bref init.

I'm not sure what we can do about this exept contribute a new feature to Flex or remove the recipe.

t-richard avatar Jan 16 '22 22:01 t-richard

Oh… yeah that sucks.

I'm afraid the best way to go would be to give up on Flex recipes and create our own bin/console bre:init command 🤔 (or similar). That would also solve the problem of the serverless.yml template being stored outside of this repository (which means we have no control over it).

mnapoli avatar Jan 17 '22 11:01 mnapoli