Skip to content

Commit

Permalink
feature #28626 [Translation] marked getFallbackLocales() as internal …
Browse files Browse the repository at this point in the history
…(boscho87)

This PR was merged into the 4.2-dev branch.

Discussion
----------

[Translation] marked getFallbackLocales() as internal

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

Added the deprication trigger error function to getFallbackLocales in the Translation component.

(Its my first PR, please tell me if i need to change something)

Commits
-------

9d67a68 [Translation] marked getFallbackLocales() as internal
  • Loading branch information
fabpot committed Oct 3, 2018
2 parents 104e922 + 9d67a68 commit 679f8d9
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions UPGRADE-4.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ Translation

* The `TranslatorInterface` has been deprecated in favor of `Symfony\Contracts\Translation\TranslatorInterface`
* The `MessageSelector`, `Interval` and `PluralizationRules` classes have been deprecated, use `IdentityTranslator` instead
* The `Translator::getFallbackLocales()` and `TranslationDataCollector::getFallbackLocales()` method have been marked as internal

Validator
---------
Expand Down
1 change: 1 addition & 0 deletions UPGRADE-5.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ Translation
* The `TranslationWriter::disableBackup()` method has been removed.
* The `TranslatorInterface` has been removed in favor of `Symfony\Contracts\Translation\TranslatorInterface`
* The `MessageSelector`, `Interval` and `PluralizationRules` classes have been removed, use `IdentityTranslator` instead
* The `Translator::getFallbackLocales()` and `TranslationDataCollector::getFallbackLocales()` method are now internal

TwigBundle
----------
Expand Down
1 change: 1 addition & 0 deletions src/Symfony/Component/Translation/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ CHANGELOG
* deprecated `MessageSelector`, `Interval` and `PluralizationRules`; use `IdentityTranslator` instead
* Added `IntlMessageFormatter` and `FallbackMessageFormatter`
* added support for multiple files and directories in `XliffLintCommand`
* Marked `Translator::getFallbackLocales()` and `TranslationDataCollector::getFallbackLocales()` as internal

4.1.0
-----
Expand Down
3 changes: 3 additions & 0 deletions src/Symfony/Component/Translation/DataCollector/TranslationDataCollector.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ public function getLocale()
return !empty($this->data['locale']) ? $this->data['locale'] : null;
}

/**
* @internal since Symfony 4.2
*/
public function getFallbackLocales()
{
return (isset($this->data['fallback_locales']) && \count($this->data['fallback_locales']) > 0) ? $this->data['fallback_locales'] : array();
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Component/Translation/Translator.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ public function setFallbackLocales(array $locales)
/**
* Gets the fallback locales.
*
* @internal since Symfony 4.2
*
* @return array $locales The fallback locales
*/
public function getFallbackLocales()
Expand Down

0 comments on commit 679f8d9

Please sign in to comment.