Skip to content

Commit d68cb61

Browse files
committed
Merge branch '2.7'
* 2.7: (61 commits) fixxed order of usage [2.7] [Form] Replaced calls to array_search() by in_array() where is no need to get the index removed the last deprecation notice [Serializer] Silent deprecation notice removed deprecation notice [PropertyAccess] Show property path in all exception messages added deprecation notice for HttpCache::createEsi() added missing deprecation notice when using the form_enctype function [Process] Make test AbstractProcessTest::testStartAfterATimeout useful again removed non-sense example Fixes small typo. [Validator] Remove unnecessary include in tests [HttpFoundation] minor: clarify Request::getUrlencodedPrefix() regex fixed typo [Serializer] Use Serializer's LogicException when applicable [Serializer] Use autoloader for annotations in tests [Validator] fix DOS-style line endings Drop useless execution bit bumped Symfony version to 2.6.5 [Serializer] update changelog ... Conflicts: CHANGELOG-2.3.md CHANGELOG-2.5.md CHANGELOG-2.6.md src/Symfony/Bridge/Twig/Node/FormEnctypeNode.php src/Symfony/Bundle/FrameworkBundle/HttpCache/HttpCache.php src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeSessionHandler.php
2 parents b796176 + 3c637a7 commit d68cb61

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

Extension/Core/ChoiceList/ChoiceList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ protected function addChoice(array &$bucketForPreferred, array &$bucketForRemain
389389
*/
390390
protected function isPreferred($choice, array $preferredChoices)
391391
{
392-
return false !== array_search($choice, $preferredChoices, true);
392+
return in_array($choice, $preferredChoices, true);
393393
}
394394

395395
/**

Extension/Core/Type/ChoiceType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public function buildView(FormView $view, FormInterface $form, array $options)
110110
// avoid making the type check inside the closure.
111111
if ($options['multiple']) {
112112
$view->vars['is_selected'] = function ($choice, array $values) {
113-
return false !== array_search($choice, $values, true);
113+
return in_array($choice, $values, true);
114114
};
115115
} else {
116116
$view->vars['is_selected'] = function ($choice, $value) {
Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
<?xml version="1.0"?>
2-
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
3-
<file source-language="en" datatype="plaintext" original="file.ext">
4-
<body>
5-
<trans-unit id="28">
6-
<source>This form should not contain extra fields.</source>
7-
<target>Тази форма не трябва да съдържа допълнителни полета.</target>
8-
</trans-unit>
9-
<trans-unit id="29">
10-
<source>The uploaded file was too large. Please try to upload a smaller file.</source>
11-
<target>Каченият файл е твърде голям. Моля, опитайте да качите по-малък файл.</target>
12-
</trans-unit>
13-
<trans-unit id="30">
14-
<source>The CSRF token is invalid. Please try to resubmit the form.</source>
15-
<target>Невалиден CSRF токен. Моля, опитайте да изпратите формата отново.</target>
16-
</trans-unit>
17-
</body>
18-
</file>
19-
</xliff>
1+
<?xml version="1.0"?>
2+
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
3+
<file source-language="en" datatype="plaintext" original="file.ext">
4+
<body>
5+
<trans-unit id="28">
6+
<source>This form should not contain extra fields.</source>
7+
<target>Тази форма не трябва да съдържа допълнителни полета.</target>
8+
</trans-unit>
9+
<trans-unit id="29">
10+
<source>The uploaded file was too large. Please try to upload a smaller file.</source>
11+
<target>Каченият файл е твърде голям. Моля, опитайте да качите по-малък файл.</target>
12+
</trans-unit>
13+
<trans-unit id="30">
14+
<source>The CSRF token is invalid. Please try to resubmit the form.</source>
15+
<target>Невалиден CSRF токен. Моля, опитайте да изпратите формата отново.</target>
16+
</trans-unit>
17+
</body>
18+
</file>
19+
</xliff>

0 commit comments

Comments
 (0)