[Feature] - Allow importing the object from string in the factory #179
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
@ShahriyarR, today I was using this amazing new feature and I came across an idea to apply on the top of this and grow your initial functionality. Allowing to pass a string
<module>.<object>
type and delegate the import to theFactory
itself. This way we can also avoid importing a lot of objects on the top of each needed file.I ran a PoC and added some tests for you to see what I mean. In the end, it is adding an extra alternative on the top of the already existing functionality.
Something like this:
What do you think? Your idea for the factory was game changing here and I'm already using it.
@PeterChain what do you think about this too?