[OptionsResolver] added ability to allow extra options

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #7979
| License       | MIT
| Doc PR        | *todo*