Updating vendors

skala
Julio Montoya 11 years ago
parent 23f2d7a20e
commit d7be3fbf43
  1. 2
      vendor/autoload.php
  2. 6
      vendor/composer/autoload_real.php
  3. 284
      vendor/composer/installed.json
  4. 3
      vendor/doctrine/annotations/.gitignore
  5. 2
      vendor/doctrine/cache/.gitignore
  6. 2
      vendor/opauth/opauth/lib/Opauth/Strategy/.gitignore
  7. 43
      vendor/symfony/intl/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php
  8. 6
      vendor/symfony/intl/Symfony/Component/Intl/ResourceBundle/LanguageBundle.php
  9. 4
      vendor/symfony/intl/Symfony/Component/Intl/ResourceBundle/RegionBundle.php
  10. 49
      vendor/symfony/intl/Symfony/Component/Intl/Tests/NumberFormatter/AbstractNumberFormatterTest.php
  11. 26
      vendor/symfony/intl/Symfony/Component/Intl/Tests/NumberFormatter/NumberFormatterTest.php
  12. 4
      vendor/symfony/intl/Symfony/Component/Intl/Tests/ResourceBundle/RegionBundleTest.php
  13. 2
      vendor/symfony/validator/Symfony/Component/Validator/Constraints/NotBlankValidator.php
  14. 1
      vendor/symfony/validator/Symfony/Component/Validator/Mapping/Loader/AbstractLoader.php
  15. 2
      vendor/symfony/validator/Symfony/Component/Validator/Mapping/Loader/XmlFileLoader.php
  16. 2
      vendor/symfony/validator/Symfony/Component/Validator/README.md
  17. 10
      vendor/symfony/validator/Symfony/Component/Validator/Tests/Constraints/CountryValidatorTest.php
  18. 12
      vendor/symfony/validator/Symfony/Component/Validator/Tests/Constraints/LanguageValidatorTest.php

@ -4,4 +4,4 @@
require_once __DIR__ . '/composer' . '/autoload_real.php';
return ComposerAutoloaderInit3bffda8806ef4f4cf7bb8421fbcc7b71::getLoader();
return ComposerAutoloaderInitdbe3fea4fd58b407b2163779233af172::getLoader();

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit3bffda8806ef4f4cf7bb8421fbcc7b71
class ComposerAutoloaderInitdbe3fea4fd58b407b2163779233af172
{
private static $loader;
@ -19,9 +19,9 @@ class ComposerAutoloaderInit3bffda8806ef4f4cf7bb8421fbcc7b71
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit3bffda8806ef4f4cf7bb8421fbcc7b71', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInitdbe3fea4fd58b407b2163779233af172', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInit3bffda8806ef4f4cf7bb8421fbcc7b71', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInitdbe3fea4fd58b407b2163779233af172', 'loadClassLoader'));
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);

@ -322,85 +322,6 @@
"intl"
]
},
{
"name": "symfony/intl",
"version": "v2.3.4",
"version_normalized": "2.3.4.0",
"target-dir": "Symfony/Component/Intl",
"source": {
"type": "git",
"url": "https://github.com/symfony/Intl.git",
"reference": "ebbcf7e3dab5185b4b24c961431e302a0ffb66ec"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Intl/zipball/ebbcf7e3dab5185b4b24c961431e302a0ffb66ec",
"reference": "ebbcf7e3dab5185b4b24c961431e302a0ffb66ec",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"symfony/icu": "~1.0-RC"
},
"require-dev": {
"symfony/filesystem": ">=2.1"
},
"suggest": {
"ext-intl": "to use the component with locales other than \"en\""
},
"time": "2013-08-24 14:32:55",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.3-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-0": {
"Symfony\\Component\\Intl\\": ""
},
"classmap": [
"Symfony/Component/Intl/Resources/stubs"
],
"files": [
"Symfony/Component/Intl/Resources/stubs/functions.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
},
{
"name": "Igor Wiedler",
"email": "igor@wiedler.ch",
"homepage": "http://wiedler.ch/igor/"
},
{
"name": "Bernhard Schussek",
"email": "bschussek@gmail.com"
},
{
"name": "Eriksen Costa",
"email": "eriksen.costa@infranology.com.br"
}
],
"description": "A PHP replacement layer for the C intl extension that includes additional data from the ICU library.",
"homepage": "http://symfony.com",
"keywords": [
"i18n",
"icu",
"internationalization",
"intl",
"l10n",
"localization"
]
},
{
"name": "pimple/pimple",
"version": "v1.0.2",
@ -2682,69 +2603,6 @@
"description": "Symfony Translation Component",
"homepage": "http://symfony.com"
},
{
"name": "symfony/validator",
"version": "v2.3.4",
"version_normalized": "2.3.4.0",
"target-dir": "Symfony/Component/Validator",
"source": {
"type": "git",
"url": "https://github.com/symfony/Validator.git",
"reference": "8f6f6be47fb8e1179cd225b1f949630e26221e42"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Validator/zipball/8f6f6be47fb8e1179cd225b1f949630e26221e42",
"reference": "8f6f6be47fb8e1179cd225b1f949630e26221e42",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"symfony/translation": "~2.0"
},
"require-dev": {
"symfony/config": "~2.2",
"symfony/http-foundation": "~2.1",
"symfony/intl": "~2.3",
"symfony/yaml": "~2.0"
},
"suggest": {
"doctrine/common": "",
"symfony/config": "",
"symfony/http-foundation": "",
"symfony/intl": "",
"symfony/yaml": ""
},
"time": "2013-08-24 15:26:22",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.3-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-0": {
"Symfony\\Component\\Validator\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
}
],
"description": "Symfony Validator Component",
"homepage": "http://symfony.com"
},
{
"name": "symfony/locale",
"version": "v2.3.4",
@ -4791,5 +4649,147 @@
],
"description": "Symfony DomCrawler Component",
"homepage": "http://symfony.com"
},
{
"name": "symfony/intl",
"version": "v2.3.5",
"version_normalized": "2.3.5.0",
"target-dir": "Symfony/Component/Intl",
"source": {
"type": "git",
"url": "https://github.com/symfony/Intl.git",
"reference": "7b86304a8e8d829ecf195035d55bd09022ef2ad5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Intl/zipball/7b86304a8e8d829ecf195035d55bd09022ef2ad5",
"reference": "7b86304a8e8d829ecf195035d55bd09022ef2ad5",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"symfony/icu": "~1.0-RC"
},
"require-dev": {
"symfony/filesystem": ">=2.1"
},
"suggest": {
"ext-intl": "to use the component with locales other than \"en\""
},
"time": "2013-09-22 18:04:39",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.3-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-0": {
"Symfony\\Component\\Intl\\": ""
},
"classmap": [
"Symfony/Component/Intl/Resources/stubs"
],
"files": [
"Symfony/Component/Intl/Resources/stubs/functions.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
},
{
"name": "Igor Wiedler",
"email": "igor@wiedler.ch",
"homepage": "http://wiedler.ch/igor/"
},
{
"name": "Bernhard Schussek",
"email": "bschussek@gmail.com"
},
{
"name": "Eriksen Costa",
"email": "eriksen.costa@infranology.com.br"
}
],
"description": "A PHP replacement layer for the C intl extension that includes additional data from the ICU library.",
"homepage": "http://symfony.com",
"keywords": [
"i18n",
"icu",
"internationalization",
"intl",
"l10n",
"localization"
]
},
{
"name": "symfony/validator",
"version": "v2.3.5",
"version_normalized": "2.3.5.0",
"target-dir": "Symfony/Component/Validator",
"source": {
"type": "git",
"url": "https://github.com/symfony/Validator.git",
"reference": "3d659f721f18425034bab0998c82de10d091ce7a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Validator/zipball/3d659f721f18425034bab0998c82de10d091ce7a",
"reference": "3d659f721f18425034bab0998c82de10d091ce7a",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"symfony/translation": "~2.0"
},
"require-dev": {
"symfony/config": "~2.2",
"symfony/http-foundation": "~2.1",
"symfony/intl": "~2.3",
"symfony/yaml": "~2.0"
},
"suggest": {
"doctrine/common": "",
"symfony/config": "",
"symfony/http-foundation": "",
"symfony/intl": "",
"symfony/yaml": ""
},
"time": "2013-09-19 09:45:20",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.3-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-0": {
"Symfony\\Component\\Validator\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "http://symfony.com/contributors"
}
],
"description": "Symfony Validator Component",
"homepage": "http://symfony.com"
}
]

@ -1,3 +0,0 @@
vendor/
composer.lock
composer.phar

@ -1,2 +0,0 @@
vendor/
phpunit.xml

@ -1,2 +0,0 @@
# Ignore strategies
*/

@ -232,6 +232,16 @@ class NumberFormatter
'negative' => -9223372036854775808
);
private static $enSymbols = array(
self::DECIMAL => array('.', ',', ';', '%', '0', '#', '-', '+', '¤', '¤¤', '.', 'E', '‰', '*', '∞', 'NaN', '@', ','),
self::CURRENCY => array('.', ',', ';', '%', '0', '#', '-', '+', '¤', '¤¤', '.', 'E', '‰', '*', '∞', 'NaN', '@', ','),
);
private static $enTextAttributes = array(
self::DECIMAL => array('', '', '-', '', '*', '', ''),
self::CURRENCY => array('¤', '', '(¤', ')', '*', ''),
);
/**
* Constructor.
*
@ -453,12 +463,10 @@ class NumberFormatter
* @return Boolean|string The symbol value or false on error
*
* @see http://www.php.net/manual/en/numberformatter.getsymbol.php
*
* @throws MethodNotImplementedException
*/
public function getSymbol($attr)
{
throw new MethodNotImplementedException(__METHOD__);
return array_key_exists($this->style, self::$enSymbols) && array_key_exists($attr, self::$enSymbols[$this->style]) ? self::$enSymbols[$this->style][$attr] : false;
}
/**
@ -469,12 +477,10 @@ class NumberFormatter
* @return Boolean|string The attribute value or false on error
*
* @see http://www.php.net/manual/en/numberformatter.gettextattribute.php
*
* @throws MethodNotImplementedException
*/
public function getTextAttribute($attr)
{
throw new MethodNotImplementedException(__METHOD__);
return array_key_exists($this->style, self::$enTextAttributes) && array_key_exists($attr, self::$enTextAttributes[$this->style]) ? self::$enTextAttributes[$this->style][$attr] : false;
}
/**
@ -499,18 +505,14 @@ class NumberFormatter
* Parse a number
*
* @param string $value The value to parse
* @param int $type Type of the formatting, one of the format type constants.
* The only currently supported types are NumberFormatter::TYPE_DOUBLE,
* NumberFormatter::TYPE_INT32 and NumberFormatter::TYPE_INT64.
* @param int $position Not supported. Offset to begin the parsing on return this value will hold the offset at which the parsing ended
* @param string $type Type of the formatting, one of the format type constants. NumberFormatter::TYPE_DOUBLE by default
* @param int $position Offset to begin the parsing on return this value will hold the offset at which the parsing ended
*
* @return Boolean|string The parsed value of false on error
*
* @see http://www.php.net/manual/en/numberformatter.parse.php
*
* @throws MethodArgumentNotImplementedException When $position different than null, behavior not implemented
* @see http://www.php.net/manual/en/numberformatter.parse.php
*/
public function parse($value, $type = self::TYPE_DOUBLE, &$position = null)
public function parse($value, $type = self::TYPE_DOUBLE, &$position = 0)
{
if ($type == self::TYPE_DEFAULT || $type == self::TYPE_CURRENCY) {
trigger_error(__METHOD__.'(): Unsupported format type '.$type, \E_USER_WARNING);
@ -518,25 +520,22 @@ class NumberFormatter
return false;
}
// We don't calculate the position when parsing the value
if (null !== $position) {
throw new MethodArgumentNotImplementedException(__METHOD__, 'position');
}
preg_match('/^([^0-9\-]{0,})(.*)/', $value, $matches);
preg_match('/^([^0-9\-\.]{0,})(.*)/', $value, $matches);
// Any string before the numeric value causes error in the parsing
if (isset($matches[1]) && !empty($matches[1])) {
IntlGlobals::setError(IntlGlobals::U_PARSE_ERROR, 'Number parsing failed');
$this->errorCode = IntlGlobals::getErrorCode();
$this->errorMessage = IntlGlobals::getErrorMessage();
$position = 0;
return false;
}
// Remove everything that is not number or dot (.)
$value = preg_replace('/[^0-9\.\-]/', '', $value);
preg_match('/^[0-9\-\.\,]*/', $value, $matches);
$value = preg_replace('/[^0-9\.\-]/', '', $matches[0]);
$value = $this->convertValueDataType($value, $type);
$position = strlen($matches[0]);
// behave like the intl extension
$this->resetError();

@ -27,7 +27,7 @@ class LanguageBundle extends AbstractBundle implements LanguageBundleInterface
$locale = \Locale::getDefault();
}
if (null === ($languages = $this->readEntry($locale, array('Languages')))) {
if (null === ($languages = $this->readEntry($locale, array('Languages'), true))) {
return null;
}
@ -49,7 +49,7 @@ class LanguageBundle extends AbstractBundle implements LanguageBundleInterface
$locale = \Locale::getDefault();
}
if (null === ($languages = $this->readEntry($locale, array('Languages')))) {
if (null === ($languages = $this->readEntry($locale, array('Languages'), true))) {
return array();
}
@ -102,7 +102,7 @@ class LanguageBundle extends AbstractBundle implements LanguageBundleInterface
$locale = \Locale::getDefault();
}
if (null === ($scripts = $this->readEntry($locale, array('Scripts')))) {
if (null === ($scripts = $this->readEntry($locale, array('Scripts'), true))) {
return array();
}

@ -27,7 +27,7 @@ class RegionBundle extends AbstractBundle implements RegionBundleInterface
$locale = \Locale::getDefault();
}
return $this->readEntry($locale, array('Countries', $country));
return $this->readEntry($locale, array('Countries', $country), true);
}
/**
@ -39,7 +39,7 @@ class RegionBundle extends AbstractBundle implements RegionBundleInterface
$locale = \Locale::getDefault();
}
if (null === ($countries = $this->readEntry($locale, array('Countries')))) {
if (null === ($countries = $this->readEntry($locale, array('Countries'), true))) {
return array();
}

@ -472,14 +472,46 @@ abstract class AbstractNumberFormatterTest extends \PHPUnit_Framework_TestCase
$this->assertEquals('en', $formatter->getLocale());
}
public function testGetSymbol()
{
$decimalFormatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL);
$currencyFormatter = $this->getNumberFormatter('en', NumberFormatter::CURRENCY);
$r = new \ReflectionProperty('Symfony\Component\Intl\NumberFormatter\NumberFormatter', 'enSymbols');
$r->setAccessible(true);
$expected = $r->getValue('Symfony\Component\Intl\NumberFormatter\NumberFormatter');
for ($i = 0; $i <= 17; $i++) {
$this->assertSame($expected[1][$i], $decimalFormatter->getSymbol($i));
$this->assertSame($expected[2][$i], $currencyFormatter->getSymbol($i));
}
}
public function testGetTextAttribute()
{
$decimalFormatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL);
$currencyFormatter = $this->getNumberFormatter('en', NumberFormatter::CURRENCY);
$r = new \ReflectionProperty('Symfony\Component\Intl\NumberFormatter\NumberFormatter', 'enTextAttributes');
$r->setAccessible(true);
$expected = $r->getValue('Symfony\Component\Intl\NumberFormatter\NumberFormatter');
for ($i = 0; $i <= 5; $i++) {
$this->assertSame($expected[1][$i], $decimalFormatter->getTextAttribute($i));
$this->assertSame($expected[2][$i], $currencyFormatter->getTextAttribute($i));
}
}
/**
* @dataProvider parseProvider
*/
public function testParse($value, $expected, $message = '')
public function testParse($value, $expected, $message, $expectedPosition)
{
$position = 0;
$formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL);
$parsedValue = $formatter->parse($value, NumberFormatter::TYPE_DOUBLE);
$parsedValue = $formatter->parse($value, NumberFormatter::TYPE_DOUBLE, $position);
$this->assertSame($expected, $parsedValue, $message);
$this->assertSame($expectedPosition, $position, $message);
if ($expected === false) {
$errorCode = IntlGlobals::U_PARSE_ERROR;
@ -500,8 +532,8 @@ abstract class AbstractNumberFormatterTest extends \PHPUnit_Framework_TestCase
public function parseProvider()
{
return array(
array('prefix1', false, '->parse() does not parse a number with a string prefix.'),
array('1suffix', (float) 1, '->parse() parses a number with a string suffix.'),
array('prefix1', false, '->parse() does not parse a number with a string prefix.', 0),
array('1.4suffix', (float) 1.4, '->parse() parses a number with a string suffix.', 3),
);
}
@ -529,6 +561,7 @@ abstract class AbstractNumberFormatterTest extends \PHPUnit_Framework_TestCase
return array(
array('1', 1),
array('1.1', 1),
array('.1', 0),
array('2,147,483,647', 2147483647),
array('-2,147,483,648', -2147483647 - 1),
array('2,147,483,648', false, '->parse() TYPE_INT32 returns false when the number is greater than the integer positive range.'),
@ -663,14 +696,6 @@ abstract class AbstractNumberFormatterTest extends \PHPUnit_Framework_TestCase
$formatter->parse('1', NumberFormatter::TYPE_CURRENCY);
}
public function testParseWithNullPositionValue()
{
$position = null;
$formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL);
$formatter->parse('123', NumberFormatter::TYPE_INT32, $position);
$this->assertNull($position);
}
public function testParseWithNotNullPositionValue()
{
$position = 1;

@ -149,24 +149,6 @@ class NumberFormatterTest extends AbstractNumberFormatterTest
$formatter->getPattern();
}
/**
* @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException
*/
public function testGetSymbol()
{
$formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL);
$formatter->getSymbol(null);
}
/**
* @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException
*/
public function testGetTextAttribute()
{
$formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL);
$formatter->getTextAttribute(null);
}
public function testGetErrorCode()
{
$formatter = $this->getNumberFormatter('en', NumberFormatter::DECIMAL);
@ -182,14 +164,6 @@ class NumberFormatterTest extends AbstractNumberFormatterTest
$formatter->parseCurrency(null, $currency);
}
/**
* @expectedException \Symfony\Component\Intl\Exception\MethodArgumentNotImplementedException
*/
public function testParseWithNotNullPositionValue()
{
parent::testParseWithNotNullPositionValue();
}
/**
* @expectedException \Symfony\Component\Intl\Exception\MethodNotImplementedException
*/

@ -40,7 +40,7 @@ class RegionBundleTest extends \PHPUnit_Framework_TestCase
{
$this->reader->expects($this->once())
->method('readEntry')
->with(self::RES_DIR, 'en', array('Countries', 'AT'))
->with(self::RES_DIR, 'en', array('Countries', 'AT'), true)
->will($this->returnValue('Austria'));
$this->assertSame('Austria', $this->bundle->getCountryName('AT', 'en'));
@ -55,7 +55,7 @@ class RegionBundleTest extends \PHPUnit_Framework_TestCase
$this->reader->expects($this->once())
->method('readEntry')
->with(self::RES_DIR, 'en', array('Countries'))
->with(self::RES_DIR, 'en', array('Countries'), true)
->will($this->returnValue($sortedCountries));
$this->assertSame($sortedCountries, $this->bundle->getCountryNames('en'));

@ -15,8 +15,6 @@ use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintValidator;
/**
* @author Bernhard Schussek <bschussek@gmail.com>
*
* @author Bernhard Schussek <bschussek@gmail.com>
*
* @api

@ -12,6 +12,7 @@
namespace Symfony\Component\Validator\Mapping\Loader;
use Symfony\Component\Validator\Exception\MappingException;
use Symfony\Component\Validator\Constraint;
abstract class AbstractLoader implements LoaderInterface
{

@ -183,7 +183,7 @@ class XmlFileLoader extends FileLoader
*
* @param string $file Path of file
*
* @return SimpleXMLElement
* @return \SimpleXMLElement
*
* @throws MappingException
*/

@ -116,5 +116,5 @@ http://jcp.org/en/jsr/detail?id=303
You can run the unit tests with the following command:
$ cd path/to/Symfony/Component/Validator/
$ composer.phar install --dev
$ composer.phar install
$ phpunit

@ -104,4 +104,14 @@ class CountryValidatorTest extends \PHPUnit_Framework_TestCase
array('EN'),
);
}
public function testValidateUsingCountrySpecificLocale()
{
\Locale::setDefault('en_GB');
$existingCountry = 'GB';
$this->context->expects($this->never())
->method('addViolation');
$this->validator->validate($existingCountry, new Country());
}
}

@ -104,4 +104,16 @@ class LanguageValidatorTest extends \PHPUnit_Framework_TestCase
array('foobar'),
);
}
public function testValidateUsingCountrySpecificLocale()
{
\Locale::setDefault('fr_FR');
$existingLanguage = 'en';
$this->context->expects($this->never())
->method('addViolation');
$this->validator->validate($existingLanguage, new Language(array(
'message' => 'aMessage'
)));
}
}

Loading…
Cancel
Save