Releases: lucatume/di52
Releases · lucatume/di52
3.2.0
3.1.1
3.1.0
3.1.0
Added
- PHP8.2 support.
- Parameter detection support for PHP Union Types.
- Parameter Enum detection/Enum container resolving.
- thanks @defunctl.
Changed
- Add PHP8.2 to GitHub workflow matrix.
- Separated tests into a
unit
suite and aphp81
suite to avoid fatal parse errors when asserting enums. - Updated GitHub workflows to remove deprecated functionality and run composer install via https://github.com/ramsey/composer-install.
- Updated GitHub workflows to attempt to automatically migrate the phpunit configuration file based on the current version being run.
- Updated deprecated "actions/checkout" GitHub action from v2 to v3.
- thanks @defunctl.
Fixed
- Use the correct PHP version ID to ensure
PHP81ContextualBindingContainerTest
runs under PHP8.1. - Fixed the phpunit.xml schema to validate against phpunit 5.7.
- Fatal Error Handling snapshots.
- thanks @defunctl.
3.0.3
3.0.3
Added
- The container now registers Service Providers using its own
Container::get()
method, instead of thenew
keyword. This allows Service Providers to utilize dependency injection. (thanks @defunctl). - Additional contextual binding examples for primitives + service provider documentation in the README.
3.0.2
3.0.1
3.0.0
3.0.0
Changed
- Add support for a default value in the
lucatume\DI52\Container::getVar(string $key, mixed $default = null) :mixed
method. - The
lucatume\DI52\Container::setVar(string $key, mixed $value) :void
will not try to run callables when
storing variables on the container using the method. As such, the need to protect the variables when using
thesetVar()
method is no more required. - The
lucatume\DI52\Container::tagged(string $tag) :array
method will now return an empty array if nothing was
tagged with the tag; it would throw an error in previous versions. - Rewritten the code to fully leverage Closure support.
- Move build tools to Docker.
- Make the container implementation compatible with [PSR-11 Container specification](https://www.php-fig.
org/psr/psr-11/) - Fix #26 to handle and format files syntax errors while trying to autoload.
- Fix #13 and allow explicit definition of default binding method.
- Allow getting the registered provider instances using
getProvider
andget
,make
or theArrayAccess
API. - Allow getting callbacks for static and instance methods consistently to unhook.
- Add phstan, phan and phpcs checks.
- Move benchmarks to Docker, automate them.
- Update documentation and examples.
Removed
- Removed the
tad_DI52_ServiceProviderInterface
andtad_DI52_ContainerInterface
interfaces.