You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Add InjectByTag support and global TagRegistry for testing
BREAKING CHANGE: Tag registry moved from per-container to global EllarInjector.tag_registry
Features:
- Add InjectByTag dependency resolution in Test.create_test_module()
- Implement get_type_from_tag() to resolve tagged providers from module metadata
- Add import string support for application_module parameter (e.g., app.module:ApplicationModule)
- Add __repr__ and __str__ methods to ProviderConfig for better debugging
Refactoring:
- Extract tag management into new TagRegistry class
- Make TagRegistry a class attribute of EllarInjector for global tag storage
- Remove Container._bindings_by_tag and Container.get_interface_by_tag()
- Tags now registered globally instead of per-container hierarchy
Documentation:
- Update testing.md with comprehensive usage examples
- Add InjectByTag testing patterns
- Document both override methods (override_provider and mock modules)
- Add practical testing patterns (integration, partial mocking, isolation)
- Include nested dependencies and error message examples
0 commit comments