PHP-DI 3.4 released
Posted by Matthieu Napoli on September 24th 2013
I am happy to announce that PHP-DI version 3.4 has just been released.
This time, several small improvements:
- You can now define arrays of values thanks to @unkind
Here is an example using YAML:
value4: - email@example.com - firstname.lastname@example.org
Note that the arrays can't be associative arrays, and must not be empty.
ContainerBuilderis now fluent thanks to @drdamour:
$builder = new ContainerBuilder(); $builder->useReflection(false) ->useAnotations(true) ->setCache( ...cache );
- Support for optional parameters (before 3.4, PHP-DI required that they were defined):
public function __construct($name = 'foo')
$name parameter is not defined, then its default value will be used, just like a standard PHP method call.
Read all the changes and their authors in the change log.