Skip to content

Commit

Permalink
improve single fetch option resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
solverat committed Jul 14, 2019
1 parent ebbf241 commit ade86c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
}
},
"require": {
"dachcom-digital/dynamic-search": "^0.2",
"pimcore/pimcore": "^5.8.0"
}
}
6 changes: 1 addition & 5 deletions src/DsTrinityDataBundle/Provider/TrinityDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,9 @@ protected function configureFullDispatchOptions(OptionsResolver $resolver)
*/
protected function configureSingleDispatchOptions(OptionsResolver $resolver)
{
$defaults = [
'id' => null
];
$defaults = [ ];

$resolver->setDefaults($defaults);
$resolver->setRequired(array_keys($defaults));

$resolver->setAllowedTypes('id', ['string', 'int']);
}
}

0 comments on commit ade86c1

Please sign in to comment.