Merge branch '4.3' into 4.4

* 4.3:
  fix version in @deprecated annotation
  [Security] use LegacyEventDispatcherProxy
  Add missing row_attr option to FormType
This commit is contained in:
Christian Flothmann 2019-09-25 16:40:34 +02:00
commit 1595d307cf
7 changed files with 10 additions and 2 deletions

View File

@ -101,6 +101,7 @@ abstract class BaseType extends AbstractType
'attr' => $options['attr'], 'attr' => $options['attr'],
'block_prefixes' => $blockPrefixes, 'block_prefixes' => $blockPrefixes,
'unique_block_prefix' => $uniqueBlockPrefix, 'unique_block_prefix' => $uniqueBlockPrefix,
'row_attr' => $options['row_attr'],
'translation_domain' => $translationDomain, 'translation_domain' => $translationDomain,
'label_translation_parameters' => $labelTranslationParameters, 'label_translation_parameters' => $labelTranslationParameters,
'attr_translation_parameters' => $attrTranslationParameters, 'attr_translation_parameters' => $attrTranslationParameters,
@ -125,6 +126,7 @@ abstract class BaseType extends AbstractType
'disabled' => false, 'disabled' => false,
'label' => null, 'label' => null,
'label_format' => null, 'label_format' => null,
'row_attr' => [],
'label_translation_parameters' => [], 'label_translation_parameters' => [],
'attr_translation_parameters' => [], 'attr_translation_parameters' => [],
'attr' => [], 'attr' => [],
@ -134,5 +136,6 @@ abstract class BaseType extends AbstractType
$resolver->setAllowedTypes('block_prefix', ['null', 'string']); $resolver->setAllowedTypes('block_prefix', ['null', 'string']);
$resolver->setAllowedTypes('attr', 'array'); $resolver->setAllowedTypes('attr', 'array');
$resolver->setAllowedTypes('row_attr', 'array');
} }
} }

View File

@ -51,6 +51,7 @@
"post_max_size_message", "post_max_size_message",
"property_path", "property_path",
"required", "required",
"row_attr",
"translation_domain", "translation_domain",
"upload_max_size_message" "upload_max_size_message"
] ]

View File

@ -31,6 +31,7 @@ Symfony\Component\Form\Extension\Core\Type\ChoiceType (Block prefix: "choice")
post_max_size_message post_max_size_message
property_path property_path
required required
row_attr
translation_domain translation_domain
upload_max_size_message upload_max_size_message
--------------------------- -------------------- ------------------------------ ----------------------- --------------------------- -------------------- ------------------------------ -----------------------

View File

@ -31,6 +31,7 @@
"post_max_size_message", "post_max_size_message",
"property_path", "property_path",
"required", "required",
"row_attr",
"translation_domain", "translation_domain",
"trim", "trim",
"upload_max_size_message" "upload_max_size_message"

View File

@ -33,6 +33,7 @@ Symfony\Component\Form\Extension\Core\Type\FormType (Block prefix: "form")
post_max_size_message post_max_size_message
property_path property_path
required required
row_attr
translation_domain translation_domain
trim trim
upload_max_size_message upload_max_size_message

View File

@ -21,7 +21,7 @@ namespace Symfony\Component\Routing\Matcher\Dumper;
* @author Arnaud Le Blanc <arnaud.lb@gmail.com> * @author Arnaud Le Blanc <arnaud.lb@gmail.com>
* @author Nicolas Grekas <p@tchwork.com> * @author Nicolas Grekas <p@tchwork.com>
* *
* @deprecated since Symfony 4.2, use CompiledUrlMatcherDumper instead. * @deprecated since Symfony 4.3, use CompiledUrlMatcherDumper instead.
*/ */
class PhpMatcherDumper extends CompiledUrlMatcherDumper class PhpMatcherDumper extends CompiledUrlMatcherDumper
{ {

View File

@ -13,6 +13,7 @@ namespace Symfony\Component\Security\Http\Firewall;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\LegacyEventDispatcherProxy;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Session\Session; use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent; use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
@ -66,7 +67,7 @@ class ContextListener implements ListenerInterface
$this->userProviders = $userProviders; $this->userProviders = $userProviders;
$this->sessionKey = '_security_'.$contextKey; $this->sessionKey = '_security_'.$contextKey;
$this->logger = $logger; $this->logger = $logger;
$this->dispatcher = $dispatcher; $this->dispatcher = LegacyEventDispatcherProxy::decorate($dispatcher);
$this->trustResolver = $trustResolver ?: new AuthenticationTrustResolver(AnonymousToken::class, RememberMeToken::class); $this->trustResolver = $trustResolver ?: new AuthenticationTrustResolver(AnonymousToken::class, RememberMeToken::class);
$this->sessionTrackerEnabler = $sessionTrackerEnabler; $this->sessionTrackerEnabler = $sessionTrackerEnabler;
} }