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:
Christian Flothmann 2019-06-21 12:01:08 +02:00
commit a25c2af559
6 changed files with 6 additions and 5 deletions

View File

@ -71,6 +71,7 @@
<argument type="service" id="form.choice_list_factory"/> <argument type="service" id="form.choice_list_factory"/>
</service> </service>
<service id="form.type.file" class="Symfony\Component\Form\Extension\Core\Type\FileType" public="true"> <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" /> <argument type="service" id="translator" on-invalid="ignore" />
</service> </service>

View File

@ -166,7 +166,7 @@ class FileType extends AbstractType
} }
if (null !== $this->translator) { if (null !== $this->translator) {
$message = $this->translator->trans($messageTemplate, $messageParameters); $message = $this->translator->trans($messageTemplate, $messageParameters, 'validators');
} else { } else {
$message = strtr($messageTemplate, $messageParameters); $message = strtr($messageTemplate, $messageParameters);
} }

View File

@ -18,7 +18,7 @@ namespace Symfony\Component\HttpFoundation;
* object. It is however recommended that you do return an object as it * object. It is however recommended that you do return an object as it
* protects yourself against XSSI and JSON-JavaScript Hijacking. * 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> * @author Igor Wiedler <igor@wiedler.ch>
*/ */

View File

@ -26,7 +26,7 @@ class AuthenticationException extends RuntimeException
/** /**
* Get the token. * Get the token.
* *
* @return TokenInterface * @return TokenInterface|null
*/ */
public function getToken() public function getToken()
{ {

View File

@ -57,7 +57,7 @@ class GroupSequence
/** /**
* The groups in the sequence. * The groups in the sequence.
* *
* @var string[]|array[]|GroupSequence[] * @var string[]|string[][]|GroupSequence[]
*/ */
public $groups; public $groups;

View File

@ -22,7 +22,7 @@ interface GroupSequenceProviderInterface
* Returns which validation groups should be used for a certain state * Returns which validation groups should be used for a certain state
* of the object. * of the object.
* *
* @return string[]|GroupSequence An array of validation groups * @return string[]|string[][]|GroupSequence An array of validation groups
*/ */
public function getGroupSequence(); public function getGroupSequence();
} }