Permalink
Browse files

feature #28626 [Translation] marked getFallbackLocales() as internal …

…(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 679f8d9c9b61a8334e9e733c9cb034f485a09173
View
@@ -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
---------
View
@@ -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
----------
@@ -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
-----
@@ -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();
@@ -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()

0 comments on commit 679f8d9

Please sign in to comment.