如何从Symfony 4.1中的包中获取自定义配置yaml文件?

I am creating a bundle that provides some common functionality for our applications. From services inside the bundle, I want to load a custom configuration file -- NOT the default package config override file.

For example, in the bundle's Resources/config/error_codes.yml I will have some default error codes. The developers using this package should be able to create their own error_codes.yml in their config that adds new error codes.

How do I locate, fetch and combine the two error_codes.yml files?

You can't override configuration file.

But you can create configuration tree with default values (see here) and define custom values outside a bundle. Another way is usage parameters inside bundle, a parameter can be easy changed in any place.

And finally, for some special cases you can override everything via Compiler Pass