[BUGFIX release-3-28] Fix #19867 #19868
Merged
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.
Fixes #19867. Confirmed fix on the reproductions at jherdman/ember-data-store-sadness#1 and empress/empress-blog#148.
A build of this branch can be downloaded at https://gist.github.com/mixonic/fe502b7f84eba571b9bde80e78f1b720. You can try out the branch in your application with that build.
The way most Ember apps are setup in late 3.28 (an implicit injection of
store
but also an explicit injection) was not under test. This patch adds a test, and fixes a bug when applications use that pattern.The prior implementation of the
store
injection deprecation on routes (added in #19854) used a wrapperDeprecatedStoreInjection
in some cases which was unwrapped by the store getter. A deprecation implemented onCoreObject
for when a explicit and implicit deprecation mis-match conflicted with that logic.Here, refactor away from the
DeprecatedStoreInjection
wrapper to instead use a WeakSet to track injected instances. This does mean the deprecation is only going to fire in newer browsers (not in IE11), but I think that is acceptable.