Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Add methods used by TranslationUpdateCommand#25860

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
ebuildy wants to merge2 commits intosymfony:masterfromebuildy:patch-3
Closed

Add methods used by TranslationUpdateCommand#25860

ebuildy wants to merge2 commits intosymfony:masterfromebuildy:patch-3

Conversation

@ebuildy
Copy link
Contributor

Symfony\Bundle\FrameworkBundle\Command\TranslationUpdateCommand usesTranslationWriterInterface methodsdisableBackup andgetFormats not defined by the interface but by the implementationSymfony\Component\Translation\Writer\TranslationWriter.

QA
Branch?master
Bug fix?no
New feature?no
BC breaks?yes (
Deprecations?no
Tests pass?yes/no
Fixed tickets#...
LicenseMIT

``Symfony\Bundle\FrameworkBundle\Command\TranslationUpdateCommand`` uses ``TranslationWriterInterface`` methods ``disableBackup`` and ``getFormats`` not defined by the interface but by the implementation ``Symfony\Component\Translation\Writer\TranslationWriter``.
@linaori
Copy link
Contributor

If you want to make it backwards compatible, you'll probably have to make a second interface and implement that. BC breaks won't me merged until 5.0. In your PR, this is also seen as a new feature.

@chalasrchalasr added this to the4.1 milestoneJan 20, 2018
@ebuildy
Copy link
ContributorAuthor

I dont want to add more complexity by adding a new interface, can wait for v5.0 since Php is not Java ^^.

Also, there is the same problem with:$kernel = $this->getApplication()->getKernel();: $this->application should be aSymfony\Component\Console\Application as defined inCommand parent class.getKernel is present onSymfony\Bundle\FrameworkBundle\Console\Application, a sub-class ofSymfony\Component\Console\Application.

@linaori
Copy link
Contributor

I dont want to add more complexity by adding a new interface, can wait for v5.0 since Php is not Java

One of the 4.x versions will have to add a layer to enable this feature either way. V5 won't be released for almost 2 years ;)

Copy link
Member

@chalasrchalasr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

We don't break BC in major releases without an upgrade path in a previous minor release.
If one comes with a valid use case for decorating thetranslation.writer service, we could add an instanceof check to skip calling thegetFormats() method. The same goes for the calls toApplication::getKernel(), yet it's not super clean but that's underframework-bundle, we know which implementation is behind it.
👎 Fine as is to me

/**
* Disables dumper backup.
*/
publicfunctiondisableBackup();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

doesn't have to be interfaced:

* @deprecated since Symfony 4.1, to be removed in 5.0

@chalasr
Copy link
Member

Closing as explained, thanks for proposing.

@chalasrchalasr closed thisFeb 3, 2018
fabpot added a commit that referenced this pull requestOct 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) -#25860Commits-------ef24b10 [FrameworkBundle] Fixing TranslationUpdateCommand failure when using "--no-backup"
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@chalasrchalasrchalasr left review comments

Assignees

No one assigned

Projects

None yet

Milestone

4.1

Development

Successfully merging this pull request may close these issues.

4 participants

@ebuildy@linaori@chalasr@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp