Skip to content

Commit

Permalink
[BUGFIX release] Correct until values for this.container deprecat…
Browse files Browse the repository at this point in the history
…ions.

These deprecations were added in the Ember 2.3 cycle, before we had established
the LTS system and how private API deprecations are handled. Per the rules
we created around private API deprecations, the `until` value is supposed to be
the version just after the next LTS. In theory, that means this could have been
2.5.0 originally, but I'm updating to 2.13.0 because 2.12 was also an LTS.

An emberobserver.com search shows little usage (other than fallbacks when owner
is not found), and very few issues are still open around this sort of `.container`
deprecation.
  • Loading branch information
rwjblue committed Apr 27, 2017
1 parent ebdc828 commit 93c5cc2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/container/lib/container.js
Original file line number Diff line number Diff line change
Expand Up @@ -521,12 +521,12 @@ const INJECTED_DEPRECATED_CONTAINER_DESC = {
configurable: true,
enumerable: false,
get() {
deprecate('Using the injected `container` is deprecated. Please use the `getOwner` helper instead to access the owner of this object.', false, { id: 'ember-application.injected-container', until: '3.0.0', url: 'http://emberjs.com/deprecations/v2.x#toc_injected-container-access' });
deprecate('Using the injected `container` is deprecated. Please use the `getOwner` helper instead to access the owner of this object.', false, { id: 'ember-application.injected-container', until: '2.13.0', url: 'http://emberjs.com/deprecations/v2.x#toc_injected-container-access' });
return this[CONTAINER_OVERRIDE] || getOwner(this).__container__;
},

set(value) {
deprecate(`Providing the \`container\` property to ${this} is deprecated. Please use \`Ember.setOwner\` or \`owner.ownerInjection()\` instead to provide an owner to the instance being created.`, false, { id: 'ember-application.injected-container', until: '3.0.0', url: 'http://emberjs.com/deprecations/v2.x#toc_injected-container-access' });
deprecate(`Providing the \`container\` property to ${this} is deprecated. Please use \`Ember.setOwner\` or \`owner.ownerInjection()\` instead to provide an owner to the instance being created.`, false, { id: 'ember-application.injected-container', until: '2.13.0', url: 'http://emberjs.com/deprecations/v2.x#toc_injected-container-access' });

this[CONTAINER_OVERRIDE] = value;

Expand Down Expand Up @@ -591,7 +591,7 @@ function buildFakeContainerFunction(container, containerProperty, ownerProperty)
return function () {
deprecate(`Using the injected \`container\` is deprecated. Please use the \`getOwner\` helper to access the owner of this object and then call \`${ownerProperty}\` instead.`, false, {
id: 'ember-application.injected-container',
until: '3.0.0',
until: '2.13.0',
url: 'http://emberjs.com/deprecations/v2.x#toc_injected-container-access'
});
return container[containerProperty](...arguments);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ Object.defineProperty(ApplicationInstance.prototype, 'container', {
'Using `ApplicationInstance.container.lookup` is deprecated. Please use `ApplicationInstance.lookup` instead.',
false, {
id: 'ember-application.app-instance-container',
until: '3.0.0',
until: '2.13.0',
url: 'http://emberjs.com/deprecations/v2.x/#toc_ember-applicationinstance-container'
}
);
Expand Down

0 comments on commit 93c5cc2

Please sign in to comment.