Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Translation] deprecate the backup feature #18290

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

Merged
merged 1 commit into from
Apr 1, 2016

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Mar 24, 2016

Q A
Branch? master
Bug fix? no
New feature? no
BC breaks? no
Deprecations? yes
Tests pass? yes
Fixed tickets #16912 (comment)
License MIT
Doc PR

@javiereguiluz
Copy link
Member

@xabbuh @aitboudad what if we remove this backup feature altogether for the Translation component? My feel is that we're trying to do "too much" here. In Symfony we do more "dangerous" things (e.g. the SensioGeneratorBundle) without providing a backup feature.

@fabpot
Copy link
Member

fabpot commented Mar 29, 2016

I agree with @javiereguiluz

@aitboudad
Copy link
Contributor

I agree too.

@stof
Copy link
Member

stof commented Mar 29, 2016

I agree too. I'm always disabling this backup, as git already gives me a way to get the old file if something goes wrong, and backup files only lead to mistakes in such cases

@xabbuh
Copy link
Member Author

xabbuh commented Mar 29, 2016

I am not too familiar with the Translation component internals. But if you all agree on this, I will revert the new interface and instead deprecate the setBackup() method. What do you think about that?

@aitboudad
Copy link
Contributor

@xabbuh I think so and deprecate backup for the translation:update command too.

@fabpot
Copy link
Member

fabpot commented Mar 29, 2016

👍 for deprecation

@xabbuh xabbuh force-pushed the translator-backup-interface branch from 4fde2f1 to 6c3ddf1 Compare March 31, 2016 18:23
@xabbuh xabbuh changed the title [Translation] add a BackupAwareDumperInterface [Translation] deprecate the backup feature Mar 31, 2016
@xabbuh
Copy link
Member Author

xabbuh commented Mar 31, 2016

I added deprecation trigger for the backup feature. I couldn't deprecate the --no-backup option of the command nor the disableBackup() method of the TranslationWriter class as people will need to use them to prepare for the 4.0 upgrade. Though we have to deprecate them in 4.1.

@fabpot
Copy link
Member

fabpot commented Apr 1, 2016

Thank you @xabbuh.

@fabpot fabpot merged commit 6c3ddf1 into symfony:master Apr 1, 2016
fabpot added a commit that referenced this pull request Apr 1, 2016
This PR was merged into the 3.1-dev branch.

Discussion
----------

[Translation] deprecate the backup feature

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #16912 (comment)
| License       | MIT
| Doc PR        |

Commits
-------

6c3ddf1 [Translation] deprecate the backup feature
@xabbuh xabbuh deleted the translator-backup-interface branch April 1, 2016 06:58
@fabpot fabpot mentioned this pull request May 13, 2016
fabpot added a commit that referenced this pull request Oct 28, 2020
…when using "--no-backup" (liarco)

This PR was squashed before being merged into the 5.1 branch.

Discussion
----------

[FrameworkBundle] Fixing TranslationUpdateCommand failure when using "--no-backup"

| Q             | A
| ------------- | ---
| Branch?       | 5.1
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

[5.0.0](https://github.com/symfony/symfony/blob/5.0/src/Symfony/Component/Translation/CHANGELOG.md#500) removed `TranslationWriter::disableBackup()` but `TranslationUpdateCommand` still has `--no-backup` flag. Using that flag throws an error so I think that removing it without deprecation may be the right choice.

Thrown error:
```
In TranslationUpdateCommand.php line 287:

  Attempted to call an undefined method named "disableBackup" of class "Symfony\Component\Translation\Writer\TranslationWriter".
```

Further references to the topic:
 - #18290 (comment)
 - #25860

Commits
-------

ef24b10 [FrameworkBundle] Fixing TranslationUpdateCommand failure when using "--no-backup"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants