Reflections on PHP-DI configuration.
Currently, the configuration is in PHP or annotations, PHP config has the following advantages:
- PHP developpers know PHP
- IDE autocompletion/error detection
- Bean definition using closures
Disadvantages of PHP:
- A bit more difficult to read than YAML
Problems with current configuration:
- "entries" and "aliases" are separate. Maybe they can be joined?
- Bean definition is too constraint: impossible to define extra attributes like "scope", "lazy", or injection points (see PHP-DI/PHP-DI#28)
Possibility:
- More annotations to allow full configuration through annotations
- Allow also full configuration through PHP config
- Allow also full configuration through YAML config?