angel3_container 10.0.0
angel3_container: ^10.0.0 copied to clipboard
Angel3 hierarchical DI container, and pluggable backends for reflection.
Change Log #
10.0.0 #
Breaking changes in 10.0.0 #
- Breaking:
package:angel3_container/mirrors.dartis removed:MirrorsReflectoris in the newangel3_container_mirrorspackage, soangel3_containerno longer depends ondart:mirrors - Breaking:
Container.makeleaves out an optional positional parameter whose type is not registered (it isnull, or keeps its default), instead of constructing it by reflection - Breaking:
StaticReflectedInstance.getFieldthrows aReflectionExceptionfor a name that is no member, instead of returningnull; aStaticMemberReaderreturns the newnoStaticMemberfor it
New in 10.0.0 #
- Static reflection, without
dart:mirrors:@injectable,ReflectionData,StaticReflector.combineand theStaticReflected*classes, for the dataangel3_container_generatorgenerates ReflectedClass.supertypes,ReflectedParameter.hasDefaultValueandContainer.isUnconstructible(whether an error ofmakemeans a type cannot be constructed)
Fixes in 10.0.0 #
- Parameters:
Container.makekeeps the default of a constructor parameter whose type is not registered, and leaves out an optional named one whose type cannot be constructed; an error thrown by a constructor is no longer swallowed - MirrorsReflector: Named constructor parameters are passed, where required ones failed and optional ones were
null - Cycles: A circular dependency throws a
ReflectionException, instead of overflowing the stack - Lazy singletons: A child container gets its own
registerLazySingletoninstance, andregisterLazySingletonreturnsf, as documented - Docs: The README tells how to install and use the package, and how to migrate from 9.x
9.1.0 #
- Require Dart >= 3.13
9.0.0 #
- Require Dart >= 3.12
- Refactored code
8.4.0 #
- Require Dart >= 3.8
- Updated
lintsto 6.0.0 - Updated dependencies to the latest release
8.3.0 #
- Require Dart >= 3.6
- Updated
lintsto 5.0.0 - Updated dependencies to the latest release
8.2.0 #
- Require Dart >= 3.3
- Updated
lintsto 4.0.0
8.1.1 #
- Updated repository link
8.1.0 #
- Updated
lintsto 3.0.0 - Fixed analyser warnings
8.0.0 #
- Require Dart >= 3.0
7.1.0-beta.2 #
- Require Dart >= 2.19
- Refactored
EmptyReflector
7.1.0-beta.1 #
- Require Dart >= 2.18
- Moved
defaultErrorMessagetoContainerConstclass to resolve reflectatable issue. - Added
hashCode
7.0.0 #
- Require Dart >= 2.17
6.0.0 #
- Require Dart >= 2.16
- Removed
error
5.0.0 #
- Skipped release
4.0.0 #
- Skipped release
3.1.1 #
- Updated
_ReflectedMethodMirrorto have optionalreturnTypeparameter - Updated
Containerto handle non nullable type
3.1.0 #
- Updated linter to
package:lints
3.0.2 #
- Resolved static analysis warnings
3.0.1 #
- Updated README
3.0.0 #
- Migrated to support Dart >= 2.12 NNBD
2.0.0 #
- Migrated to work with Dart >= 2.12 Non NNBD
1.1.0 #
pedanticlints.- Add
ThrowingReflector, which throws on all operations. EmptyReflectorusesObjectinstead ofdynamicas its returned type, as thedynamictype is (apparently?) no longer a valid constant value.registerSingletonnow returns the providedobject.registerFactoryandregisterLazySingletonnow return the provided functionf.
1.0.4 #
- Slight patch to prevent annoying segfault.
1.0.3 #
- Added
Futuresupport toReflector.
1.0.2 #
- Added
makeAsync<T>.
1.0.1 #
- Added
hasNamed.
1.0.0 #
- Removed
@GenerateReflector.
1.0.0-alpha.12 #
StaticReflectornow defaults to empty arguments.
1.0.0-alpha.11 #
- Added
StaticReflector.
1.0.0-alpha.10 #
- Added
Container.registerLazySingleton<T>. - Added named singleton support.
1.0.0-alpha.9 #
- Added
Container.has<T>.
1.0.0-alpha.8 #
- Fixed a bug where
_ReflectedTypeInstance.isAssignableToalways failed. - Added
@GenerateReflectorannotation.
1.0.0-alpha.7 #
- Add
EmptyReflector. ReflectedType.newInstancenow returns aReflectedInstance.- Moved
ReflectedInstance.invoketoReflectedFunction.invoke.
1.0.0-alpha.6 #
- Add
getFieldtoReflectedInstance.
1.0.0-alpha.5 #
- Remove concrete type from
ReflectedTypeParameter.
1.0.0-alpha.4 #
- Safely handle
voidreturn types of methods.
1.0.0-alpha.3 #
- Reflecting
voidinMirrorsReflectornow forwards todynamic.
1.0.0-alpha.2 #
- Added
ReflectedInstance.reflectee.
1.0.0-alpha.1 #
- Allow omission of the first argument of
Container.make, to use a generic type argument instead. singleton->registerSingleton- Add
createChild, and support hierarchical containers.