8000 Merge branch '3.4' into 4.2 · symfony/symfony@6821850 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6821850

Browse files
committed
Merge branch '3.4' into 4.2
* 3.4: fix translation domain tag the FileType service as a form type [Validator] Fix GroupSequenceProvider annotation Update ajax security cheat sheet link Fix AuthenticationException::getToken typehint
2 parents b2eeaea + 4c088b6 commit 6821850

File tree

6 files changed

+6
-5
lines changed

6 files changed

+6
-5
lines changed

src/Symfony/Bundle/FrameworkBundle/Resources/config/form.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
<argument type="service" id="form.choice_list_factory"/>
7272
</service>
7373
<service id="form.type.file" class="Symfony\Component\Form\Extension\Core\Type\FileType" public="true">
74+
<tag name="form.type" />
7475
<argument type="service" id="translator" on-invalid="ignore" />
7576
</service>
7677

src/Symfony/Component/Form/Extension/Core/Type/FileType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ private function getFileUploadError($errorCode)
166166
}
167167

168168
if (null !== $this->translator) {
169-
$message = $this->translator->trans($messageTemplate, $messageParameters);
169+
$message = $this->translator->trans($messageTemplate, $messageParameters, 'validators');
170170
} else {
171171
$message = strtr($messageTemplate, $messageParameters);
172172
}

src/Symfony/Component/HttpFoundation/JsonResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* object. It is however recommended that you do return an object as it
1919
* protects yourself against XSSI and JSON-JavaScript Hijacking.
2020
*
21-
* @see https://www.owasp.org/index.php/OWASP_AJAX_Security_Guidelines#Always_return_JSON_with_an_Object_on_the_outside
21+
* @see https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/AJAX_Security_Cheat_Sheet.md#always-return-json-with-an-object-on-the-outside
2222
*
2323
* @author Igor Wiedler <igor@wiedler.ch>
2424
*/

src/Symfony/Component/Security/Core/Exception/AuthenticationException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class AuthenticationException extends RuntimeException implements \Serializable
2626
/**
2727
* Get the token.
2828
*
29-
* @return TokenInterface
29+
* @return TokenInterface|null
3030
*/
3131
public function getToken()
3232
{

src/Symfony/Component/Validator/Constraints/GroupSequence.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class GroupSequence
5757
/**
5858
* The groups in the sequence.
5959
*
60-
* @var string[]|array[]|GroupSequence[]
60+
* @var string[]|string[][]|GroupSequence[]
6161
*/
6262
public $groups;
6363

src/Symfony/Component/Validator/GroupSequenceProviderInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ interface GroupSequenceProviderInterface
2222
* Returns which validation groups should be used for a certain state
2323
* of the object.
2424
*
25-
* @return string[]|GroupSequence An array of validation groups
25+
* @return string[]|string[][]|GroupSequence An array of validation groups
2626
*/
2727
public function getGroupSequence();
2828
}

0 commit comments

Comments
 (0)
0