ParameterHandler icon indicating copy to clipboard operation
ParameterHandler copied to clipboard

keep-optional default true or ask user about removal.

Open thomasez opened this issue 10 years ago • 2 comments

The behaviour now is that parameters in .yml are silently removed if they are not in yml.dist.

I propose that either keep-optional is default true, so this will not happen, or better, ask the user if it's supposed to be removed or not.

I just did a quick upgrade form sf 2.5.0 beta 2 to release on my dev instance, which was in the middle of a change possibly needing a new parameter. That just went without a puff of smoke. And since parameters.yml shall not be in CVS (git), I have to recreate the new parameters.

I've added keep-optional now, but this was behaviour that was "silently" added in some update of Symfony, which pulled this package, with this new behaviour. I qould guess that more developers than me will be surprised by this :=)

thomasez avatar Jun 04 '14 09:06 thomasez

it was never silently added in any version of Symfony. The very first commit of the ParameterHandler did not have the keep-outdated flag (it is not named keep-optional), but its behavior was already to drop them

stof avatar Jun 04 '14 11:06 stof

What was added was the parameter handling (which was a very good thing). I guess I never got hit by the removal until now, so that part was kinda silent for me.

Still, I would like that option of asking "whall I remove" when running interactive, since I then can decide, like keep it in dev environment, but have it automatically removed in staging and prodution.

If this is something that would be include I'd make a patch for it.

thomasez avatar Jun 05 '14 06:06 thomasez