All Notable changes to League\Container
will be documented in this file
- Remove an unnecessary conditional in ServiceProviderAggregate. (@SubhanSh)
- Fixed an infinite loop in resolving definitions. (@arai-ta)
- Support for psr/container 1.1.0.
- Fix bug that was causing an error on inflection due to introduced type hint.
- Move files autoload directive to dev (@ADmad)
- Way to handle non-public controllers safely (@beryllium)
- New definition interface that extends psr/container
- Literal and resolvable argument wrappers for better explicitness in definitions
- PHP requirement now
>=7.2
- Updated
psr/container
to ^2.0.0 Container::shared
convenience method is now explicitContainer::addShared
method- Removed third argument
$shared
fromContainer::add
, useContainer::addShared
ServiceProviderInterface
now defines return types- Service providers now require implementation of a
provides
method rather than relying on a class property.
- Way to handle non-public controllers safely (@beryllium)
- PHPUnit ^7.0 for PHP versions that support it (@beryllium)
- Support for
psr/container
^2.0.0 as the interface cannot be reconciled between versions
- Support for
psr/container
^2.0.0
- Fixed an issue that caused a recursive
register
call. @pcoutinho - Fixed a return type declaration. @orbex
- Fixed bug relating to
ReflectionContainer::call
on arrow functions.
- Experimental support for PHP 8.
- Fix issue when preventing reflection from using default value for arguments.
- Respect
$new
argument when getting tagged definitions.
- Support for PHP 7.3
{set,get}LeagueContainer
methods added to ContainerAwareTrait as a temporary measure until next major release when this can be properly addressed, less hinting ofPsr\Container\ContainerInterface
- Various internal code improvements
- Fix for
setConcrete
not re-resolving class on when overriding (@jleeothon) - Fix stack overflow error incase a service provider lies about providing a specific service (@azjezz)
- Fix issue where providers may be aggregated multiple times (@bwg)
- Various documentation fixes
- Fixed issue that prevented service providers from registering if a previous one in the aggregate was already registered.
- Fixed issue where all service providers were registered regardless of whether they need to be.
- Added ability to add definition as not shared when container is set to default to shared.
- Added
{set|get}Concrete
to definitions to allow for better use ofextend
.
- Re-added the
share
proxy method that was mistakenly removed in previous major release. - Added ability to set Container to "share" by default using
defaultToShared
method. - Added ability for
ReflectionContainer
to cache resolutions and pull from cache for following calls.
- Allow definition aggregates to be built outside of container.
- Service providers can now be pulled from the container if they are registered.
- Definition logic now handled by aggregate for better separation.
- Now able to add tags to a definition to return an array of items containing that tag.
- Updated minimum PHP requirements to 7.0.
- Now depend directly on PSR-11 interfaces, including providing PSR-11 exceptions.
- Refactored inflector logic to accept type on construction and use generator to iterate.
- Refactored service provider logic with better separation and performance.
- Merged service provider signature logic in to one interface and abstract.
- Heavily simplified definition logic providing more control to user.
- Ensures
ReflectionContainer
converts class name in array callable to object.
- Can now wrap shared objects as
RawArgument
. - Ability to override shared items.
- Booleans now recognised as accepted values.
- Various docblock fixes.
- Unused imports removed.
- Unreachable arguments no longer passed.
- Now implementation of the PSR-11.
- Service providers can now be added multiple times by giving them a signature.
- Allow resolving of
RawArgument
objects as first class dependencies.
- Unnecessary recursion removed from
Container::get
.
- Bug where delegating container was not passed to delegate when needed.
- Bug where
Container::extend
would not return a shared definition to extend.
- Bug introduced in 2.0.1 where shared definitions registered via a service provider would never be returned as shared.
- Bug where shared definitions were not stored as shared.
- Now implementation of the container-interop project.
BootableServiceProviderInterface
for eagerly loaded service providers.- Delegate container functionality.
RawArgument
to ensure scalars are not resolved from the container but seen as an argument.
- Refactor of definition functionality.
Container::share
replacessingleton
functionality to improve understanding.- Auto wiring is now disabled by default.
- Auto wiring abstracted to be a delegate container
ReflectionContainer
handling all reflection based functionality. - Inflection functionality abstracted to an aggregate.
- Service provider functionality abstracted to an aggregate.
- Much bloat removed.
Container::call
now proxies toReflectionContainer::call
and handles argument resolution in a much more efficient way.
- Ability to register invokables, this functionality added a layer of complexity too large for the problem it solved.
- Container no longer accepts a configuration array, this functionality will now be provided by an external service provider package.
- Added
isRegisteredCallable
method to public API. - Invoking
call
now accepts named arguments at runtime.
- Container now stores instantiated Service Providers after first instantiation.
- Extending a definition now looks in Service Providers as well as just Definitions.
- Fixed bug where arbitrary values were attempted to be resolved as classes.
- Added
ServiceProvider
functionality to allow cleaner resolving of complex dependencies. - Added
Inflector
functionality to allow for manipulation of resolved objects of a specific type. - Improvements to DRY throughout the package.
- Setter in
ContainerAwareTrait
now returns self ($this
).
- Allow arbitrary values to be registered via container config.
- Improvements to
Container::call
functionality.
- General code tidy.
- Improvements to test suite.
- Allow singleton to be passed as method argument.
- Addition of
ContainerAwareTrait
to provide functionality fromContainerAwareInterface
.
- Migrated from Orno\Di.