Closed
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
Member
Author
|
Passing TGP, aside from one unrelated failure. |
thePunderWoman
approved these changes
Mar 11, 2025
Contributor
thePunderWoman
left a comment
There was a problem hiding this comment.
LGTM!
reviewed-for: fw-general, public-api
AndrewKushnir
approved these changes
Mar 11, 2025
Contributor
AndrewKushnir
left a comment
There was a problem hiding this comment.
Reviewed-for: public-api
devversion
approved these changes
Mar 11, 2025
Member
devversion
left a comment
There was a problem hiding this comment.
LGTM on the migration code. Nice work
Contributor
|
This PR was merged into the repository by commit 8be6e38. The changes were merged into the following branches: main |
AndrewKushnir
pushed a commit
that referenced
this pull request
Mar 11, 2025
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
AndrewKushnir
pushed a commit
that referenced
this pull request
Mar 11, 2025
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
These changes remove the
InjectFlagsitself, as well as all the public API signatures that accepted it. I've included an automated migration fromInjectFlagsto the object literal.Note that we still have internal usages of
InjectFlagswhich will take more refactoring, but they've been replaced with theInternalInjectFlagswhich have the advantage of being aconst enum.BREAKING CHANGE:
InjectFlagshas been removed.injectno longer acceptsInjectFlags.Injector.getno longer acceptsInjectFlags.EnvironmentInjector.getno longer acceptsInjectFlags.TestBed.getno longer acceptsInjectFlags.TestBed.injectno longer acceptsInjectFlags.