Configuration usually involves different application parts (such as infrastructure and security credentials) and different environments (development, production). That’s why Symfony recommends that you split the application configuration into three parts.
Don’t define a semantic dependency injection configuration for your bundles.
As explained in 如何在Bundle内部载入Service配置 article, Symfony bundles
have two choices on how to handle configuration: normal service configuration
services.yml file and semantic configuration through a special
Although semantic configuration is much more powerful and provides nice features such as configuration validation, the amount of work needed to define that configuration isn’t worth it for bundles that aren’t meant to be shared as third-party bundles.