Service Defaults
The reserved _default entry sets the default shared, public, and
autoconfigure flags for the services declared in the same file:
services:
_default:
shared: true
public: false
autoconfigure: false
logger:
constructor:
func: "$this.NewLogger"
public: true # explicit value wins over the default- Applies per file — an imported config keeps its own defaults, and inherits none from the importing file
- Only
shared,public, andautoconfigureare allowed;type,constructor,alias,decorates,decoration_priority, andtagsin_defaultare configuration errors - Without
_default, the built-in defaults areshared: true,public: false,autoconfigure: true _defaultis not a service and gets no getter