Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core): use class references as keys (container) #6141

Merged
merged 7 commits into from
Jan 27, 2021

Conversation

kamilmysliwiec
Copy link
Member

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

The container uses class references as providers/controllers/injectables keys instead of their names.

Does this PR introduce a breaking change?

[x] Yes
[ ] No

Other information

tooleks and others added 4 commits October 28, 2020 23:59
For class providers use a class reference instead of a class name as an injection token to address dependency injection conflicts when two classes share the same name.

resolve #5591
@coveralls
Copy link

Pull Request Test Coverage Report for Build 078b58e0-e3d1-42d2-bc07-d6e6557503d8

  • 75 of 77 (97.4%) changed or added relevant lines in 11 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.01%) to 94.731%

Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/core/injector/injector.ts 8 9 88.89%
packages/core/injector/module.ts 23 24 95.83%
Totals Coverage Status
Change from base Build c2030d95-6168-498b-8379-a80117eec7e0: -0.01%
Covered Lines: 5070
Relevant Lines: 5352

💛 - Coveralls

CarsonF added a commit to SeedCompany/cord-api-v3 that referenced this pull request Sep 19, 2021
This is a requirement from Nest 8 change where classes are registered
by class instance instead of class name.
nestjs/nest#6141
nestjs/nest#5591
CarsonF added a commit to SeedCompany/cord-api-v3 that referenced this pull request Sep 19, 2021
This is a requirement from Nest 8 change where classes are registered
by class instance instead of class name.
nestjs/nest#6141
nestjs/nest#5591
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants