Skip to content

Commit

Permalink
Fixed failing tests in 2.8
Browse files Browse the repository at this point in the history
This failed due to symfony issue symfony/symfony#17162
  • Loading branch information
boekkooi committed Jan 13, 2016
1 parent f4eefd7 commit 6aec450
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/Functional/TestBundle/Form/TypeHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static function type($fqcn)

public static function fixCollectionOptions(array $options)
{
if (FormHelper::isSymfony3Compatible()) {
if(FormHelper::isSymfony3Compatible() && !FormHelper::isSymfony2Compatible()) {
return $options;
}

Expand All @@ -31,7 +31,11 @@ public static function fixCollectionOptions(array $options)

if (isset($options['entry_options'])) {
$options['options'] = TypeHelper::type($options['entry_options']);
unset($options['entry_options']);

// Due to a bug in 2.8 and 2.8.1 we need to ensure we also set options when we run 2.8.x
if (!FormHelper::isSymfony3Compatible()) {
unset($options['entry_options']);
}
}

return $options;
Expand Down

0 comments on commit 6aec450

Please sign in to comment.