Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8c20b90

Browse filesBrowse files
committed
bug #38867 [FrameworkBundle] Fixing TranslationUpdateCommand failure 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"
2 parents 9eb3681 + ef24b10 commit 8c20b90
Copy full SHA for 8c20b90

File tree

2 files changed

+1
-6
lines changed
Filter options

2 files changed

+1
-6
lines changed

‎src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ CHANGELOG
33

44
5.1.0
55
-----
6-
6+
* Removed `--no-backup` option from `translation:update` command (broken since `5.0.0`)
77
* Added link to source for controllers registered as named services
88
* Added link to source on controller on `router:match`/`debug:router` (when `framework.ide` is configured)
99
* Added the `framework.router.default_uri` configuration option to configure the default `RequestContext`

‎src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php
-5Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ protected function configure()
7979
new InputOption('output-format', null, InputOption::VALUE_OPTIONAL, 'Override the default output format', 'xlf'),
8080
new InputOption('dump-messages', null, InputOption::VALUE_NONE, 'Should the messages be dumped in the console'),
8181
new InputOption('force', null, InputOption::VALUE_NONE, 'Should the update be done'),
82-
new InputOption('no-backup', null, InputOption::VALUE_NONE, 'Should backup be disabled'),
8382
new InputOption('clean', null, InputOption::VALUE_NONE, 'Should clean not found messages'),
8483
new InputOption('domain', null, InputOption::VALUE_OPTIONAL, 'Specify the domain to update'),
8584
new InputOption('xliff-version', null, InputOption::VALUE_OPTIONAL, 'Override the default xliff version', '1.2'),
@@ -283,10 +282,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int
283282
$resultMessage = sprintf('%d message%s successfully extracted', $extractedMessagesCount, $extractedMessagesCount > 1 ? 's were' : ' was');
284283
}
285284

286-
if (true === $input->getOption('no-backup')) {
287-
$this->writer->disableBackup();
288-
}
289-
290285
// save the files
291286
if (true === $input->getOption('force')) {
292287
$io->comment('Writing files...');

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.