Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PIM-8318: Fix CE 2.3 CI #9966

Merged
merged 2 commits into from Apr 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 0 additions & 8 deletions .circleci/config.yml
Expand Up @@ -27,10 +27,6 @@ jobs:
- run:
name: Start containers
command: docker-compose up -d
- restore_cache:
name: Restore cache - vendor
keys:
- vendor-v1-{{ checksum "composer.lock" }}
- run:
name: Change owner on project dir after restoring cache
command: sudo chown -R 1000:1000 ../project
Expand All @@ -49,10 +45,6 @@ jobs:
- run:
name: Change owner on project dir after installing when there is no cache
command: sudo chmod -R 777 ../project
- save_cache:
paths:
- ./vendor
key: vendor-v7-{{ checksum "composer.lock" }}
- persist_to_workspace:
root: ~/
paths:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG-2.3.md
@@ -1,5 +1,9 @@
# 2.3.x

## Improvement

- PIM-8318: Bump Symfony version to 3.4.26 to fix Intl issues.

# 2.3.40 (2019-04-30)

# 2.3.39 (2019-04-23)
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -72,7 +72,7 @@
"symfony/monolog-bundle": "3.1.0",
"symfony/swiftmailer-bundle": "3.0.3",
"symfony/security-acl": "3.0.0",
"symfony/symfony": "3.4.4",
"symfony/symfony": "3.4.26",
"symfony/thanks": "^1.0",
"symfony/polyfill-apcu": "1.4.0",
"twig/extensions": "1.2.0",
Expand Down
81 changes: 37 additions & 44 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Expand Up @@ -3,9 +3,9 @@
namespace Pim\Bundle\FilterBundle\Form\Type\Filter;

use Oro\Bundle\FilterBundle\Form\Type\Filter\ChoiceFilterType;
use Pim\Bundle\FilterBundle\Form\Type\UnstructuredType;
use Pim\Component\Catalog\Query\Filter\Operators;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\Form\FormView;
Expand Down Expand Up @@ -46,7 +46,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
{
parent::buildForm($builder, $options);
$builder->add('type', $options['operator_type'], ['choices' => $this->getOperatorChoices($options)]);
$builder->add('value', TextType::class);
$builder->add('value', UnstructuredType::class);
$builder->add('valueChoices', ChoiceType::class, $options['field_options'] + ['mapped' => false]);
}

Expand Down
33 changes: 33 additions & 0 deletions src/Pim/Bundle/FilterBundle/Form/Type/UnstructuredType.php
@@ -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,
));
}
}