How to add keys to the Symfony configs and solve the "unrecognized option" issue?

  config, configuration, symfony, symfony-3.4, yaml

I’m working on a Symfony 3.4.6 app, that has a lot of YAML configuration files in the [project root]/config/packages. I added a key to one of them (let’s say xyz.yaml):

    bar: 123
    buz: 567

Now I’m getting an error:

In ArrayNode.php line 319:
Unrecognized option "foo" under "xyz"

I took a look into the ArrayNode.php#319. Well, the thing is clear: arbitrary / additional keys are not allowed. There seems to be something like a whitelist. But where is it defined / how to extend it (add the new keys to it)?

How to solve the "unrecognized option" issue by adding keys to Symfony configs?

Source: Symfony Questions