Merge branch '4.2' into 4.3
* 4.2: 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
This commit is contained in:
commit
a25c2af559
@ -71,6 +71,7 @@
|
||||
<argument type="service" id="form.choice_list_factory"/>
|
||||
</service>
|
||||
<service id="form.type.file" class="Symfony\Component\Form\Extension\Core\Type\FileType" public="true">
|
||||
<tag name="form.type" />
|
||||
<argument type="service" id="translator" on-invalid="ignore" />
|
||||
</service>
|
||||
|
||||
|
@ -166,7 +166,7 @@ class FileType extends AbstractType
|
||||
}
|
||||
|
||||
if (null !== $this->translator) {
|
||||
$message = $this->translator->trans($messageTemplate, $messageParameters);
|
||||
$message = $this->translator->trans($messageTemplate, $messageParameters, 'validators');
|
||||
} else {
|
||||
$message = strtr($messageTemplate, $messageParameters);
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ namespace Symfony\Component\HttpFoundation;
|
||||
* object. It is however recommended that you do return an object as it
|
||||
* protects yourself against XSSI and JSON-JavaScript Hijacking.
|
||||
*
|
||||
* @see https://www.owasp.org/index.php/OWASP_AJAX_Security_Guidelines#Always_return_JSON_with_an_Object_on_the_outside
|
||||
* @see https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/AJAX_Security_Cheat_Sheet.md#always-return-json-with-an-object-on-the-outside
|
||||
*
|
||||
* @author Igor Wiedler <igor@wiedler.ch>
|
||||
*/
|
||||
|
@ -26,7 +26,7 @@ class AuthenticationException extends RuntimeException
|
||||
/**
|
||||
* Get the token.
|
||||
*
|
||||
* @return TokenInterface
|
||||
* @return TokenInterface|null
|
||||
*/
|
||||
public function getToken()
|
||||
{
|
||||
|
@ -57,7 +57,7 @@ class GroupSequence
|
||||
/**
|
||||
* The groups in the sequence.
|
||||
*
|
||||
* @var string[]|array[]|GroupSequence[]
|
||||
* @var string[]|string[][]|GroupSequence[]
|
||||
*/
|
||||
public $groups;
|
||||
|
||||
|
@ -22,7 +22,7 @@ interface GroupSequenceProviderInterface
|
||||
* Returns which validation groups should be used for a certain state
|
||||
* of the object.
|
||||
*
|
||||
* @return string[]|GroupSequence An array of validation groups
|
||||
* @return string[]|string[][]|GroupSequence An array of validation groups
|
||||
*/
|
||||
public function getGroupSequence();
|
||||
}
|
||||
|
Reference in New Issue
Block a user