Skip to content

[Translator][FileDumper] deprecated format method in favor of formatCatalogue. #15699

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 17, 2015

Conversation

aitboudad
Copy link
Contributor

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

We introduced formatCatalogue to allow using options passed to the dump method.

@@ -109,6 +109,8 @@ protected function formatCatalogue(MessageCatalogue $messages, $domain, array $o
* @param string $domain
*
* @return string representation
*
* @deprecated since version 2.8, to be removed in 3.0. Use formatCatalogue() instead.
Copy link
Member

Choose a reason for hiding this comment

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

the message should say Overwrite .... rather than Use ...

Copy link
Member

Choose a reason for hiding this comment

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

and you should trigger a deprecation warning in the formatCatalogue of this class, telling it should be overwritten instead of overwriting format

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@aitboudad aitboudad force-pushed the translation_file_dumper_dep branch 2 times, most recently from dbf8b68 to 0ddc7b5 Compare September 10, 2015 15:46
@aitboudad aitboudad force-pushed the translation_file_dumper_dep branch from 0ddc7b5 to 73573b6 Compare September 11, 2015 11:40
@aitboudad aitboudad force-pushed the translation_file_dumper_dep branch from 73573b6 to 366879b Compare September 16, 2015 14:56
@aitboudad aitboudad merged commit 366879b into symfony:2.8 Sep 17, 2015
aitboudad added a commit that referenced this pull request Sep 17, 2015
…avor of formatCatalogue. (aitboudad)

This PR was merged into the 2.8 branch.

Discussion
----------

[Translator][FileDumper] deprecated format method in favor of formatCatalogue.

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

We introduced `formatCatalogue` to allow using options passed to the dump method.

Commits
-------

366879b [Translator][FileDumper] deprecated format method in favor of formatCatalogue.
@aitboudad aitboudad deleted the translation_file_dumper_dep branch September 17, 2015 17:06
@@ -109,6 +111,8 @@ protected function formatCatalogue(MessageCatalogue $messages, $domain, array $o
* @param string $domain
*
* @return string representation
*
* @deprecated since version 2.8, to be removed in 3.0. Overwrite formatCatalogue() instead.
*/
abstract protected function format(MessageCatalogue $messages, $domain);
Copy link
Member

Choose a reason for hiding this comment

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

@aitboudad this method should be implemented now (throwing an exception saying it must be implemented), to allow new child classes to implement only formatCatalogue and not both methods

Copy link
Contributor Author

Choose a reason for hiding this comment

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

see #15832 and thanks for the hint.

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.
@fabpot fabpot mentioned this pull request Nov 16, 2015
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