Skip to content

[Translation][File dumper] allow new child classes to implement only formatCatalogue #15832

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
Sep 18, 2015

Conversation

aitboudad
Copy link
Contributor

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets #15699
Tests pass? yes
License MIT

abstract protected function format(MessageCatalogue $messages, $domain);
protected function format(MessageCatalogue $messages, $domain)
{
throw new \RuntimeException('The '.__METHOD__.' method needs to be implemented to use it.');
Copy link
Member

Choose a reason for hiding this comment

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

a LogicException would be better (consistent with the way the Console component does such thing).

and the message is bad:

  • it should not use __METHOD__ as the method should be implemented in the child class, while it shows FileDumper::format in your case
  • the message is not accurate. It should tell to implement either format or formatCatalogue.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changes have been applied.

@Tobion
Copy link
Contributor

Tobion commented Sep 18, 2015

Thanks @aitboudad.

@Tobion Tobion merged commit 5fd9f2f into symfony:2.8 Sep 18, 2015
Tobion added a commit that referenced this pull request Sep 18, 2015
…plement only formatCatalogue (aitboudad)

This PR was merged into the 2.8 branch.

Discussion
----------

[Translation][File dumper] allow new child classes to implement only formatCatalogue

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Fixed tickets  | #15699
| Tests pass?   | yes
| License       | MIT

Commits
-------

5fd9f2f [Translation][File dumper] allow new child classes to implement only formatCatalogue.
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.

4 participants