Merge branch '2.7' into 2.8

* 2.7:
  Require symfony/intl ~2.4 when Locale::setDefault() is used
  [Form][2.7][ Choice type] fixed groups with empty array.

Conflicts:
	src/Symfony/Component/Form/composer.json
	src/Symfony/Component/Translation/composer.json
	src/Symfony/Component/Validator/composer.json
This commit is contained in:
Nicolas Grekas 2015-09-01 15:59:44 +02:00
commit d76cc03382
5 changed files with 8 additions and 3 deletions

View File

@ -172,6 +172,10 @@ class DefaultChoiceListFactory implements ChoiceListFactoryInterface
private static function addChoiceViewsGroupedBy($groupBy, $label, $choices, $keys, &$index, $attr, $isPreferred, &$preferredViews, &$otherViews)
{
foreach ($groupBy as $key => $value) {
if (null === $value) {
continue;
}
// Add the contents of groups to new ChoiceGroupView instances
if (is_array($value)) {
$preferredViewsForGroup = array();

View File

@ -536,6 +536,7 @@ class DefaultChoiceListFactoryTest extends \PHPUnit_Framework_TestCase
$list = new ArrayChoiceList(array(
'Group 1' => array('A' => $this->obj1, 'B' => $this->obj2),
'Group 2' => array('C' => $this->obj3, 'D' => $this->obj4),
'Group empty' => array(),
));
$view = $this->factory->createView(

View File

@ -18,7 +18,7 @@
"require": {
"php": ">=5.3.9",
"symfony/event-dispatcher": "~2.1|~3.0.0",
"symfony/intl": "~2.3|~3.0.0",
"symfony/intl": "~2.4|~3.0.0",
"symfony/options-resolver": "~2.6",
"symfony/property-access": "~2.3|~3.0.0"
},

View File

@ -21,7 +21,7 @@
"require-dev": {
"symfony/phpunit-bridge": "~2.7|~3.0.0",
"symfony/config": "~2.7",
"symfony/intl": "~2.3|~3.0.0",
"symfony/intl": "~2.4|~3.0.0",
"symfony/yaml": "~2.2|~3.0.0",
"psr/log": "~1.0"
},

View File

@ -22,7 +22,7 @@
"require-dev": {
"symfony/phpunit-bridge": "~2.7|~3.0.0",
"symfony/http-foundation": "~2.1|~3.0.0",
"symfony/intl": "~2.3|~3.0.0",
"symfony/intl": "~2.4|~3.0.0",
"symfony/yaml": "~2.0,>=2.0.5|~3.0.0",
"symfony/config": "~2.2|~3.0.0",
"symfony/property-access": "~2.3|~3.0.0",