Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Di Laravel Package

aura/di

Aura.Di is a PSR-11 dependency injection container for PHP 8+, supporting serializable containers, constructor and setter injection, interface/trait awareness, and configuration inheritance. Lightweight, standards-friendly, and flexible for complex apps.

View on GitHub
Deep Wiki
Context7
5.0.8

Missing scanning root package.

5.0.7

Classes that generate an error should not be part of the class map at all

5.0.6

Allow to override class iterator inside ClassScannerConfig. This might be useful to filter classes and/or to apply a certain order in the class iterator.

5.0.5
  • (CHG) AttributeConfigFor is now repeatable.
5.0.4
  • (CHG) Fix generating class map from classes that extend nonexisting classes.
5.0.3
  • (CHG) Fix deleting file when it exists
5.0.2
  • (CHG) Fix bug where updated files were incorrectly removed from the classmap.
5.0.1
  • (CHG) AnnotatedInjectAttributeConfig should only mark for blueprint creation, fixes order of Blueprint creation bug.
5.0.0

New major Aura.Di version with many new features, with special attention for configuring the container using native PHP attributes. If you are going to upgrade, you might have a look at the migrating docs.

For a specific list of changes, see the CHANGELOG.

5.0.0-rc.1
  • (ADD) ClassSpecification that collects all attribute specifications of a class
  • (CHG) Use #[Blueprint] and #[BlueprintNamespace] to mark classes and namespaces to be compiled into blueprints.
  • (CHG) AttributeConfigInterface now also receives the class specification.
5.0.0-alpha.2
  • (ADD) $container->lazyLazy() to create a callable from a LazyInterface that is directly invokable.
  • (ADD) #[AttributeConfigFor] attribute to indicate scanner which attribute is configured by the annotated class.
  • (ADD) #[CompileNamespace] attribute to indicate scanner which namespace should have compiled blueprints.
  • (ADD) bin/auradi executable with scan command.
  • (CHG) Fix lazyGet not resolving the same service.
  • (CHG) Fix collection of attributes for class constants.
  • (CHG) #[Service], #[Instance] and #[Value] must have Attribute::TARGET_PROPERTY to allow constructor promotion.
5.0.0-alpha.1
  • (ADD) Inject via attributes
  • (ADD) Configure the container via attributes using the AttributeConfigInterface
  • (ADD) Directories scanner for classes and annotations
  • (ADD) Dependency requirement of composer/class-map-generator when using the scanner
  • (ADD) Compile the container, making it fully ready to instantiate instances and services
  • (ADD) ContainerCompileInterface to allow config classes to hook into the compilation process
  • (ADD) Support for PHP 8.2 and 8.3
  • (ADD) Support for PHPUnit 10
  • (ADD) PHPStan analysis
  • (CHG) Dropped support psr/container 1.x
  • (CHG) Dropped PHP 7
  • (CHG) Dropped PHPUnit 8
  • (CHG) Remove roave/security-advisories (include composer now)
  • (CHG) Container constructor now requires a Resolver
  • (CHG) Container constructor does not require a InjectionFactory anymore
  • (CHG) LazyInterface now expects a Resolver when __invoke gets called
  • (CHG) Resolver now holds the service instances
  • (CHG) Dropped PHPUnit polyfills
4.2.1
  • (CHG) Allow both v1 and v2 of psr/container
4.2.0
  • (CHG) Upgrade to PHP 7.4+ and PHP 8.0
  • (CHG) Upgrade psr/container to ^2.0
  • (CHG) Upgrade phpunit to ^9.5
  • (CHG) Resolver now checks if class exists before calling get_parent_class
  • (CHG) Wrapped ReflectionClass calls in a try catch
  • (CHG) Removed acclimate/container.
  • (ADD) Replace acclimate/container with CompositeContainer
4.1.0
  • (ADD) Support 7.4
4.0.0
  • (CHG) Upgrade to PHP 7.2+ only, strict types enabled

  • (CHG) Dropped HHVM support

  • (CHG) Signatures of methods in ContainerConfigInterface changed.

  • (CHG) LazyRequire and LazyInclude do not accept another lazy

  • (CHG) Removed container interop dependency

  • (CHG) Removed unsupported community channels

  • (ADD) Contextual parameters

  • (ADD) Producer

4.0.0-beta1
  • (CHG) Upgrade to PHP 7.2+ only, strict types enabled

  • (CHG) Dropped HHVM support

  • (CHG) Signatures of methods in ContainerConfigInterface changed.

  • (CHG) LazyRequire and LazyInclude do not accept another lazy

  • (CHG) Removed container interop dependency

  • (CHG) Removed unsupported community channels

  • (ADD) Contextual parameters

  • (ADD) Producer

4.0.0-alpha1
  • (CHG) Upgrade to PHP 7.2+ only, strict types enabled

  • (CHG) Dropped HHVM support

  • (CHG) Signatures of methods in ContainerConfigInterface changed.

  • (CHG) LazyRequire and LazyInclude do not accept another lazy

  • (CHG) Removed container interop dependency

  • (CHG) Removed unsupported community channels

  • (ADD) Contextual parameters

  • (ADD) Producer

2.2.5

To remove 7.x warning, replace list() ... each() with foreach.

Also update the Travis configuration.

Thanks to @dstepe for these changes!

3.4.0
  • (CHG) LazyArray now extends ArrayObject. PR #151.
3.3.0
  • (DOC) Update documentation. PR #140.

  • (CHG) Rearranging code to achieve full test coverage with the existing test suite. PR #141.

  • (ADD) ResolutionHelper. PR #143. Fixes #133.

  • (Add) ConfigCollection. PR #146.

  • (CHG) Update Reflector.php for PHP 7.2 compatibility. PR #148.

  • (CHG) Travis CI changes. PR #152.

  • (CHG) Removed CHANGES.md. Added CHANGELOG.md

3.2.0

This release adds these new features.

  • (ADD) LazyInclude and LazyRequire can now recieve a LazyValue as a filename, so that the filename is not resolved until the include/require is invoked.
  • (ADD) Allow direct use of lazies in Lazy; cf PR #128.
  • (ADD) Add a new LazyCallable type for injecting callable services; cf. PR #129.
  • (CHG) LazyValue now resolves lazies itself; cf. PR #137.
  • (ADD) Add a new LazyArray type for injecting arrays of lazy-resolved values; cf PR #138.

There are also various documentation improvements, and the package now provides (via Composer) the virtual package container-interop-implementation.

3.1.0

This release has one documentation addition, and one feature addition.

  • Added documentation for upgrading/migrating from 2.x to 3.x
  • In ContainerBuilder::newConfiguredInstance(), added the ability to pass a ContainerConfig object instance as a config specification.
3.0.0

This is the first 3.x stable release.

2.2.4
  • Fixes #91 property-read designation causes PHPStorm to have syntax error. Changed @property-read to @property so they will still be auto-completed by IDE. Thank you David Stockton, Brandon Savage.
  • Fix the doc comments.
3.0.0-beta2

This is the second beta release of this library, and likely the last before a stable release (barring unexpected feature changes and bugfixes).

  • (BRK) Container methods newInstance() and get() now lock the Container automatically. (See note below.)
  • (CHG) $di->params now allows null as a parameter value.
  • (ADD) ContainerConfigInterface
  • (ADD) Better exception messages.
  • (DOC) Add and update documentation.

Regarding auto-locking of the Container after newInstance() and get():

This prevents errors from premature unification of params/setters/values/etc. in the Resolver. As a result, do not use Container newInstance() or get() before you are finished calling $params, $setters, $values, set(), or other methods that modify the Container. Use the lazy*() equivalents to avoid auto-locking the Container.

3.0.0-beta1
  • BREAK: Rename Aura\Di\_Config\AbstractContinerTest to Aura\Di\AbstractContainerConfigTest.
  • BREAK: The ContainerBuilder no longer accepts pre-built services, only config class names.
  • BREAK: Remove the Aura\Di\Exception\ReflectionFailure exception, throw the native \ReflectionException instead.
  • BREAK: Previously, the AutoResolver would supply an empty array for array typehints, and null for non-typehinted parameters. It no longer does so; it only attempts to auto-resolve class/interface typehints.
  • CHANGE: Add .gitattributes file for export-ignore values.
  • CHANGE: Allow PHP 5.5 as the minimum version.
  • ADD: Allow constructor params to be specified using position number; this is in addition to specifying by $param name. Positional params take precendence over named params, to be consistent pre-existing behavior regarding merged parameters.
  • DOCS: Update documentation, add bookdown files.
2.2.3

This release provides a better message for Exception\ReflectionFailure, via issue #73.

3.0.0-alpha1

First 3.x alpha release.

2.2.2

This is releases moves the AbstractContainerTest to is proper location. Sorry for making two releases in a row so quickly.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport