-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Remove InjectFlags #60318
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
Remove InjectFlags #60318
Conversation
Adds an automated migration that will switch users from the deprecated `InjectFlags` API to its non-deprecated equivalent.
Removes the deprecated `InjectFlags` symbol from the `@angular/core` public API, as well as all the places that accept it. The previous commit includes an automated migration to switch over to the new way of passing in flags. BREAKING CHANGE: * `InjectFlags` has been removed. * `inject` no longer accepts `InjectFlags`. * `Injector.get` no longer accepts `InjectFlags`. * `EnvironmentInjector.get` no longer accepts `InjectFlags`. * `TestBed.get` no longer accepts `InjectFlags`. * `TestBed.inject` no longer accepts `InjectFlags`.
Replaces all the places where we use `InjectFlags` internally with the `InternalInjectFlags` which has the benefit of being a `const` enum and allowing us to consolidate the flags and object literal eventually.
bfd6e88
to
7f165be
Compare
Passing TGP, aside from one unrelated failure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
reviewed-for: fw-general, public-api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed-for: public-api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM on the migration code. Nice work
This PR was merged into the repository by commit 8be6e38. The changes were merged into the following branches: main |
Removes the deprecated `InjectFlags` symbol from the `@angular/core` public API, as well as all the places that accept it. The previous commit includes an automated migration to switch over to the new way of passing in flags. BREAKING CHANGE: * `InjectFlags` has been removed. * `inject` no longer accepts `InjectFlags`. * `Injector.get` no longer accepts `InjectFlags`. * `EnvironmentInjector.get` no longer accepts `InjectFlags`. * `TestBed.get` no longer accepts `InjectFlags`. * `TestBed.inject` no longer accepts `InjectFlags`. PR Close #60318
Replaces all the places where we use `InjectFlags` internally with the `InternalInjectFlags` which has the benefit of being a `const` enum and allowing us to consolidate the flags and object literal eventually. PR Close #60318
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
These changes remove the
InjectFlags
itself, as well as all the public API signatures that accepted it. I've included an automated migration fromInjectFlags
to the object literal.Note that we still have internal usages of
InjectFlags
which will take more refactoring, but they've been replaced with theInternalInjectFlags
which have the advantage of being aconst enum
.BREAKING CHANGE:
InjectFlags
has been removed.inject
no longer acceptsInjectFlags
.Injector.get
no longer acceptsInjectFlags
.EnvironmentInjector.get
no longer acceptsInjectFlags
.TestBed.get
no longer acceptsInjectFlags
.TestBed.inject
no longer acceptsInjectFlags
.