Releases: devorto/dependency-injection
Releases · devorto/dependency-injection
3.0.0
2.0.5: Added missing support for array packing
Variadic variables (...$var aka array (un)packing) support was missing causing it to crash on some fancy code that used this in it's constructor.
2.0.4: Exception throw on parameter with default value
If parameter is not optional but has a default value, use this instead of throwing exception.
2.0.3: Support PHP 8
Add support for PHP 8 in composer.json
2.0.2: Class or interface can be optional
Class or interface can be optional which caused DI to crash when no implementation was found. Also when providing null or an object as config, this also caused an exception.
2.0.1: Vendor packages type hints are not always present.
Because some vendor don't use type hints in their vendor packages the code died on trying to get a class name from the variable. By checking first if parameter type isn't empty we can avoid this and the rest of the code can continue.
2.0.0: Moved KeyValueStorage to separate package.
Because the KeyValueStorage object is used a lot by me for a lot of different things than only in combination with the dependency-injection I decided to move this to a separate package. However this result in a namespace change, so update your paths after upgrading.
1.4.0: Added support voor class/interface overriding.
It's now possible to add a Class::class as value for a parameter in the configuration object, this will the override the default interface or class implementation for that class.
1.3.2: Interface implementations were not saved.
Because interface implementations were not stored in $loadedClasses, for every reference to the interface the implementing class was re-instantiated.
1.3.1: Bugfix: valid() failed when data was empty string, checking the key i…
…s a better solution.