8000 Merge branch '3.0' into 3.1 · symfony/symfony@45ce2c8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 45ce2c8

Browse files
committed
Merge branch '3.0' into 3.1
* 3.0: [CS] Respect PSR2 4.2 [Form] fix `empty_data` option in expanded `ChoiceType` [Console] removed unneeded private methods [Security] [Guard] Improve comment with working example 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 c26347d + ba84160 commit 45ce2c8

File tree

30 files changed

+902
-136
lines changed

30 files changed

+902
-136
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
"monolog/monolog": "~1.11",
8585
"ocramius/proxy-manager": "~0.4|~1.0|~2.0",
8686
"predis/predis": "~1.0",
87-
"egulias/email-validator": "~1.2",
87+
"egulias/email-validator": "~1.2,>=1.2.1"
8888
"symfony/polyfill-apcu": "~1.1",
8989
"symfony/security-acl": "~2.8|~3.0",
9090
"phpdocumentor/reflection-docblock": "^3.0"

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

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

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

118119
// Attention: This optimization does not check choices for existence
119-
if (!$this->choiceList && $this->idReader->isSingleId()) {
120+
if ($optimize && !$this->choiceList && $this->idReader->isSingleId()) {
120121
$values = array();
121122

122123
// Maintain order and indices of the given objects

0 commit comments

Comments
 (0)
0