Skip to content

Commit 6b81f2c

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: [CS] Respect PSR2 4.2 [Form] fix `empty_data` option in expanded `ChoiceType` [Console] removed unneeded private methods sync min email validator version [TwigBridge] Fix inconsistency in LintCommand help explicitly forbid e-mail validator 2.0 or higher Fixed SymfonyQuestionHelper multi-choice with defaults [DoctrineBridge] Don't use object IDs in DoctrineChoiceLoader when passing a value closure Differentiate between the first time a progress bar is displayed and subsequent times finished previous commit No more exception for malformed input name fix post_max_size_message translation [Process] Fix pipes cleaning on Windows Avoid phpunit 5.4 warnings on getMock [Form] Add exception to FormRenderer about non-unique block names [Form] Consider a violation even if the form is not submitted
2 parents 8ec92f7 + 7dbd849 commit 6b81f2c

File tree

29 files changed

+893
-131
lines changed

29 files changed

+893
-131
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
"doctrine/doctrine-bundle": "~1.2",
8686
"monolog/monolog": "~1.11",
8787
"ocramius/proxy-manager": "~0.4|~1.0|~2.0",
88-
"egulias/email-validator": "~1.2",
88+
"egulias/email-validator": "~1.2,>=1.2.1"
8989
"phpdocumentor/reflection": "^1.0.7"
9090
},
9191
"conflict": {

src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,10 @@ public function loadValuesForChoices(array $choices, $value = null)
110110

111111
// Optimize performance for single-field identifiers. We already
112112
// know that the IDs are used as values
113+
$optimize = null === $value || is_array($value) && $value[0] === $this->idReader;
113114

114115
// Attention: This optimization does not check choices for existence
115-
if (!$this->choiceList && $this->idReader->isSingleId()) {
116+
if ($optimize && !$this->choiceList && $this->idReader->isSingleId()) {
116117
$values = array();
117118

118119
// Maintain order and indices of the given objects

0 commit comments

Comments
 (0)