Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Don't delete files that have been modified? #43

Closed
javiereguiluz opened this issue Apr 8, 2017 · 2 comments
Closed

[Question] Don't delete files that have been modified? #43

javiereguiluz opened this issue Apr 8, 2017 · 2 comments

Comments

@javiereguiluz
Copy link
Member

javiereguiluz commented Apr 8, 2017

This Flex behaviour is what I expect

  1. composer req cli -> creates ./bin/console
  2. Don't change ./bin/console contents
  3. composer rem cli -> deletes ./bin/console

This Flex behavior is debatable

  1. composer req cli -> creates ./bin/console
  2. Make some changes in ./bin/console contents to customize it for my project
  3. composer rem cli -> deletes my customized ./bin/console

My question

Should Flex check the md5 of the file contents before trying to delete them to see if they have been modified?

Whether this proposal is the right thing to do or not is debatable ... but for example Flex doesn't follow the same behavior with dirs:

  1. composer req doctrine -> creates the empty src/Entity/ and src/Repository/ dirs
  2. Create files in src/Entity/ but not in src/Repository/
  3. composer rem doctrine -> removes src/Repository/ but maintains src/Entity/
@nicolas-grekas
Copy link
Member

Any changes done by Flex needs to be committed afterwards, so that reverting is not the responsibility of Flex. Maybe we should have some words about the flex+git workflow instead?

@fabpot
Copy link
Member

fabpot commented Apr 11, 2017

I think the current behavior is the right one. Flex only removes files related to the package you want to uninstall.

@fabpot fabpot closed this as completed Apr 14, 2017
tgalopin pushed a commit to tgalopin/flex that referenced this issue Dec 3, 2020
This PR was merged into the master branch.

Discussion
----------

Add comments

Related to symfony/recipes#42 and symfony/symfony-standard#1064

Commits
-------

52c22bd Add comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants