You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an array of options that has a subset that needs resolving, the rest of it is not important. Is it possible to ignore the rest of the array?
A similar behavior to Form allow_extra_fields
Example: email and phone are required, everything else just doesn't matter.
$options = [
'email' => 'email',
'phone' => 'phone',
//many other keys
];
$resolver = new \Symfony\Component\OptionsResolver\OptionsResolver();
$resolver->setRequired(['email', 'phone']);
$resolver->resolve($options);