Skip to content

Releases: lucatume/di52

3.1.1

16 Feb 16:19
Compare
Choose a tag to compare

3.1.1

Changed

  • Removed leftover @since TBD comments.

3.1.0

28 Jan 09:14
Compare
Choose a tag to compare

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 a php81 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

24 Jan 07:46
Compare
Choose a tag to compare

3.0.3

Added

  • The container now registers Service Providers using its own Container::get() method, instead of the new 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

20 Jan 09:20
Compare
Choose a tag to compare

3.0.2

Added

  • Add support for resolving primitive values (e.g. int, string, bool etc...) using Container::when(), Container::needs() and Container::give() (thanks @defunctl).

3.0.1

16 Nov 10:59
Compare
Choose a tag to compare

3.0.1

Changed

  • Add .gitattributes file to exclude development artifacts. (thanks @Luc45)

3.0.0

09 Feb 16:16
Compare
Choose a tag to compare

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
    the setVar() 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 and get, make or the ArrayAccess 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 and tad_DI52_ContainerInterface interfaces.

2.1.5

20 Dec 12:52
Compare
Choose a tag to compare

Fixed

  • PHP 8.1 compatibility issues (thanks @bordoni)

2.1.4

01 Jan 12:14
Compare
Choose a tag to compare

Fixed

  • PHP 8 compatibility issues (thanks @bordoni)

2.1.3

02 Nov 11:15
Compare
Choose a tag to compare

Fixed

  • Error messages and format in the context of nested make resolution (thanks @Luc45)

2.1.1

23 Oct 09:42
Compare
Choose a tag to compare

Added

  • new build tools to the repository

Changed

  • refactor Container::callback code to re-use callbacks when available (thanks @sc0ttkclark)

Fixed

  • fix an issue where the Closure produced by the callback method would build the object for static method calls