From c92809a1fdc0e49f9f28107f2fdfa1c64d580fdd Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Fri, 2 Oct 2015 18:35:24 +0200 Subject: [PATCH 1/3] [Form] minor CS fix --- .../DependencyInjection/DependencyInjectionExtension.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Symfony/Component/Form/Extension/DependencyInjection/DependencyInjectionExtension.php b/src/Symfony/Component/Form/Extension/DependencyInjection/DependencyInjectionExtension.php index 2d78f80830..faa2b431ea 100644 --- a/src/Symfony/Component/Form/Extension/DependencyInjection/DependencyInjectionExtension.php +++ b/src/Symfony/Component/Form/Extension/DependencyInjection/DependencyInjectionExtension.php @@ -25,9 +25,7 @@ class DependencyInjectionExtension implements FormExtensionInterface private $guesserLoaded = false; private $typeExtensionServiceIds; - public function __construct(ContainerInterface $container, - array $typeServiceIds, array $typeExtensionServiceIds, - array $guesserServiceIds) + public function __construct(ContainerInterface $container, array $typeServiceIds, array $typeExtensionServiceIds, array $guesserServiceIds) { $this->container = $container; $this->typeServiceIds = $typeServiceIds; From dd5064578ea1b0d82523a222f2dde4b2766d6f80 Mon Sep 17 00:00:00 2001 From: Tobias Schultze Date: Sat, 3 Oct 2015 00:55:12 +0200 Subject: [PATCH 2/3] [Form] remove obsolete deprecation comments --- src/Symfony/Bridge/Twig/Node/FormEnctypeNode.php | 7 ------- .../HttpFoundation/EventListener/BindRequestListener.php | 3 --- 2 files changed, 10 deletions(-) diff --git a/src/Symfony/Bridge/Twig/Node/FormEnctypeNode.php b/src/Symfony/Bridge/Twig/Node/FormEnctypeNode.php index 0114b354d8..fc2e53b530 100644 --- a/src/Symfony/Bridge/Twig/Node/FormEnctypeNode.php +++ b/src/Symfony/Bridge/Twig/Node/FormEnctypeNode.php @@ -19,11 +19,4 @@ namespace Symfony\Bridge\Twig\Node; */ class FormEnctypeNode extends SearchAndRenderBlockNode { - public function compile(\Twig_Compiler $compiler) - { - parent::compile($compiler); - - // Uncomment this as soon as the deprecation note should be shown - // $compiler->write('trigger_error(\'The helper form_enctype(form) is deprecated since version 2.3 and will be removed in 3.0. Use form_start(form) instead.\', E_USER_DEPRECATED)'); - } } diff --git a/src/Symfony/Component/Form/Extension/HttpFoundation/EventListener/BindRequestListener.php b/src/Symfony/Component/Form/Extension/HttpFoundation/EventListener/BindRequestListener.php index 2489cf371c..68712985b3 100644 --- a/src/Symfony/Component/Form/Extension/HttpFoundation/EventListener/BindRequestListener.php +++ b/src/Symfony/Component/Form/Extension/HttpFoundation/EventListener/BindRequestListener.php @@ -42,9 +42,6 @@ class BindRequestListener implements EventSubscriberInterface return; } - // Uncomment this as soon as the deprecation note should be shown - // trigger_error('Passing a Request instance to Form::submit() is deprecated since version 2.3 and will be disabled in 3.0. Call Form::process($request) instead.', E_USER_DEPRECATED); - $name = $form->getConfig()->getName(); $default = $form->getConfig()->getCompound() ? array() : null; From 89499ff9e109bfec26a12bd7727021daf3ec88df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yonel=20Ceruto=20Gonz=C3=A1lez?= Date: Fri, 2 Oct 2015 13:21:45 -0400 Subject: [PATCH 3/3] Fixing typo in variable name This condition is always `true` because `$attributesMetadata` does not exists in this `foreach` context and could overwrite values in the `$attributesMetadata` variable. --- .../Component/Serializer/Mapping/Loader/AnnotationLoader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Serializer/Mapping/Loader/AnnotationLoader.php b/src/Symfony/Component/Serializer/Mapping/Loader/AnnotationLoader.php index 801c317767..6c563b44e9 100644 --- a/src/Symfony/Component/Serializer/Mapping/Loader/AnnotationLoader.php +++ b/src/Symfony/Component/Serializer/Mapping/Loader/AnnotationLoader.php @@ -49,7 +49,7 @@ class AnnotationLoader implements LoaderInterface $attributesMetadata = $classMetadata->getAttributesMetadata(); foreach ($reflectionClass->getProperties() as $property) { - if (!isset($attributeMetadata[$property->name])) { + if (!isset($attributesMetadata[$property->name])) { $attributesMetadata[$property->name] = new AttributeMetadata($property->name); $classMetadata->addAttributeMetadata($attributesMetadata[$property->name]); }