I have tried the configurations, and the truth is that using providers is better:
Pros:
- Configurations separated by library and components.
- Easy to configure with type hint validations.
- If you use a standard configuration you don't need to change anything.
Cons:
- Container dependency - yii.