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
-------
9d67a68816
[Translation] marked getFallbackLocales() as internal
This commit is contained in:
commit
679f8d9c9b
@ -209,6 +209,7 @@ Translation
|
|||||||
|
|
||||||
* The `TranslatorInterface` has been deprecated in favor of `Symfony\Contracts\Translation\TranslatorInterface`
|
* 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 `MessageSelector`, `Interval` and `PluralizationRules` classes have been deprecated, use `IdentityTranslator` instead
|
||||||
|
* The `Translator::getFallbackLocales()` and `TranslationDataCollector::getFallbackLocales()` method have been marked as internal
|
||||||
|
|
||||||
Validator
|
Validator
|
||||||
---------
|
---------
|
||||||
|
@ -184,6 +184,7 @@ Translation
|
|||||||
* The `TranslationWriter::disableBackup()` method has been removed.
|
* The `TranslationWriter::disableBackup()` method has been removed.
|
||||||
* The `TranslatorInterface` has been removed in favor of `Symfony\Contracts\Translation\TranslatorInterface`
|
* 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 `MessageSelector`, `Interval` and `PluralizationRules` classes have been removed, use `IdentityTranslator` instead
|
||||||
|
* The `Translator::getFallbackLocales()` and `TranslationDataCollector::getFallbackLocales()` method are now internal
|
||||||
|
|
||||||
TwigBundle
|
TwigBundle
|
||||||
----------
|
----------
|
||||||
|
@ -9,6 +9,7 @@ CHANGELOG
|
|||||||
* deprecated `MessageSelector`, `Interval` and `PluralizationRules`; use `IdentityTranslator` instead
|
* deprecated `MessageSelector`, `Interval` and `PluralizationRules`; use `IdentityTranslator` instead
|
||||||
* Added `IntlMessageFormatter` and `FallbackMessageFormatter`
|
* Added `IntlMessageFormatter` and `FallbackMessageFormatter`
|
||||||
* added support for multiple files and directories in `XliffLintCommand`
|
* added support for multiple files and directories in `XliffLintCommand`
|
||||||
|
* Marked `Translator::getFallbackLocales()` and `TranslationDataCollector::getFallbackLocales()` as internal
|
||||||
|
|
||||||
4.1.0
|
4.1.0
|
||||||
-----
|
-----
|
||||||
|
3
src/Symfony/Component/Translation/DataCollector/TranslationDataCollector.php
Normal file → Executable file
3
src/Symfony/Component/Translation/DataCollector/TranslationDataCollector.php
Normal file → Executable file
@ -97,6 +97,9 @@ class TranslationDataCollector extends DataCollector implements LateDataCollecto
|
|||||||
return !empty($this->data['locale']) ? $this->data['locale'] : null;
|
return !empty($this->data['locale']) ? $this->data['locale'] : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @internal since Symfony 4.2
|
||||||
|
*/
|
||||||
public function getFallbackLocales()
|
public function getFallbackLocales()
|
||||||
{
|
{
|
||||||
return (isset($this->data['fallback_locales']) && \count($this->data['fallback_locales']) > 0) ? $this->data['fallback_locales'] : array();
|
return (isset($this->data['fallback_locales']) && \count($this->data['fallback_locales']) > 0) ? $this->data['fallback_locales'] : array();
|
||||||
|
@ -176,6 +176,8 @@ class Translator implements TranslatorInterface, TranslatorBagInterface
|
|||||||
/**
|
/**
|
||||||
* Gets the fallback locales.
|
* Gets the fallback locales.
|
||||||
*
|
*
|
||||||
|
* @internal since Symfony 4.2
|
||||||
|
*
|
||||||
* @return array $locales The fallback locales
|
* @return array $locales The fallback locales
|
||||||
*/
|
*/
|
||||||
public function getFallbackLocales()
|
public function getFallbackLocales()
|
||||||
|
Reference in New Issue
Block a user