-
Notifications
You must be signed in to change notification settings - Fork 512
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PIM-8318: Upgrade Symfony patch version to 3.4.26 to fix Intl issues
- Loading branch information
Showing
5 changed files
with
51 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/Pim/Bundle/FilterBundle/Form/Type/UnstructuredType.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
namespace Pim\Bundle\FilterBundle\Form\Type; | ||
|
||
use Symfony\Component\Form\AbstractType; | ||
use Symfony\Component\OptionsResolver\OptionsResolver; | ||
|
||
/** | ||
* This is an hack to accept multiple types in a form type, such as string and array. | ||
* Actually, since this PR https://github.com/symfony/symfony/pull/29307, array is not accepted anymore | ||
* when using native TextType. | ||
* | ||
* It prevents us to use filters in the datagrid accepting multiple type of values: | ||
* - a list of string for IN LIST operator | ||
* - a string for IS NOT EMPTY operator | ||
* | ||
* It is a BC break in a minor release because we were using a bug as a feature. | ||
* | ||
* @see https://github.com/symfony/symfony/issues/29809 | ||
* | ||
* @copyright 2019 Akeneo SAS (http://www.akeneo.com) | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
*/ | ||
class UnstructuredType extends AbstractType | ||
{ | ||
public function configureOptions(OptionsResolver $resolver) | ||
{ | ||
$resolver->setDefaults(array( | ||
'compound' => false, | ||
'multiple' => true, | ||
)); | ||
} | ||
} |