feat: removes auto injection of userAgent service #42
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.
Ember v4.0 removes support for implicit injections, as perf emberjs/ember.js#19680. If you were relying on this feature in your code, you should migrate your code base and explicitly inject the userAgent service at the call sites.
If you absolutely must temporarily restore the old behavior, you can include this intializer as
app/intializers/user-agent.js
:ember-useragent/addon/initializers/user-agent.js
Lines 7 to 14 in 32039b6
Please note, that you will still have to migrate your app to use explicit injections, in order to be able to upgrade to Ember v4.0, so this should only be used as a last-resort temporary band-aid.
Ref: #41 (comment).
Thanks to @buschtoens