Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

fix for sf2.1 #1

Closed
ma2thieu opened this issue Apr 16, 2012 · 2 comments
Closed

fix for sf2.1 #1

ma2thieu opened this issue Apr 16, 2012 · 2 comments

Comments

@ma2thieu
Copy link

fix for the changes in sf 2.1 forms : https://github.com/symfony/symfony/blob/master/UPGRADE-2.1.md

Index: vendor/lexik/form-filter-bundle/Lexik/Bundle/FormFilterBundle/Filter/Extension/Type/BooleanFilterType.php

===================================================================
--- vendor/lexik/form-filter-bundle/Lexik/Bundle/FormFilterBundle/Filter/Extension/Type/BooleanFilterType.php   (revision )
+++ vendor/lexik/form-filter-bundle/Lexik/Bundle/FormFilterBundle/Filter/Extension/Type/BooleanFilterType.php   (revision )
@@ -49,7 +49,7 @@
     /**
      * {@inheritdoc}
      */
-    public function getDefaultOptions(array $options)
+    public function getDefaultOptions()
     {
         return array(
             'choices' => array(

Index: vendor/lexik/form-filter-bundle/Lexik/Bundle/FormFilterBundle/Filter/Extension/Type/ChoiceFilterType.php

===================================================================
--- vendor/lexik/form-filter-bundle/Lexik/Bundle/FormFilterBundle/Filter/Extension/Type/ChoiceFilterType.php    (revision )
+++ vendor/lexik/form-filter-bundle/Lexik/Bundle/FormFilterBundle/Filter/Extension/Type/ChoiceFilterType.php    (revision )
@@ -16,7 +16,8 @@
      */
     public function getParent(array $options)
     {
-        return $options['expanded'] ? 'filter' : 'filter_field';
+        return isset($options['expanded']) && $options['expanded'] ? 'filter' : 'filter_field';
     }

     /**

Index: vendor/lexik/form-filter-bundle/Lexik/Bundle/FormFilterBundle/Filter/Extension/Type/FieldFilterType.php

===================================================================
--- vendor/lexik/form-filter-bundle/Lexik/Bundle/FormFilterBundle/Filter/Extension/Type/FieldFilterType.php (revision )
+++ vendor/lexik/form-filter-bundle/Lexik/Bundle/FormFilterBundle/Filter/Extension/Type/FieldFilterType.php (revision )
@@ -29,9 +29,9 @@
     /**
      * {@inheritdoc}
      */
-    public function getDefaultOptions(array $options)
+    public function getDefaultOptions()
     {
-        $options = parent::getDefaultOptions($options);
+        $options = parent::getDefaultOptions();
         $options['required'] = false;
         $options['apply_filter'] = null;

Index: vendor/lexik/form-filter-bundle/Lexik/Bundle/FormFilterBundle/Filter/Extension/Type/NumberFilterType.php

===================================================================
--- vendor/lexik/form-filter-bundle/Lexik/Bundle/FormFilterBundle/Filter/Extension/Type/NumberFilterType.php    (revision )
+++ vendor/lexik/form-filter-bundle/Lexik/Bundle/FormFilterBundle/Filter/Extension/Type/NumberFilterType.php    (revision )
@@ -50,9 +50,9 @@
     /**
      * {@inheritdoc}
      */
-    public function getDefaultOptions(array $options)
+    public function getDefaultOptions()
     {
-        $options = parent::getDefaultOptions($options);
+        $options = parent::getDefaultOptions();
         $options['condition_operator'] = self::OPERATOR_EQUAL;

         return $options;

Index: vendor/lexik/form-filter-bundle/Lexik/Bundle/FormFilterBundle/Filter/Extension/Type/NumberRangeFilterType.php

===================================================================
--- vendor/lexik/form-filter-bundle/Lexik/Bundle/FormFilterBundle/Filter/Extension/Type/NumberRangeFilterType.php   (revision )
+++ vendor/lexik/form-filter-bundle/Lexik/Bundle/FormFilterBundle/Filter/Extension/Type/NumberRangeFilterType.php   (revision )
@@ -28,7 +28,7 @@
     /**
      * {@inheritdoc}
      */
-    public function getDefaultOptions(array $options)
+    public function getDefaultOptions()
     {
         return array(
             'left_number' => array(),

Index: vendor/lexik/form-filter-bundle/Lexik/Bundle/FormFilterBundle/Filter/Extension/Type/TextFilterType.php

===================================================================
--- vendor/lexik/form-filter-bundle/Lexik/Bundle/FormFilterBundle/Filter/Extension/Type/TextFilterType.php  (revision )
+++ vendor/lexik/form-filter-bundle/Lexik/Bundle/FormFilterBundle/Filter/Extension/Type/TextFilterType.php  (revision )
@@ -49,9 +49,9 @@
     /**
      * {@inheritdoc}
      */
-    public function getDefaultOptions(array $options)
+    public function getDefaultOptions()
     {
-        $options = parent::getDefaultOptions($options);
+        $options = parent::getDefaultOptions();
         $options['condition_pattern'] = self::PATTERN_EQUALS;

         return $options;
@cedric-g
Copy link
Collaborator

Thanks :) we will include these changes on a new branch after we commit a refractoring of QueryBuidler::prepareFilterValues()

@cedric-g
Copy link
Collaborator

cedric-g commented Jun 4, 2012

The master branch is now compatible with sf2.1.

@cedric-g cedric-g closed this as completed Jun 4, 2012
@javiernuber javiernuber mentioned this issue Jun 21, 2012
@vaszev vaszev mentioned this issue Nov 3, 2016
snebes referenced this issue in snebes/LexikFormFilterBundle Sep 1, 2019
snebes referenced this issue in snebes/LexikFormFilterBundle Sep 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants