Skip to content

Commit 5d50b43

Browse files
committed
Merge branch '3.4'
* 3.4: (83 commits) add missing version attribute Show exception is checked twice in ExceptionController of twig allow SSI fragments configuration in XML files Display a better error message when the toolbar cannot be displayed [SecurityBundle] Add user impersonation info and exit action to the profiler render hidden _method field in form_rest() Add Doctrine Cache to dev dependencies to fix failing unit tests. return fallback locales whenever possible Fix Predis client cluster with pipeline [Dotenv] Test load() with multiple paths [Console] Fix catching exception type in QuestionHelper Improved the exception page when there is no message [WebProfilerBundle] Eliminate line wrap on count columnt (routing) [Profiler][Validator] Add a validator panel in profiler [Validator] replace hardcoded service id [Routing] Fix XmlFileLoader exception message Remove duplicate changelog entries [DI] Dedup tags when using instanceof/autoconfigure [Translation] Fix FileLoader::loadResource() php doc [Serializer] Fix workaround min php version ...
2 parents 1e8df09 + 21d72b0 commit 5d50b43

File tree

4 files changed

+19
-4
lines changed

4 files changed

+19
-4
lines changed

ChoiceList/Factory/DefaultChoiceListFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function createView(ChoiceListInterface $list, $preferredChoices = null,
5454

5555
if (!is_callable($preferredChoices) && !empty($preferredChoices)) {
5656
$preferredChoices = function ($choice) use ($preferredChoices) {
57-
return false !== array_search($choice, $preferredChoices, true);
57+
return in_array($choice, $preferredChoices, true);
5858
};
5959
}
6060

FormBuilderInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ interface FormBuilderInterface extends \Traversable, \Countable, FormConfigBuild
2727
* @param string|null $type
2828
* @param array $options
2929
*
30-
* @return $this
30+
* @return self
3131
*/
3232
public function add($child, $type = null, array $options = array());
3333

@@ -58,7 +58,7 @@ public function get($name);
5858
*
5959
* @param string $name
6060
*
61-
* @return $this
61+
* @return self
6262
*/
6363
public function remove($name);
6464

FormRenderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,6 @@ public function searchAndRenderBlock(FormView $view, $blockNameSuffix, array $va
305305
*/
306306
public function humanize($text)
307307
{
308-
return ucfirst(trim(strtolower(preg_replace(array('/([A-Z])/', '/[_\s]+/'), array('_$1', ' '), $text))));
308+
return ucfirst(strtolower(trim(preg_replace(array('/([A-Z])/', '/[_\s]+/'), array('_$1', ' '), $text))));
309309
}
310310
}

FormView.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ class FormView implements \ArrayAccess, \IteratorAggregate, \Countable
5353
*/
5454
private $rendered = false;
5555

56+
private $methodRendered = false;
57+
5658
public function __construct(FormView $parent = null)
5759
{
5860
$this->parent = $parent;
@@ -90,6 +92,19 @@ public function setRendered()
9092
return $this;
9193
}
9294

95+
/**
96+
* @return bool
97+
*/
98+
public function isMethodRendered()
99+
{
100+
return $this->methodRendered;
101+
}
102+
103+
public function setMethodRendered()
104+
{
105+
$this->methodRendered = true;
106+
}
107+
93108
/**
94109
* Returns a child by name (implements \ArrayAccess).
95110
*

0 commit comments

Comments
 (0)