From 4c57e775f03da46371b2dc0294396c8bc4d486f5 Mon Sep 17 00:00:00 2001 From: stloyd Date: Wed, 1 Apr 2015 10:32:55 +0200 Subject: [PATCH] Remove deprecated Locale component --- composer.json | 1 - src/Symfony/Component/Locale/.gitignore | 3 - src/Symfony/Component/Locale/CHANGELOG.md | 15 -- .../MethodArgumentNotImplementedException.php | 29 --- ...odArgumentValueNotImplementedException.php | 29 --- .../MethodNotImplementedException.php | 29 --- .../Exception/NotImplementedException.php | 29 --- src/Symfony/Component/Locale/LICENSE | 19 -- src/Symfony/Component/Locale/Locale.php | 195 ------------------ src/Symfony/Component/Locale/README.md | 8 - .../Stub/DateFormat/AmPmTransformer.php | 29 --- .../Stub/DateFormat/DayOfWeekTransformer.php | 29 --- .../Stub/DateFormat/DayOfYearTransformer.php | 29 --- .../Locale/Stub/DateFormat/DayTransformer.php | 29 --- .../Stub/DateFormat/FullTransformer.php | 29 --- .../Stub/DateFormat/Hour1200Transformer.php | 29 --- .../Stub/DateFormat/Hour1201Transformer.php | 29 --- .../Stub/DateFormat/Hour2400Transformer.php | 29 --- .../Stub/DateFormat/Hour2401Transformer.php | 29 --- .../Stub/DateFormat/HourTransformer.php | 29 --- .../Stub/DateFormat/MinuteTransformer.php | 29 --- .../Stub/DateFormat/MonthTransformer.php | 29 --- .../Stub/DateFormat/QuarterTransformer.php | 29 --- .../Stub/DateFormat/SecondTransformer.php | 29 --- .../Stub/DateFormat/TimeZoneTransformer.php | 29 --- .../Locale/Stub/DateFormat/Transformer.php | 29 --- .../Stub/DateFormat/YearTransformer.php | 29 --- .../Component/Locale/Stub/StubCollator.php | 28 --- .../Component/Locale/Stub/StubIntl.php | 28 --- .../Locale/Stub/StubIntlDateFormatter.php | 29 --- .../Component/Locale/Stub/StubLocale.php | 110 ---------- .../Locale/Stub/StubNumberFormatter.php | 29 --- .../Component/Locale/Tests/LocaleTest.php | 79 ------- .../Locale/Tests/Stub/StubLocaleTest.php | 54 ----- src/Symfony/Component/Locale/composer.json | 35 ---- src/Symfony/Component/Locale/phpunit.xml.dist | 29 --- 36 files changed, 1271 deletions(-) delete mode 100644 src/Symfony/Component/Locale/.gitignore delete mode 100644 src/Symfony/Component/Locale/CHANGELOG.md delete mode 100644 src/Symfony/Component/Locale/Exception/MethodArgumentNotImplementedException.php delete mode 100644 src/Symfony/Component/Locale/Exception/MethodArgumentValueNotImplementedException.php delete mode 100644 src/Symfony/Component/Locale/Exception/MethodNotImplementedException.php delete mode 100644 src/Symfony/Component/Locale/Exception/NotImplementedException.php delete mode 100644 src/Symfony/Component/Locale/LICENSE delete mode 100644 src/Symfony/Component/Locale/Locale.php delete mode 100644 src/Symfony/Component/Locale/README.md delete mode 100644 src/Symfony/Component/Locale/Stub/DateFormat/AmPmTransformer.php delete mode 100644 src/Symfony/Component/Locale/Stub/DateFormat/DayOfWeekTransformer.php delete mode 100644 src/Symfony/Component/Locale/Stub/DateFormat/DayOfYearTransformer.php delete mode 100644 src/Symfony/Component/Locale/Stub/DateFormat/DayTransformer.php delete mode 100644 src/Symfony/Component/Locale/Stub/DateFormat/FullTransformer.php delete mode 100644 src/Symfony/Component/Locale/Stub/DateFormat/Hour1200Transformer.php delete mode 100644 src/Symfony/Component/Locale/Stub/DateFormat/Hour1201Transformer.php delete mode 100644 src/Symfony/Component/Locale/Stub/DateFormat/Hour2400Transformer.php delete mode 100644 src/Symfony/Component/Locale/Stub/DateFormat/Hour2401Transformer.php delete mode 100644 src/Symfony/Component/Locale/Stub/DateFormat/HourTransformer.php delete mode 100644 src/Symfony/Component/Locale/Stub/DateFormat/MinuteTransformer.php delete mode 100644 src/Symfony/Component/Locale/Stub/DateFormat/MonthTransformer.php delete mode 100644 src/Symfony/Component/Locale/Stub/DateFormat/QuarterTransformer.php delete mode 100644 src/Symfony/Component/Locale/Stub/DateFormat/SecondTransformer.php delete mode 100644 src/Symfony/Component/Locale/Stub/DateFormat/TimeZoneTransformer.php delete mode 100644 src/Symfony/Component/Locale/Stub/DateFormat/Transformer.php delete mode 100644 src/Symfony/Component/Locale/Stub/DateFormat/YearTransformer.php delete mode 100644 src/Symfony/Component/Locale/Stub/StubCollator.php delete mode 100644 src/Symfony/Component/Locale/Stub/StubIntl.php delete mode 100644 src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php delete mode 100644 src/Symfony/Component/Locale/Stub/StubLocale.php delete mode 100644 src/Symfony/Component/Locale/Stub/StubNumberFormatter.php delete mode 100644 src/Symfony/Component/Locale/Tests/LocaleTest.php delete mode 100644 src/Symfony/Component/Locale/Tests/Stub/StubLocaleTest.php delete mode 100644 src/Symfony/Component/Locale/composer.json delete mode 100644 src/Symfony/Component/Locale/phpunit.xml.dist diff --git a/composer.json b/composer.json index 09884fc75f7d..ebfe1d45b9b0 100644 --- a/composer.json +++ b/composer.json @@ -42,7 +42,6 @@ "symfony/http-foundation": "self.version", "symfony/http-kernel": "self.version", "symfony/intl": "self.version", - "symfony/locale": "self.version", "symfony/monolog-bridge": "self.version", "symfony/options-resolver": "self.version", "symfony/process": "2.99.99", diff --git a/src/Symfony/Component/Locale/.gitignore b/src/Symfony/Component/Locale/.gitignore deleted file mode 100644 index c49a5d8df5c6..000000000000 --- a/src/Symfony/Component/Locale/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -vendor/ -composer.lock -phpunit.xml diff --git a/src/Symfony/Component/Locale/CHANGELOG.md b/src/Symfony/Component/Locale/CHANGELOG.md deleted file mode 100644 index 59b6b35bfa94..000000000000 --- a/src/Symfony/Component/Locale/CHANGELOG.md +++ /dev/null @@ -1,15 +0,0 @@ -CHANGELOG -========= - -2.3.0 ------ - -The Locale component is deprecated since version 2.3 and will be removed in -Symfony 3.0. You should use the more capable Intl component instead. - -2.1.0 ------ - - * added Locale::getIntlIcuVersion(), Locale::getIntlIcuDataVersion(), Locale::getIcuDataVersion() and Locale::getIcuDataDirectory() - * renamed update-data.php to build-data.php, the script usage changed, now it is easier to update the ICU data - * updated the ICU data to the release 49.1.2 diff --git a/src/Symfony/Component/Locale/Exception/MethodArgumentNotImplementedException.php b/src/Symfony/Component/Locale/Exception/MethodArgumentNotImplementedException.php deleted file mode 100644 index d94d61c4e6b0..000000000000 --- a/src/Symfony/Component/Locale/Exception/MethodArgumentNotImplementedException.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Locale\Exception; - -trigger_error('The '.__NAMESPACE__.'\MethodArgumentNotImplementedException class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\Exception\MethodArgumentNotImplementedException class instead.', E_USER_DEPRECATED); - -use Symfony\Component\Intl\Exception\MethodArgumentNotImplementedException as BaseMethodArgumentNotImplementedException; - -/** - * Alias of {@link \Symfony\Component\Intl\Exception\MethodArgumentNotImplementedException}. - * - * @author Bernhard Schussek - * - * @deprecated since version 2.3, to be removed in 3.0. - * Use {@link \Symfony\Component\Intl\Exception\MethodArgumentNotImplementedException} - * instead. - */ -class MethodArgumentNotImplementedException extends BaseMethodArgumentNotImplementedException -{ -} diff --git a/src/Symfony/Component/Locale/Exception/MethodArgumentValueNotImplementedException.php b/src/Symfony/Component/Locale/Exception/MethodArgumentValueNotImplementedException.php deleted file mode 100644 index 171487a10ac6..000000000000 --- a/src/Symfony/Component/Locale/Exception/MethodArgumentValueNotImplementedException.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Locale\Exception; - -trigger_error('The '.__NAMESPACE__.'\MethodArgumentValueNotImplementedException class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException class instead.', E_USER_DEPRECATED); - -use Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException as BaseMethodArgumentValueNotImplementedException; - -/** - * Alias of {@link \Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException}. - * - * @author Bernhard Schussek - * - * @deprecated since version 2.3, to be removed in 3.0. - * Use {@link \Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException} - * instead. - */ -class MethodArgumentValueNotImplementedException extends BaseMethodArgumentValueNotImplementedException -{ -} diff --git a/src/Symfony/Component/Locale/Exception/MethodNotImplementedException.php b/src/Symfony/Component/Locale/Exception/MethodNotImplementedException.php deleted file mode 100644 index 1ebcc4809deb..000000000000 --- a/src/Symfony/Component/Locale/Exception/MethodNotImplementedException.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Locale\Exception; - -trigger_error('The '.__NAMESPACE__.'\MethodNotImplementedException class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\Exception\MethodNotImplementedException class instead.', E_USER_DEPRECATED); - -use Symfony\Component\Intl\Exception\MethodNotImplementedException as BaseMethodNotImplementedException; - -/** - * Alias of {@link \Symfony\Component\Intl\Exception\MethodNotImplementedException}. - * - * @author Bernhard Schussek - * - * @deprecated since version 2.3, to be removed in 3.0. - * Use {@link \Symfony\Component\Intl\Exception\MethodNotImplementedException} - * instead. - */ -class MethodNotImplementedException extends BaseMethodNotImplementedException -{ -} diff --git a/src/Symfony/Component/Locale/Exception/NotImplementedException.php b/src/Symfony/Component/Locale/Exception/NotImplementedException.php deleted file mode 100644 index 885c9e56f140..000000000000 --- a/src/Symfony/Component/Locale/Exception/NotImplementedException.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Locale\Exception; - -trigger_error('The '.__NAMESPACE__.'\NotImplementedException class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\Exception\NotImplementedException class instead.', E_USER_DEPRECATED); - -use Symfony\Component\Intl\Exception\NotImplementedException as BaseNotImplementedException; - -/** - * Alias of {@link \Symfony\Component\Intl\Exception\NotImplementedException}. - * - * @author Bernhard Schussek - * - * @deprecated since version 2.3, to be removed in 3.0. - * Use {@link \Symfony\Component\Intl\Exception\NotImplementedException} - * instead. - */ -class NotImplementedException extends BaseNotImplementedException -{ -} diff --git a/src/Symfony/Component/Locale/LICENSE b/src/Symfony/Component/Locale/LICENSE deleted file mode 100644 index 43028bc600f2..000000000000 --- a/src/Symfony/Component/Locale/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2015 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/src/Symfony/Component/Locale/Locale.php b/src/Symfony/Component/Locale/Locale.php deleted file mode 100644 index c0c854356481..000000000000 --- a/src/Symfony/Component/Locale/Locale.php +++ /dev/null @@ -1,195 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Locale; - -trigger_error('The '.__NAMESPACE__.'\Locale class is deprecated since version 2.7, to be removed in Symfony 3.0. Use the methods provided by the \Symfony\Component\Intl\Intl class instead.', E_USER_DEPRECATED); - -use Symfony\Component\Intl\Intl; - -/** - * Helper class for dealing with locale strings. - * - * @author Bernhard Schussek - * - * @deprecated since version 2.3, to be removed in 3.0. - * Use {@link \Locale} and {@link \Symfony\Component\Intl\Intl} instead. - */ -class Locale extends \Locale -{ - /** - * Caches the countries in different locales. - * - * @var array - */ - protected static $countries = array(); - - /** - * Caches the languages in different locales. - * - * @var array - */ - protected static $languages = array(); - - /** - * Caches the different locales. - * - * @var array - */ - protected static $locales = array(); - - /** - * Returns the country names for a locale. - * - * @param string $locale The locale to use for the country names - * - * @return array The country names with their codes as keys - * - * @throws \RuntimeException When the resource bundles cannot be loaded - */ - public static function getDisplayCountries($locale) - { - if (!isset(self::$countries[$locale])) { - self::$countries[$locale] = Intl::getRegionBundle()->getCountryNames($locale); - } - - return self::$countries[$locale]; - } - - /** - * Returns all available country codes. - * - * @return array The country codes - * - * @throws \RuntimeException When the resource bundles cannot be loaded - */ - public static function getCountries() - { - return array_keys(self::getDisplayCountries(self::getDefault())); - } - - /** - * Returns the language names for a locale. - * - * @param string $locale The locale to use for the language names - * - * @return array The language names with their codes as keys - * - * @throws \RuntimeException When the resource bundles cannot be loaded - */ - public static function getDisplayLanguages($locale) - { - if (!isset(self::$languages[$locale])) { - self::$languages[$locale] = Intl::getLanguageBundle()->getLanguageNames($locale); - } - - return self::$languages[$locale]; - } - - /** - * Returns all available language codes. - * - * @return array The language codes - * - * @throws \RuntimeException When the resource bundles cannot be loaded - */ - public static function getLanguages() - { - return array_keys(self::getDisplayLanguages(self::getDefault())); - } - - /** - * Returns the locale names for a locale. - * - * @param string $locale The locale to use for the locale names - * - * @return array The locale names with their codes as keys - * - * @throws \RuntimeException When the resource bundles cannot be loaded - */ - public static function getDisplayLocales($locale) - { - if (!isset(self::$locales[$locale])) { - self::$locales[$locale] = Intl::getLocaleBundle()->getLocaleNames($locale); - } - - return self::$locales[$locale]; - } - - /** - * Returns all available locale codes. - * - * @return array The locale codes - * - * @throws \RuntimeException When the resource bundles cannot be loaded - */ - public static function getLocales() - { - return array_keys(self::getDisplayLocales(self::getDefault())); - } - - /** - * Returns the ICU version as defined by the intl extension. - * - * @return string|null The ICU version - */ - public static function getIntlIcuVersion() - { - return Intl::getIcuVersion(); - } - - /** - * Returns the ICU Data version as defined by the intl extension. - * - * @return string|null The ICU Data version - */ - public static function getIntlIcuDataVersion() - { - return Intl::getIcuDataVersion(); - } - - /** - * Returns the ICU data version that ships with Symfony. If the environment variable USE_INTL_ICU_DATA_VERSION is - * defined, it will try use the ICU data version as defined by the intl extension, if available. - * - * @return string The ICU data version that ships with Symfony - */ - public static function getIcuDataVersion() - { - return Intl::getIcuDataVersion(); - } - - /** - * Returns the directory path of the ICU data that ships with Symfony. - * - * @return string The path to the ICU data directory - */ - public static function getIcuDataDirectory() - { - return Intl::getDataDirectory(); - } - - /** - * Returns the fallback locale for a given locale, if any. - * - * @param string $locale The locale to find the fallback for. - * - * @return string|null The fallback locale, or null if no parent exists - */ - protected static function getFallbackLocale($locale) - { - if (false === $pos = strrpos($locale, '_')) { - return; - } - - return substr($locale, 0, $pos); - } -} diff --git a/src/Symfony/Component/Locale/README.md b/src/Symfony/Component/Locale/README.md deleted file mode 100644 index d2298ec53275..000000000000 --- a/src/Symfony/Component/Locale/README.md +++ /dev/null @@ -1,8 +0,0 @@ -Locale Component -================ - -Locale provides fallback code to handle cases when the ``intl`` extension is -missing. - -The Locale component is deprecated since version 2.3 and will be removed in -Symfony 3.0. You should use the more capable Intl component instead. diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/AmPmTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/AmPmTransformer.php deleted file mode 100644 index 7c3b9fdc0896..000000000000 --- a/src/Symfony/Component/Locale/Stub/DateFormat/AmPmTransformer.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Locale\Stub\DateFormat; - -trigger_error('The '.__NAMESPACE__.'\AmPmTransformer class is deprecated since version 2.3 and will be removed in Symfony 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\AmPmTransformer class instead.', E_USER_DEPRECATED); - -use Symfony\Component\Intl\DateFormatter\DateFormat\AmPmTransformer as BaseAmPmTransformer; - -/** - * Alias of {@link \Symfony\Component\Intl\DateFormatter\DateFormat\AmPmTransformer}. - * - * @author Bernhard Schussek - * - * @deprecated since version 2.3, to be removed in 3.0. - * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\AmPmTransformer} - * instead. - */ -class AmPmTransformer extends BaseAmPmTransformer -{ -} diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/DayOfWeekTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/DayOfWeekTransformer.php deleted file mode 100644 index 5368c6609841..000000000000 --- a/src/Symfony/Component/Locale/Stub/DateFormat/DayOfWeekTransformer.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Locale\Stub\DateFormat; - -trigger_error('The '.__NAMESPACE__.'\DayOfWeekTransformer class is deprecated since version 2.3 and will be removed in Symfony 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\DayOfWeekTransformer class instead.', E_USER_DEPRECATED); - -use Symfony\Component\Intl\DateFormatter\DateFormat\DayOfWeekTransformer as BaseDayOfWeekTransformer; - -/** - * Alias of {@link \Symfony\Component\Intl\DateFormatter\DateFormat\DayOfWeekTransformer}. - * - * @author Bernhard Schussek - * - * @deprecated since version 2.3, to be removed in 3.0. - * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\DayOfWeekTransformer} - * instead. - */ -class DayOfWeekTransformer extends BaseDayOfWeekTransformer -{ -} diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/DayOfYearTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/DayOfYearTransformer.php deleted file mode 100644 index 442085287b65..000000000000 --- a/src/Symfony/Component/Locale/Stub/DateFormat/DayOfYearTransformer.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Locale\Stub\DateFormat; - -trigger_error('The '.__NAMESPACE__.'\DayOfYearTransformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\DayOfYearTransformer class instead.', E_USER_DEPRECATED); - -use Symfony\Component\Intl\DateFormatter\DateFormat\DayOfYearTransformer as BaseDayOfYearTransformer; - -/** - * Alias of {@link \Symfony\Component\Intl\DateFormatter\DateFormat\DayOfYearTransformer}. - * - * @author Bernhard Schussek - * - * @deprecated since version 2.3, to be removed in 3.0. - * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\DayOfYearTransformer} - * instead. - */ -class DayOfYearTransformer extends BaseDayOfYearTransformer -{ -} diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/DayTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/DayTransformer.php deleted file mode 100644 index a85ea820bafc..000000000000 --- a/src/Symfony/Component/Locale/Stub/DateFormat/DayTransformer.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Locale\Stub\DateFormat; - -trigger_error('The '.__NAMESPACE__.'\DayTransformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\DayTransformer class instead.', E_USER_DEPRECATED); - -use Symfony\Component\Intl\DateFormatter\DateFormat\DayTransformer as BaseDayTransformer; - -/** - * Alias of {@link \Symfony\Component\Intl\DateFormatter\DateFormat\DayTransformer}. - * - * @author Bernhard Schussek - * - * @deprecated since version 2.3, to be removed in 3.0. - * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\DayTransformer} - * instead. - */ -class DayTransformer extends BaseDayTransformer -{ -} diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/FullTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/FullTransformer.php deleted file mode 100644 index 2c2c0d2266b2..000000000000 --- a/src/Symfony/Component/Locale/Stub/DateFormat/FullTransformer.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Locale\Stub\DateFormat; - -trigger_error('The '.__NAMESPACE__.'\FullTransformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\FullTransformer class instead.', E_USER_DEPRECATED); - -use Symfony\Component\Intl\DateFormatter\DateFormat\FullTransformer as BaseFullTransformer; - -/** - * Alias of {@link \Symfony\Component\Intl\DateFormatter\DateFormat\FullTransformer}. - * - * @author Bernhard Schussek - * - * @deprecated since version 2.3, to be removed in 3.0. - * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\FullTransformer} - * instead. - */ -class FullTransformer extends BaseFullTransformer -{ -} diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/Hour1200Transformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/Hour1200Transformer.php deleted file mode 100644 index 253f7274b1e9..000000000000 --- a/src/Symfony/Component/Locale/Stub/DateFormat/Hour1200Transformer.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Locale\Stub\DateFormat; - -trigger_error('The '.__NAMESPACE__.'\Hour1200Transformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\Hour1200Transformer class instead.', E_USER_DEPRECATED); - -use Symfony\Component\Intl\DateFormatter\DateFormat\Hour1200Transformer as BaseHour1200Transformer; - -/** - * Alias of {@link \Symfony\Component\Intl\DateFormatter\DateFormat\Hour1200Transformer}. - * - * @author Bernhard Schussek - * - * @deprecated since version 2.3, to be removed in 3.0. - * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\Hour1200Transformer} - * instead. - */ -class Hour1200Transformer extends BaseHour1200Transformer -{ -} diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/Hour1201Transformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/Hour1201Transformer.php deleted file mode 100644 index f689c45a6ef8..000000000000 --- a/src/Symfony/Component/Locale/Stub/DateFormat/Hour1201Transformer.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Locale\Stub\DateFormat; - -trigger_error('The '.__NAMESPACE__.'\Hour1201Transformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\Hour1201Transformer class instead.', E_USER_DEPRECATED); - -use Symfony\Component\Intl\DateFormatter\DateFormat\Hour1201Transformer as BaseHour1201Transformer; - -/** - * Alias of {@link \Symfony\Component\Intl\DateFormatter\DateFormat\Hour1201Transformer}. - * - * @author Bernhard Schussek - * - * @deprecated since version 2.3, to be removed in 3.0. - * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\Hour1201Transformer} - * instead. - */ -class Hour1201Transformer extends BaseHour1201Transformer -{ -} diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/Hour2400Transformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/Hour2400Transformer.php deleted file mode 100644 index 2e34f168ad72..000000000000 --- a/src/Symfony/Component/Locale/Stub/DateFormat/Hour2400Transformer.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Locale\Stub\DateFormat; - -trigger_error('The '.__NAMESPACE__.'\Hour2400Transformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\Hour2400Transformer class instead.', E_USER_DEPRECATED); - -use Symfony\Component\Intl\DateFormatter\DateFormat\Hour2400Transformer as BaseHour2400Transformer; - -/** - * Alias of {@link \Symfony\Component\Intl\DateFormatter\DateFormat\Hour2400Transformer}. - * - * @author Bernhard Schussek - * - * @deprecated since version 2.3, to be removed in 3.0. - * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\Hour2400Transformer} - * instead. - */ -class Hour2400Transformer extends BaseHour2400Transformer -{ -} diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/Hour2401Transformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/Hour2401Transformer.php deleted file mode 100644 index f9cb610df61c..000000000000 --- a/src/Symfony/Component/Locale/Stub/DateFormat/Hour2401Transformer.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Locale\Stub\DateFormat; - -trigger_error('The '.__NAMESPACE__.'\Hour2401Transformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\Hour2401Transformer class instead.', E_USER_DEPRECATED); - -use Symfony\Component\Intl\DateFormatter\DateFormat\Hour2401Transformer as BaseHour2401Transformer; - -/** - * Alias of {@link \Symfony\Component\Intl\DateFormatter\DateFormat\Hour2401Transformer}. - * - * @author Bernhard Schussek - * - * @deprecated since version 2.3, to be removed in 3.0. - * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\Hour2401Transformer} - * instead. - */ -class Hour2401Transformer extends BaseHour2401Transformer -{ -} diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/HourTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/HourTransformer.php deleted file mode 100644 index 7e5df5a729c3..000000000000 --- a/src/Symfony/Component/Locale/Stub/DateFormat/HourTransformer.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Locale\Stub\DateFormat; - -trigger_error('The '.__NAMESPACE__.'\HourTransformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\HourTransformer class instead.', E_USER_DEPRECATED); - -use Symfony\Component\Intl\DateFormatter\DateFormat\HourTransformer as BaseHourTransformer; - -/** - * Alias of {@link \Symfony\Component\Intl\DateFormatter\DateFormat\HourTransformer}. - * - * @author Bernhard Schussek - * - * @deprecated since version 2.3, to be removed in 3.0. - * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\HourTransformer} - * instead. - */ -abstract class HourTransformer extends BaseHourTransformer -{ -} diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/MinuteTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/MinuteTransformer.php deleted file mode 100644 index 6768404fd993..000000000000 --- a/src/Symfony/Component/Locale/Stub/DateFormat/MinuteTransformer.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Locale\Stub\DateFormat; - -trigger_error('The '.__NAMESPACE__.'\MinuteTransformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\MinuteTransformer class instead.', E_USER_DEPRECATED); - -use Symfony\Component\Intl\DateFormatter\DateFormat\MinuteTransformer as BaseMinuteTransformer; - -/** - * Alias of {@link \Symfony\Component\Intl\DateFormatter\DateFormat\MinuteTransformer}. - * - * @author Bernhard Schussek - * - * @deprecated since version 2.3, to be removed in 3.0. - * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\MinuteTransformer} - * instead. - */ -class MinuteTransformer extends BaseMinuteTransformer -{ -} diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/MonthTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/MonthTransformer.php deleted file mode 100644 index 351ff0e6f68f..000000000000 --- a/src/Symfony/Component/Locale/Stub/DateFormat/MonthTransformer.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Locale\Stub\DateFormat; - -trigger_error('The '.__NAMESPACE__.'\MonthTransformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\MonthTransformer class instead.', E_USER_DEPRECATED); - -use Symfony\Component\Intl\DateFormatter\DateFormat\MonthTransformer as BaseMonthTransformer; - -/** - * Alias of {@link \Symfony\Component\Intl\DateFormatter\DateFormat\MonthTransformer}. - * - * @author Bernhard Schussek - * - * @deprecated since version 2.3, to be removed in 3.0. - * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\MonthTransformer} - * instead. - */ -class MonthTransformer extends BaseMonthTransformer -{ -} diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/QuarterTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/QuarterTransformer.php deleted file mode 100644 index ef09fa4bceaf..000000000000 --- a/src/Symfony/Component/Locale/Stub/DateFormat/QuarterTransformer.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Locale\Stub\DateFormat; - -trigger_error('The '.__NAMESPACE__.'\QuarterTransformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\QuarterTransformer class instead.', E_USER_DEPRECATED); - -use Symfony\Component\Intl\DateFormatter\DateFormat\QuarterTransformer as BaseQuarterTransformer; - -/** - * Alias of {@link \Symfony\Component\Intl\DateFormatter\DateFormat\QuarterTransformer}. - * - * @author Bernhard Schussek - * - * @deprecated since version 2.3, to be removed in 3.0. - * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\QuarterTransformer} - * instead. - */ -class QuarterTransformer extends BaseQuarterTransformer -{ -} diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/SecondTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/SecondTransformer.php deleted file mode 100644 index 6afc55004daf..000000000000 --- a/src/Symfony/Component/Locale/Stub/DateFormat/SecondTransformer.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Locale\Stub\DateFormat; - -trigger_error('The '.__NAMESPACE__.'\SecondTransformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\SecondTransformer class instead.', E_USER_DEPRECATED); - -use Symfony\Component\Intl\DateFormatter\DateFormat\SecondTransformer as BaseSecondTransformer; - -/** - * Alias of {@link \Symfony\Component\Intl\DateFormatter\DateFormat\SecondTransformer}. - * - * @author Bernhard Schussek - * - * @deprecated since version 2.3, to be removed in 3.0. - * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\SecondTransformer} - * instead. - */ -class SecondTransformer extends BaseSecondTransformer -{ -} diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/TimeZoneTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/TimeZoneTransformer.php deleted file mode 100644 index 7af84f297178..000000000000 --- a/src/Symfony/Component/Locale/Stub/DateFormat/TimeZoneTransformer.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Locale\Stub\DateFormat; - -trigger_error('The '.__NAMESPACE__.'\TimeZoneTransformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\TimeZoneTransformer class instead.', E_USER_DEPRECATED); - -use Symfony\Component\Intl\DateFormatter\DateFormat\TimeZoneTransformer as BaseTimeZoneTransformer; - -/** - * Alias of {@link \Symfony\Component\Intl\DateFormatter\DateFormat\TimeZoneTransformer}. - * - * @author Bernhard Schussek - * - * @deprecated since version 2.3, to be removed in 3.0. - * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\TimeZoneTransformer} - * instead. - */ -class TimeZoneTransformer extends BaseTimeZoneTransformer -{ -} diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/Transformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/Transformer.php deleted file mode 100644 index 7b9cf155c8e2..000000000000 --- a/src/Symfony/Component/Locale/Stub/DateFormat/Transformer.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Locale\Stub\DateFormat; - -trigger_error('The '.__NAMESPACE__.'\Transformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\Transformer class instead.', E_USER_DEPRECATED); - -use Symfony\Component\Intl\DateFormatter\DateFormat\Transformer as BaseTransformer; - -/** - * Alias of {@link \Symfony\Component\Intl\DateFormatter\DateFormat\Transformer}. - * - * @author Bernhard Schussek - * - * @deprecated since version 2.3, to be removed in 3.0. - * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\Transformer} - * instead. - */ -abstract class Transformer extends BaseTransformer -{ -} diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/YearTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/YearTransformer.php deleted file mode 100644 index f733c8abf9aa..000000000000 --- a/src/Symfony/Component/Locale/Stub/DateFormat/YearTransformer.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Locale\Stub\DateFormat; - -trigger_error('The '.__NAMESPACE__.'\YearTransformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\YearTransformer class instead.', E_USER_DEPRECATED); - -use Symfony\Component\Intl\DateFormatter\DateFormat\YearTransformer as BaseYearTransformer; - -/** - * Alias of {@link \Symfony\Component\Intl\DateFormatter\DateFormat\YearTransformer}. - * - * @author Bernhard Schussek - * - * @deprecated since version 2.3, to be removed in 3.0. - * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\YearTransformer} - * instead. - */ -class YearTransformer extends BaseYearTransformer -{ -} diff --git a/src/Symfony/Component/Locale/Stub/StubCollator.php b/src/Symfony/Component/Locale/Stub/StubCollator.php deleted file mode 100644 index eeffde1ec27d..000000000000 --- a/src/Symfony/Component/Locale/Stub/StubCollator.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Locale\Stub; - -trigger_error('The '.__NAMESPACE__.'\StubCollator class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\Collator\Collator class instead.', E_USER_DEPRECATED); - -use Symfony\Component\Intl\Collator\Collator; - -/** - * Alias of {@link \Symfony\Component\Intl\Collator\Collator}. - * - * @author Bernhard Schussek - * - * @deprecated since version 2.3, to be removed in 3.0. - * Use {@link \Symfony\Component\Intl\Collator\Collator} instead. - */ -class StubCollator extends Collator -{ -} diff --git a/src/Symfony/Component/Locale/Stub/StubIntl.php b/src/Symfony/Component/Locale/Stub/StubIntl.php deleted file mode 100644 index 456279129195..000000000000 --- a/src/Symfony/Component/Locale/Stub/StubIntl.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Locale\Stub; - -trigger_error('The '.__NAMESPACE__.'\StubIntl class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\Globals\IntlGlobals class instead.', E_USER_DEPRECATED); - -use Symfony\Component\Intl\Globals\IntlGlobals; - -/** - * Alias of {@link \Symfony\Component\Intl\Globals\IntlGlobals}. - * - * @author Bernhard Schussek - * - * @deprecated since version 2.3, to be removed in 3.0. - * Use {@link \Symfony\Component\Intl\Globals\IntlGlobals} instead. - */ -abstract class StubIntl extends IntlGlobals -{ -} diff --git a/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php b/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php deleted file mode 100644 index 4826f27ade9a..000000000000 --- a/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Locale\Stub; - -trigger_error('The '.__NAMESPACE__.'\StubIntlDateFormatter class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\IntlDateFormatter class instead.', E_USER_DEPRECATED); - -use Symfony\Component\Intl\DateFormatter\IntlDateFormatter; - -/** - * Alias of {@link \Symfony\Component\Intl\DateFormatter\IntlDateFormatter}. - * - * @author Bernhard Schussek - * - * @deprecated since version 2.3, to be removed in 3.0. - * Use {@link \Symfony\Component\Intl\DateFormatter\IntlDateFormatter} - * instead. - */ -class StubIntlDateFormatter extends IntlDateFormatter -{ -} diff --git a/src/Symfony/Component/Locale/Stub/StubLocale.php b/src/Symfony/Component/Locale/Stub/StubLocale.php deleted file mode 100644 index 001bf53c0012..000000000000 --- a/src/Symfony/Component/Locale/Stub/StubLocale.php +++ /dev/null @@ -1,110 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Locale\Stub; - -trigger_error('The '.__NAMESPACE__.'\StubLocale class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\Locale\Locale and Symfony\Component\Intl\Intl classes instead.', E_USER_DEPRECATED); - -use Symfony\Component\Intl\Intl; -use Symfony\Component\Intl\Locale\Locale; - -/** - * Alias of {@link \Symfony\Component\Intl\Locale\Locale}. - * - * @author Bernhard Schussek - * - * @deprecated since version 2.3, to be removed in 3.0. - * Use {@link \Symfony\Component\Intl\Locale\Locale} and - * {@link \Symfony\Component\Intl\Intl} instead. - */ -class StubLocale extends Locale -{ - /** - * Caches the currencies. - * - * @var array - */ - protected static $currencies; - - /** - * Caches the currencies names. - * - * @var array - */ - protected static $currenciesNames; - - /** - * Returns the currencies data. - * - * @param string $locale - * - * @return array The currencies data - */ - public static function getCurrenciesData($locale) - { - if (null === self::$currencies) { - self::prepareCurrencies($locale); - } - - return self::$currencies; - } - - /** - * Returns the currencies names for a locale. - * - * @param string $locale The locale to use for the currencies names - * - * @return array The currencies names with their codes as keys - * - * @throws \InvalidArgumentException When the locale is different than 'en' - */ - public static function getDisplayCurrencies($locale) - { - if (null === self::$currenciesNames) { - self::prepareCurrencies($locale); - } - - return self::$currenciesNames; - } - - /** - * Returns all available currencies codes. - * - * @return array The currencies codes - */ - public static function getCurrencies() - { - return array_keys(self::getCurrenciesData(self::getDefault())); - } - - public static function getDataDirectory() - { - return Intl::getDataDirectory(); - } - - private static function prepareCurrencies($locale) - { - self::$currencies = array(); - self::$currenciesNames = array(); - - $bundle = Intl::getCurrencyBundle(); - - foreach ($bundle->getCurrencyNames($locale) as $currency => $name) { - self::$currencies[$currency] = array( - 'name' => $name, - 'symbol' => $bundle->getCurrencySymbol($currency, $locale), - 'fractionDigits' => $bundle->getFractionDigits($currency), - 'roundingIncrement' => $bundle->getRoundingIncrement($currency), - ); - self::$currenciesNames[$currency] = $name; - } - } -} diff --git a/src/Symfony/Component/Locale/Stub/StubNumberFormatter.php b/src/Symfony/Component/Locale/Stub/StubNumberFormatter.php deleted file mode 100644 index aa4aae014d4b..000000000000 --- a/src/Symfony/Component/Locale/Stub/StubNumberFormatter.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Locale\Stub; - -trigger_error('The '.__NAMESPACE__.'\StubNumberFormatter class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\NumberFormatter\NumberFormatter class instead.', E_USER_DEPRECATED); - -use Symfony\Component\Intl\NumberFormatter\NumberFormatter; - -/** - * Alias of {@link \Symfony\Component\Intl\NumberFormatter\NumberFormatter}. - * - * @author Bernhard Schussek - * - * @deprecated since version 2.3, to be removed in 3.0. - * Use {@link \Symfony\Component\Intl\NumberFormatter\NumberFormatter} - * instead. - */ -class StubNumberFormatter extends NumberFormatter -{ -} diff --git a/src/Symfony/Component/Locale/Tests/LocaleTest.php b/src/Symfony/Component/Locale/Tests/LocaleTest.php deleted file mode 100644 index 149c4c7a9526..000000000000 --- a/src/Symfony/Component/Locale/Tests/LocaleTest.php +++ /dev/null @@ -1,79 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Locale\Tests; - -use Symfony\Component\Intl\Util\IntlTestHelper; -use Symfony\Component\Locale\Locale; - -/** - * Test case for the {@link Locale} class. - * - * @author Bernhard Schussek - */ -class LocaleTest extends \PHPUnit_Framework_TestCase -{ - protected function setUp() - { - $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); - - // Locale extends \Locale, so intl must be present - IntlTestHelper::requireIntl($this); - } - - public function testGetDisplayCountries() - { - $countries = Locale::getDisplayCountries('en'); - $this->assertEquals('Brazil', $countries['BR']); - } - - public function testGetDisplayCountriesForSwitzerland() - { - $countries = Locale::getDisplayCountries('de_CH'); - $this->assertEquals('Schweiz', $countries['CH']); - } - - public function testGetCountries() - { - $countries = Locale::getCountries(); - $this->assertContains('BR', $countries); - } - - public function testGetCountriesForSwitzerland() - { - $countries = Locale::getCountries(); - $this->assertContains('CH', $countries); - } - - public function testGetDisplayLanguages() - { - $languages = Locale::getDisplayLanguages('en'); - $this->assertEquals('Brazilian Portuguese', $languages['pt_BR']); - } - - public function testGetLanguages() - { - $languages = Locale::getLanguages(); - $this->assertContains('pt_BR', $languages); - } - - public function testGetDisplayLocales() - { - $locales = Locale::getDisplayLocales('en'); - $this->assertEquals('Portuguese', $locales['pt']); - } - - public function testGetLocales() - { - $locales = Locale::getLocales(); - $this->assertContains('pt', $locales); - } -} diff --git a/src/Symfony/Component/Locale/Tests/Stub/StubLocaleTest.php b/src/Symfony/Component/Locale/Tests/Stub/StubLocaleTest.php deleted file mode 100644 index 44b5ab7961ca..000000000000 --- a/src/Symfony/Component/Locale/Tests/Stub/StubLocaleTest.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Locale\Tests\Stub; - -use Symfony\Component\Intl\Util\IntlTestHelper; -use Symfony\Component\Locale\Stub\StubLocale; - -/** - * @author Bernhard Schussek - */ -class StubLocaleTest extends \PHPUnit_Framework_TestCase -{ - protected function setUp() - { - $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); - - // Locale extends \Locale, so intl must be present - IntlTestHelper::requireIntl($this); - } - - public function testGetCurrenciesData() - { - $currencies = StubLocale::getCurrenciesData('en'); - $this->assertEquals('R$', $currencies['BRL']['symbol']); - $this->assertEquals('Brazilian Real', $currencies['BRL']['name']); - $this->assertEquals(2, $currencies['BRL']['fractionDigits']); - $this->assertEquals(0, $currencies['BRL']['roundingIncrement']); - } - - public function testGetDisplayCurrencies() - { - $currencies = StubLocale::getDisplayCurrencies('en'); - $this->assertEquals('Brazilian Real', $currencies['BRL']); - - // Checking that the cache is being used - $currencies = StubLocale::getDisplayCurrencies('en'); - $this->assertEquals('Argentine Peso', $currencies['ARS']); - } - - public function testGetCurrencies() - { - $currencies = StubLocale::getCurrencies(); - $this->assertTrue(in_array('BRL', $currencies)); - } -} diff --git a/src/Symfony/Component/Locale/composer.json b/src/Symfony/Component/Locale/composer.json deleted file mode 100644 index af2de1b96f95..000000000000 --- a/src/Symfony/Component/Locale/composer.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "symfony/locale", - "type": "library", - "description": "Symfony Locale Component", - "keywords": [], - "homepage": "http://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "require": { - "php": ">=5.5.9", - "symfony/intl": "~2.7|~3.0" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7|~3.0" - }, - "autoload": { - "psr-0": { "Symfony\\Component\\Locale\\": "" } - }, - "target-dir": "Symfony/Component/Locale", - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - } -} diff --git a/src/Symfony/Component/Locale/phpunit.xml.dist b/src/Symfony/Component/Locale/phpunit.xml.dist deleted file mode 100644 index 0d9b637cc78d..000000000000 --- a/src/Symfony/Component/Locale/phpunit.xml.dist +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - ./Tests/ - - - - - - ./ - - ./Resources - ./Tests - ./vendor - - - -