Skip to content

[OptionResolver] (Default) null values are not allowed since 2.6 #12809

@4rthem

Description

@4rthem
$resolver->setDefaults([
    'my_option' => null,
]);
$resolver->setAllowedValues([
    'my_option' => ['one', 'two', 'three'],
]);

With this configuration, the option my_option must be defined because it can't be null.

Is this wanted? I can't find any note about this on the upgrade guide.

This causes an InvalidOptionsException with HWIOAuthBundle. We now have to define all options or wait for a bundle update: see options configuration where access_type was optional.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions