Skip to content

Releases: brick/di

0.4.1

07 Apr 13:01
Compare
Choose a tag to compare

🐛 Bug fixes

  • Constructor could be called twice when injecting a class whose constructor is annotated with #[Inject]

0.4.0

19 Jan 15:10
Compare
Choose a tag to compare

💥 Breaking changes

  • minimum PHP version is now 8.0
  • namespace Brick\Di is now Brick\DI
  • DependencyInjectionException has been renamed to DIException
  • Inject is now an attribute, not a Doctrine annotation anymore
  • Inject has been moved to Brick\DI\Inject
  • Container now defaults to using attributes
  • ValueResolver::getParameter|PropertyValue() now have a mixed return type

New features

  • Support for typed properties
  • Support for union types

0.3.4

26 Nov 09:31
Compare
Choose a tag to compare

🐛 Bug fixes

  • Fixed a deprecated call in PHP 8.

0.3.3

30 Oct 15:02
Compare
Choose a tag to compare

🐛 Bug fixes

  • Fixed a deprecated call to ReflectionType::__toString() when throwing an UnresolvedValueException.

0.3.2

06 Apr 10:46
Compare
Choose a tag to compare

Maintenance release for compatibility with brick/reflection version 0.3.

No changes.

0.3.1

24 Dec 14:42
Compare
Choose a tag to compare

Non-breaking change

The $object parameter of the Brick\Di\Injector::inject() method is now strongly typed to object:

public function inject(object $object) : void

Note that this change is non-breaking because PHP allows a subclass to override the method with no type hint.

0.3.0

24 Dec 08:31
Compare
Choose a tag to compare

Minimum PHP version is now 7.2.

Breaking change:

  • Injector::instantiate() now has an object return type (this may only break code that extends Injector)

0.2.3

05 Nov 18:50
Compare
Choose a tag to compare

Fix support for typed properties.

0.2.2

05 Nov 17:50
Compare
Choose a tag to compare

Support for injecting typed properties in PHP 7.4.

0.2.1

02 Nov 16:26
Compare
Choose a tag to compare

Bug fix: Injector falled back to ValueResolver even when a null value was explicitly provided in $parameters.