Deprecations Added in Ember 5.x

What follows is a list of deprecations introduced to Ember during the 5.x cycle.

For more information on deprecations in Ember, see the main deprecations page.

Deprecations Added in 5.3.0

§ Implicit Route Model

until: 6.0.0
id: deprecate-implicit-route-model

Previously, if no Route#model hook was specified and a _id parameter was present, Ember would attempt to figure out how to load that model for you. Specify your own model hook to load from the store, if desired.

An optional feature, called no-implicit-route-model, can be turned on to clear this deprecation and opt in to the new behaviour. This optional feature is enabled in blueprints as of v5.7.0 and will be removed in v6.0.0. For more information, see the optional features guides.

For example:

import { Route } from '@ember/routing/route';
import { service } from '@ember/service';

export default class MyModelRoute extends Route {
  @service store;

  model({ my_model_id }) {
    return this.store.findRecord('my-model', my_model_id);
  }
}

For more background, read the RFC.

Deprecations Added in 5.9.0

§ Action helper and modifier

until: 6.0.0
id: template-action

Scenario: action is passed a string

Before:

<button type="button" {{action "plusOne"}}>
  Click Me
</button>

After:

<button type="button" {{on 'click' this.plusOne}}>
  Click Me
</button>

or, if plusOne is passed in as an argument:

<button type="button" {{on 'click' @plusOne}}>
  Click Me
</button>

If the plusOne action is in an actions object, it needs to move out:

For Glimmer components

Before:

import Component from '@glimmer/component';

export default class Demo extends Component {
    actions = {
        plusOne() {
           /* ... */ 
        }
    }
}

After:

import Component from '@glimmer/component';
import { action } from '@ember/object';

export default class Demo extends Component {
    @action
    plusOne() {
       /* ... */ 
    }
}

or

For Classic Components with native classes

Before:

import Component from '@ember/component';

export default class Demo extends Component {
    doMath() {
      this.send('plusOne');
    }

    actions = {
        plusOne() {
           /* ... */ 
        }
    }
}

After:

import Component from '@ember/component';
import { action } from '@ember/object';

export default class Demo extends Component {
    doMath() {
      this.plusOne();
    }

    @action
    plusOne() {
       /* ... */ 
    }
}

or

For Classic Components with EmberObject.extend

Before:

import Component from '@ember/component';

export default Component.extend({
    actions: {
        plusOne() {
           /* ... */ 
        }
    }
})

After:

import Component from '@ember/component';
import { action } from '@ember/object';

export default Component.extend({
  plusOne: action(function() {
      /* ... */ 
  }),
})

If (action) or {{action}} is passed a string, it's possible that the referenced method is declared on the caller, and not the immediate component -- that is, (action) and {{action}} bubble up the render tree from route templates -> controllers -> routes.

Note that @action is completely different from (action) or {{action}} (and is partly a motivator for deprecating (action) and {{action}}, to reduce ambiguity).

@action binds the this on the method to the instance of the class.

Scenario: action is passed a function reference

Before:

<SomeComponent @update={{action this.plusOne}} />

After

<SomeComponent @update={{this.plusOne}} />

Scenario: action is passed parameters

Before:

<SomeComponent @update={{action this.plus 1}} />

After:

<SomeComponent @update={{fn this.plus 1}} />

Scenario: action is used with mut

Before:

<SomeComponent @update={{action (mut @value.property}} />

After:

// parent.js
import Component from '@glimmer/component';
import { action } from '@ember/object';

export default class SomeComponent extends Component {
    @action
    handleUpdate(value) {
        this.args.property = value; 
    }
}
{{! parent.hbs }}
<SomeComponent @update={{this.handleUpdate}} />

Related, Combining function arguments with action functions

For more background, read the RFC

Deprecations Added in 5.10.0

§ Component Template Resolving

until: 6.0.0
id: component-template-resolving

There are two types of paths to migrate off the old layouts

  • use a currently supported multi-file layout (keeping separate js, ts, and hbs files)
  • migrate the component entirely to the latest component format, gjs, gts, (aka <template>)

There are some tools to help with this:

Specifically, these layouts are no longer supported:

ClassicPods
{app,addon}/
  components/
    foo.js
    namespace/
      bar.js
  templates/
    components/
      foo.hbs
      namespace/
        bar.hbs
{app,addon}/
  components/
    foo/
      component.js
      template.hbs
    namespace/
      bar/
        component.js
        template.hbs

The above example(s) can be migrated to:

{app,addon}/
  components/
    foo.js 
    foo.hbs
    namespace/
      bar.js
      bar.hbs

Or using --component-structure=nested

{app,addon}/
  components/
    foo/
      index.js 
      index.hbs
    namespace/
      bar/
        index.js
        index.hbs

Note, however, that classic components importing the layout and setting it on an @ember/component will still work. The key thing being deprecated is the runtime resolution of templates, so if there is an import involved, there is no runtime resolution.

§ Ember.__loader

until: 6.0.0
id: deprecate-import---loader-from-ember

Previously, __loader could be accessed via the Ember import:

import Ember from 'ember';

Ember.__loader

There is no replacement for this API.

§ Ember._action

until: 6.0.0
id: deprecate-import--action-from-ember

Previously, _action could be accessed via the Ember import:

import Ember from 'ember';

Ember._action

If needed, _action can be imported:

import { action } from '@ember/object';

§ Ember._array

until: 6.0.0
id: deprecate-import--array-from-ember

Previously, _array could be accessed via the Ember import:

import Ember from 'ember';

Ember._array

If needed, _array can be imported:

import { array } from '@ember/helper';

§ Ember._assertDestroyablesDestroyed

until: 6.0.0
id: deprecate-import--assert-destroyables-destroyed-from-ember

Previously, _assertDestroyablesDestroyed could be accessed via the Ember import:

import Ember from 'ember';

Ember._assertDestroyablesDestroyed

If needed, _assertDestroyablesDestroyed can be imported:

import { assertDestroyablesDestroyed } from '@ember/destroyable';

§ Ember._associateDestroyableChild

until: 6.0.0
id: deprecate-import--associate-destroyable-child-from-ember

Previously, _associateDestroyableChild could be accessed via the Ember import:

import Ember from 'ember';

Ember._associateDestroyableChild

If needed, _associateDestroyableChild can be imported:

import { associateDestroyableChild } from '@ember/destroyable';

§ Ember._Backburner

until: 6.0.0
id: deprecate-import--backburner-from-ember

Previously, _Backburner could be accessed via the Ember import:

import Ember from 'ember';

Ember._Backburner

_Backburner is also private.

There is no replacement for this API.

§ Ember._Cache

until: 6.0.0
id: deprecate-import--cache-from-ember

Previously, _Cache could be accessed via the Ember import:

import Ember from 'ember';

Ember._Cache

There is no replacement for this API.

§ Ember._cacheGetValue

until: 6.0.0
id: deprecate-import--cache-get-value-from-ember

Previously, _cacheGetValue could be accessed via the Ember import:

import Ember from 'ember';

Ember._cacheGetValue

If needed, _cacheGetValue can be imported:

import { getValue } from '@glimmer/tracking/primitives/cache';

§ Ember._cacheIsConst

until: 6.0.0
id: deprecate-import--cache-is-const-from-ember

Previously, _cacheIsConst could be accessed via the Ember import:

import Ember from 'ember';

Ember._cacheIsConst

If needed, _cacheIsConst can be imported:

import { isConst } from '@glimmer/tracking/primitives/cache';

§ Ember._captureRenderTree

until: 6.0.0
id: deprecate-import--capture-render-tree-from-ember

Previously, _captureRenderTree could be accessed via the Ember import:

import Ember from 'ember';

Ember._captureRenderTree

_captureRenderTree is also private.

If needed, _captureRenderTree can be imported:

import { captureRenderTree } from '@ember/debug';

However, due to _captureRenderTree being private, it is not recommended, nor supported.

§ Ember._componentManagerCapabilities

until: 6.0.0
id: deprecate-import--component-manager-capabilities-from-ember

Previously, _componentManagerCapabilities could be accessed via the Ember import:

import Ember from 'ember';

Ember._componentManagerCapabilities

If needed, _componentManagerCapabilities can be imported:

import { capabilities } from '@ember/component';

§ Ember._concat

until: 6.0.0
id: deprecate-import--concat-from-ember

Previously, _concat could be accessed via the Ember import:

import Ember from 'ember';

Ember._concat

If needed, _concat can be imported:

import { concat } from '@ember/helper';

§ Ember._ContainerProxyMixin

until: 6.0.0
id: deprecate-import--container-proxy-mixin-from-ember

Previously, _ContainerProxyMixin could be accessed via the Ember import:

import Ember from 'ember';

Ember._ContainerProxyMixin

_ContainerProxyMixin is also private.

There is no replacement for this API.

§ Ember._createCache

until: 6.0.0
id: deprecate-import--create-cache-from-ember

Previously, _createCache could be accessed via the Ember import:

import Ember from 'ember';

Ember._createCache

If needed, _createCache can be imported:

import { createCache } from '@glimmer/tracking/primitives/cache';

§ Ember._dependentKeyCompat

until: 6.0.0
id: deprecate-import--dependent-key-compat-from-ember

Previously, _dependentKeyCompat could be accessed via the Ember import:

import Ember from 'ember';

Ember._dependentKeyCompat

If needed, _dependentKeyCompat can be imported:

import { dependentKeyCompat } from '@ember/object/compat';

§ Ember._descriptor

until: 6.0.0
id: deprecate-import--descriptor-from-ember

Previously, _descriptor could be accessed via the Ember import:

import Ember from 'ember';

Ember._descriptor

There is no replacement for this API.

§ Ember._enableDestroyableTracking

until: 6.0.0
id: deprecate-import--enable-destroyable-tracking-from-ember

Previously, _enableDestroyableTracking could be accessed via the Ember import:

import Ember from 'ember';

Ember._enableDestroyableTracking

If needed, _enableDestroyableTracking can be imported:

import { enableDestroyableTracking } from '@ember/destroyable';

§ Ember._fn

until: 6.0.0
id: deprecate-import--fn-from-ember

Previously, _fn could be accessed via the Ember import:

import Ember from 'ember';

Ember._fn

If needed, _fn can be imported:

import { fn } from '@ember/helper';

§ Ember._getComponentTemplate

until: 6.0.0
id: deprecate-import--get-component-template-from-ember

Previously, _getComponentTemplate could be accessed via the Ember import:

import Ember from 'ember';

Ember._getComponentTemplate

If needed, _getComponentTemplate can be imported:

import { getComponentTemplate } from '@ember/component';

§ Ember._get

until: 6.0.0
id: deprecate-import--get-from-ember

Previously, _get could be accessed via the Ember import:

import Ember from 'ember';

Ember._get

If needed, _get can be imported:

import { get } from '@ember/helper';

§ Ember._getPath

until: 6.0.0
id: deprecate-import--get-path-from-ember

Previously, _getPath could be accessed via the Ember import:

import Ember from 'ember';

Ember._getPath

There is no replacement for this API.

§ Ember._hash

until: 6.0.0
id: deprecate-import--hash-from-ember

Previously, _hash could be accessed via the Ember import:

import Ember from 'ember';

Ember._hash

If needed, _hash can be imported:

import { hash } from '@ember/helper';

§ Ember._helperManagerCapabilities

until: 6.0.0
id: deprecate-import--helper-manager-capabilities-from-ember

Previously, _helperManagerCapabilities could be accessed via the Ember import:

import Ember from 'ember';

Ember._helperManagerCapabilities

If needed, _helperManagerCapabilities can be imported:

import { capabilities } from '@ember/helper';

§ Ember._Input

until: 6.0.0
id: deprecate-import--input-from-ember

Previously, _Input could be accessed via the Ember import:

import Ember from 'ember';

Ember._Input

If needed, _Input can be imported:

import { Input }  from '@ember/component';

§ Ember._invokeHelper

until: 6.0.0
id: deprecate-import--invoke-helper-from-ember

Previously, _invokeHelper could be accessed via the Ember import:

import Ember from 'ember';

Ember._invokeHelper

If needed, _invokeHelper can be imported:

import { invokeHelper } from '@ember/helper';

§ Ember._isDestroyed

until: 6.0.0
id: deprecate-import--is-destroyed-from-ember

Previously, _isDestroyed could be accessed via the Ember import:

import Ember from 'ember';

Ember._isDestroyed

If needed, _isDestroyed can be imported:

import { isDestroyed } from '@ember/destroyable';

§ Ember._isDestroying

until: 6.0.0
id: deprecate-import--is-destroying-from-ember

Previously, _isDestroying could be accessed via the Ember import:

import Ember from 'ember';

Ember._isDestroying

If needed, _isDestroying can be imported:

import { isDestroying } from '@ember/destroyable';

§ Ember._modifierManagerCapabilities

until: 6.0.0
id: deprecate-import--modifier-manager-capabilities-from-ember

Previously, _modifierManagerCapabilities could be accessed via the Ember import:

import Ember from 'ember';

Ember._modifierManagerCapabilities

If needed, _modifierManagerCapabilities can be imported:

import { capabilities } from '@ember/modifier';

§ Ember._on

until: 6.0.0
id: deprecate-import--on-from-ember

Previously, _on could be accessed via the Ember import:

import Ember from 'ember';

Ember._on

If needed, _on can be imported:

import { on } from '@ember/modifier';

§ Ember._ProxyMixin

until: 6.0.0
id: deprecate-import--proxy-mixin-from-ember

Previously, _ProxyMixin could be accessed via the Ember import:

import Ember from 'ember';

Ember._ProxyMixin

_ProxyMixin is also private.

There is no replacement for this API.

§ Ember._registerDestructor

until: 6.0.0
id: deprecate-import--register-destructor-from-ember

Previously, _registerDestructor could be accessed via the Ember import:

import Ember from 'ember';

Ember._registerDestructor

If needed, _registerDestructor can be imported:

import { registerDestructor } from '@ember/destroyable';

§ Ember._RegistryProxyMixin

until: 6.0.0
id: deprecate-import--registry-proxy-mixin-from-ember

Previously, _RegistryProxyMixin could be accessed via the Ember import:

import Ember from 'ember';

Ember._RegistryProxyMixin

_RegistryProxyMixin is also private.

There is no replacement for this API.

§ Ember._setClassicDecorator

until: 6.0.0
id: deprecate-import--set-classic-decorator-from-ember

Previously, _setClassicDecorator could be accessed via the Ember import:

import Ember from 'ember';

Ember._setClassicDecorator

_setClassicDecorator is also private.

There is no replacement for this API.

§ Ember._setComponentManager

until: 6.0.0
id: deprecate-import--set-component-manager-from-ember

Previously, _setComponentManager could be accessed via the Ember import:

import Ember from 'ember';

Ember._setComponentManager

If needed, _setComponentManager can be imported:

import { setComponentManager } from '@ember/component';

§ Ember._setComponentTemplate

until: 6.0.0
id: deprecate-import--set-component-template-from-ember

Previously, _setComponentTemplate could be accessed via the Ember import:

import Ember from 'ember';

Ember._setComponentTemplate

If needed, _setComponentTemplate can be imported:

import { setComponentTemplate } from '@ember/component';

§ Ember._setHelperManager

until: 6.0.0
id: deprecate-import--set-helper-manager-from-ember

Previously, _setHelperManager could be accessed via the Ember import:

import Ember from 'ember';

Ember._setHelperManager

If needed, _setHelperManager can be imported:

import { setHelperManager } from '@ember/helper';

§ Ember._setModifierManager

until: 6.0.0
id: deprecate-import--set-modifier-manager-from-ember

Previously, _setModifierManager could be accessed via the Ember import:

import Ember from 'ember';

Ember._setModifierManager

If needed, _setModifierManager can be imported:

import { setModifierManager } from '@ember/modifier';

§ Ember._templateOnlyComponent

until: 6.0.0
id: deprecate-import--template-only-component-from-ember

Previously, _templateOnlyComponent could be accessed via the Ember import:

import Ember from 'ember';

Ember._templateOnlyComponent

If needed, _templateOnlyComponent can be imported:

import templateOnly from '@ember/component/template-only';

§ Ember._tracked

until: 6.0.0
id: deprecate-import--tracked-from-ember

Previously, _tracked could be accessed via the Ember import:

import Ember from 'ember';

Ember._tracked

If needed, _tracked can be imported:

import { tracked } from '@glimmer/tracking';

§ Ember._unregisterDestructor

until: 6.0.0
id: deprecate-import--unregister-destructor-from-ember

Previously, _unregisterDestructor could be accessed via the Ember import:

import Ember from 'ember';

Ember._unregisterDestructor

If needed, _unregisterDestructor can be imported:

import { unregisterDestructor } from '@ember/destroyable';

§ Ember.A

until: 6.0.0
id: deprecate-import-a-from-ember

Previously, A could be accessed via the Ember import:

import Ember from 'ember';

Ember.A

If needed, A can be imported:

import { A }  from '@ember/array';

§ Ember.ActionHandler

until: 6.0.0
id: deprecate-import-action-handler-from-ember

Previously, ActionHandler could be accessed via the Ember import:

import Ember from 'ember';

Ember.ActionHandler

ActionHandler is also private.

There is no replacement for this API.

§ Ember.addListener

until: 6.0.0
id: deprecate-import-add-listener-from-ember

Previously, addListener could be accessed via the Ember import:

import Ember from 'ember';

Ember.addListener

If needed, addListener can be imported:

import { addListener } from '@ember/object/events';

§ Ember.addObserver

until: 6.0.0
id: deprecate-import-add-observer-from-ember

Previously, addObserver could be accessed via the Ember import:

import Ember from 'ember';

Ember.addObserver

If needed, addObserver can be imported:

import { addObserver } from '@ember/object/observers';

§ Ember.Application

until: 6.0.0
id: deprecate-import-application-from-ember

Previously, Application could be accessed via the Ember import:

import Ember from 'ember';

Ember.Application

If needed, Application can be imported:

import Application from '@ember/application';

§ Ember.ApplicationInstance

until: 6.0.0
id: deprecate-import-application-instance-from-ember

Previously, ApplicationInstance could be accessed via the Ember import:

import Ember from 'ember';

Ember.ApplicationInstance

If needed, ApplicationInstance can be imported:

import ApplicationInstance from '@ember/application/instance';

§ Ember.Array

until: 6.0.0
id: deprecate-import-array-from-ember

Previously, Array could be accessed via the Ember import:

import Ember from 'ember';

Ember.Array

If needed, Array can be imported:

import Array  from '@ember/array';

§ Ember.ArrayProxy

until: 6.0.0
id: deprecate-import-array-proxy-from-ember

Previously, ArrayProxy could be accessed via the Ember import:

import Ember from 'ember';

Ember.ArrayProxy

If needed, ArrayProxy can be imported:

import ArrayProxy  from '@ember/array/proxy';

§ Ember.assert

until: 6.0.0
id: deprecate-import-assert-from-ember

Previously, assert could be accessed via the Ember import:

import Ember from 'ember';

Ember.assert

If needed, assert can be imported:

import { assert } from '@ember/debug';

§ Ember.beginPropertyChanges

until: 6.0.0
id: deprecate-import-begin-property-changes-from-ember

Previously, beginPropertyChanges could be accessed via the Ember import:

import Ember from 'ember';

Ember.beginPropertyChanges

beginPropertyChanges is also private.

There is no replacement for this API.

§ Ember.BOOTED

until: 6.0.0
id: deprecate-import-booted-from-ember

Previously, BOOTED could be accessed via the Ember import:

import Ember from 'ember';

Ember.BOOTED

BOOTED is also private.

There is no replacement for this API.

§ Ember.cacheFor

until: 6.0.0
id: deprecate-import-cache-for-from-ember

Previously, cacheFor could be accessed via the Ember import:

import Ember from 'ember';

Ember.cacheFor

There is no replacement for this API.

§ Ember.canInvoke

until: 6.0.0
id: deprecate-import-can-invoke-from-ember

Previously, canInvoke could be accessed via the Ember import:

import Ember from 'ember';

Ember.canInvoke

canInvoke is also private.

There is no replacement for this API.

§ Ember.changeProperties

until: 6.0.0
id: deprecate-import-change-properties-from-ember

Previously, changeProperties could be accessed via the Ember import:

import Ember from 'ember';

Ember.changeProperties

changeProperties is also private.

There is no replacement for this API.

§ Ember.Comparable

until: 6.0.0
id: deprecate-import-comparable-from-ember

Previously, Comparable could be accessed via the Ember import:

import Ember from 'ember';

Ember.Comparable

Comparable is also private.

There is no replacement for this API.

§ Ember.compare

until: 6.0.0
id: deprecate-import-compare-from-ember

Previously, compare could be accessed via the Ember import:

import Ember from 'ember';

Ember.compare

If needed, compare can be imported:

import { compare } from '@ember/utils';

§ Ember.Component

until: 6.0.0
id: deprecate-import-component-from-ember

Previously, Component could be accessed via the Ember import:

import Ember from 'ember';

Ember.Component

If needed, Component can be imported:

import Component  from '@ember/component';

§ Ember.computed

until: 6.0.0
id: deprecate-import-computed-from-ember

Previously, computed could be accessed via the Ember import:

import Ember from 'ember';

Ember.computed

If needed, computed can be imported:

import { computed } from '@ember/object';

§ Ember.ComputedProperty

until: 6.0.0
id: deprecate-import-computed-property-from-ember

Previously, ComputedProperty could be accessed via the Ember import:

import Ember from 'ember';

Ember.ComputedProperty

There is no replacement for this API.

§ Ember.ContainerDebugAdapter

until: 6.0.0
id: deprecate-import-container-debug-adapter-from-ember

Previously, ContainerDebugAdapter could be accessed via the Ember import:

import Ember from 'ember';

Ember.ContainerDebugAdapter

If needed, ContainerDebugAdapter can be imported:

import ContainerDebugAdapter from '@ember/debug/container-debug-adapter';

§ Ember.Container

until: 6.0.0
id: deprecate-import-container-from-ember

Previously, Container could be accessed via the Ember import:

import Ember from 'ember';

Ember.Container

Container is also private.

There is no replacement for this API.

§ Ember.controllerFor

until: 6.0.0
id: deprecate-import-controller-for-from-ember

Previously, controllerFor could be accessed via the Ember import:

import Ember from 'ember';

Ember.controllerFor

controllerFor is also private.

There is no replacement for this API.

§ Ember.Controller

until: 6.0.0
id: deprecate-import-controller-from-ember

Previously, Controller could be accessed via the Ember import:

import Ember from 'ember';

Ember.Controller

If needed, Controller can be imported:

import Controller  from '@ember/controller';

§ Ember.ControllerMixin

until: 6.0.0
id: deprecate-import-controller-mixin-from-ember

Previously, ControllerMixin could be accessed via the Ember import:

import Ember from 'ember';

Ember.ControllerMixin

ControllerMixin is also private.

If needed, ControllerMixin can be imported:

import { ControllerMixin } from '@ember/controller';

However, due to ControllerMixin being private, it is not recommended, nor supported.

§ Ember.CoreObject

until: 6.0.0
id: deprecate-import-core-object-from-ember

Previously, CoreObject could be accessed via the Ember import:

import Ember from 'ember';

Ember.CoreObject

If needed, CoreObject can be imported:

import EmberObject from '@ember/object';

§ Ember.DataAdapter

until: 6.0.0
id: deprecate-import-data-adapter-from-ember

Previously, DataAdapter could be accessed via the Ember import:

import Ember from 'ember';

Ember.DataAdapter

If needed, DataAdapter can be imported:

import DataAdapter from '@ember/debug/data-adapter';

§ Ember.debug

until: 6.0.0
id: deprecate-import-debug-from-ember

Previously, debug could be accessed via the Ember import:

import Ember from 'ember';

Ember.debug

If needed, debug can be imported:

import { debug } from '@ember/debug';

§ Ember.defineProperty

until: 6.0.0
id: deprecate-import-define-property-from-ember

Previously, defineProperty could be accessed via the Ember import:

import Ember from 'ember';

Ember.defineProperty

If needed, defineProperty can be imported:

import { defineProperty } from '@ember/object';

§ Ember.deprecate

until: 6.0.0
id: deprecate-import-deprecate-from-ember

Previously, deprecate could be accessed via the Ember import:

import Ember from 'ember';

Ember.deprecate

If needed, deprecate can be imported:

import { deprecate } from '@ember/debug';

§ Ember.deprecateFunc

until: 6.0.0
id: deprecate-import-deprecate-func-from-ember

Previously, deprecateFunc could be accessed via the Ember import:

import Ember from 'ember';

Ember.deprecateFunc

If needed, deprecateFunc can be imported:

import { deprecateFunc } from '@ember/debug';

§ Ember.destroy

until: 6.0.0
id: deprecate-import-destroy-from-ember

Previously, destroy could be accessed via the Ember import:

import Ember from 'ember';

Ember.destroy

If needed, destroy can be imported:

import { destroy } from '@ember/destroyable';

§ Ember.endPropertyChanges

until: 6.0.0
id: deprecate-import-end-property-changes-from-ember

Previously, endPropertyChanges could be accessed via the Ember import:

import Ember from 'ember';

Ember.endPropertyChanges

endPropertyChanges is also private.

There is no replacement for this API.

§ Ember.Engine

until: 6.0.0
id: deprecate-import-engine-from-ember

Previously, Engine could be accessed via the Ember import:

import Ember from 'ember';

Ember.Engine

If needed, Engine can be imported:

import Engine from '@ember/engine';

§ Ember.EngineInstance

until: 6.0.0
id: deprecate-import-engine-instance-from-ember

Previously, EngineInstance could be accessed via the Ember import:

import Ember from 'ember';

Ember.EngineInstance

If needed, EngineInstance can be imported:

import Engine from '@ember/engine/instance';

§ Ember.Enumerable

until: 6.0.0
id: deprecate-import-enumerable-from-ember

Previously, Enumerable could be accessed via the Ember import:

import Ember from 'ember';

Ember.Enumerable

Enumerable is also private.

If needed, Enumerable can be imported:

import Enumerable from '@ember/enumerable';

However, due to Enumerable being private, it is not recommended, nor supported.

§ Ember.ENV

until: 6.0.0
id: deprecate-import-env-from-ember

Previously, ENV could be accessed via the Ember import:

import Ember from 'ember';

Ember.ENV

If needed, ENV can be imported:

import MyEnv from '<my-app>/config/environment';

For addons, getting access to the environment requires having access to the owner:

import { getOwner } from '@ember/owner';

// ...

let env = getOwner(this).resolveRegistration('config:environment');

§ Ember.Evented

until: 6.0.0
id: deprecate-import-evented-from-ember

Previously, Evented could be accessed via the Ember import:

import Ember from 'ember';

Ember.Evented

If needed, Evented can be imported:

import Evented from '@ember/object/evented';

§ Ember.expandProperties

until: 6.0.0
id: deprecate-import-expand-properties-from-ember

Previously, expandProperties could be accessed via the Ember import:

import Ember from 'ember';

Ember.expandProperties

If needed, expandProperties can be imported:

import { expandProperties } from '@ember/object/computed';

§ Ember.FEATURES

until: 6.0.0
id: deprecate-import-features-from-ember

Previously, FEATURES could be accessed via the Ember import:

import Ember from 'ember';

Ember.FEATURES

If needed, FEATURES can be imported:

import { isEnabled, FEATURES } from '@ember/canary-features';

§ Ember.generateControllerFactory

until: 6.0.0
id: deprecate-import-generate-controller-factory-from-ember

Previously, generateControllerFactory could be accessed via the Ember import:

import Ember from 'ember';

Ember.generateControllerFactory

generateControllerFactory is also private.

There is no replacement for this API.

§ Ember.generateController

until: 6.0.0
id: deprecate-import-generate-controller-from-ember

Previously, generateController could be accessed via the Ember import:

import Ember from 'ember';

Ember.generateController

generateController is also private.

There is no replacement for this API.

§ Ember.generateGuid

until: 6.0.0
id: deprecate-import-generate-guid-from-ember

Previously, generateGuid could be accessed via the Ember import:

import Ember from 'ember';

Ember.generateGuid

generateGuid is also private.

There is no replacement for this API.

§ Ember.get

until: 6.0.0
id: deprecate-import-get-from-ember

Previously, get could be accessed via the Ember import:

import Ember from 'ember';

Ember.get

If needed, get can be imported:

import { get } from '@ember/object';

§ Ember.getOwner

until: 6.0.0
id: deprecate-import-get-owner-from-ember

Previously, getOwner could be accessed via the Ember import:

import Ember from 'ember';

Ember.getOwner

If needed, getOwner can be imported:

import { getOwner } from '@ember/owner';

If you're working in a library and need to support earlier than ember-source@4.11, you may use @embroider/macros to selectively import from the old location

import {
  macroCondition,
  dependencySatisfies,
  importSync,
} from '@embroider/macros';

let getOwner;

if (macroCondition(dependencySatisfies('ember-source', '>= 4.11'))) {
  getOwner = importSync('@ember/owner').getOwner;
} else {
  getOwner = importSync('@ember/application').getOwner;
}

§ Ember.getProperties

until: 6.0.0
id: deprecate-import-get-properties-from-ember

Previously, getProperties could be accessed via the Ember import:

import Ember from 'ember';

Ember.getProperties

If needed, getProperties can be imported:

import { getProperties } from '@ember/object';

§ Ember.guidFor

until: 6.0.0
id: deprecate-import-guid-for-from-ember

Previously, guidFor could be accessed via the Ember import:

import Ember from 'ember';

Ember.guidFor

If needed, guidFor can be imported:

import { guidFor } from '@ember/object/internals';

§ Ember.GUID_KEY

until: 6.0.0
id: deprecate-import-guid-key-from-ember

Previously, GUID_KEY could be accessed via the Ember import:

import Ember from 'ember';

Ember.GUID_KEY

GUID_KEY is also private.

There is no replacement for this API.

§ Ember.Handlebars

until: 6.0.0
id: deprecate-import-handlebars-from-ember

Previously, Handlebars could be accessed via the Ember import:

import Ember from 'ember';

Ember.Handlebars

There is no replacement for this API.

§ Ember.hasListeners

until: 6.0.0
id: deprecate-import-has-listeners-from-ember

Previously, hasListeners could be accessed via the Ember import:

import Ember from 'ember';

Ember.hasListeners

There is no replacement for this API.

§ Ember.HashLocation

until: 6.0.0
id: deprecate-import-hash-location-from-ember

Previously, HashLocation could be accessed via the Ember import:

import Ember from 'ember';

Ember.HashLocation

If needed, HashLocation can be imported:

import HashLocation from '@ember/routing/hash-location';

§ Ember.Helper

until: 6.0.0
id: deprecate-import-helper-from-ember

Previously, Helper could be accessed via the Ember import:

import Ember from 'ember';

Ember.Helper

If needed, Helper can be imported:

import Helper  from '@ember/component/helper';

§ Ember.HistoryLocation

until: 6.0.0
id: deprecate-import-history-location-from-ember

Previously, HistoryLocation could be accessed via the Ember import:

import Ember from 'ember';

Ember.HistoryLocation

If needed, HistoryLocation can be imported:

import HistoryLocation from '@ember/routing/history-location';

§ Ember.HTMLBars

until: 6.0.0
id: deprecate-import-htmlbars-from-ember

Previously, HTMLBars could be accessed via the Ember import:

import Ember from 'ember';

Ember.HTMLBars

There is no replacement for this API.

§ Ember.inject

until: 6.0.0
id: deprecate-import-inject-from-ember

Previously, inject could be accessed via the Ember import:

import Ember from 'ember';

Ember.inject

There is no replacement for this API.

§ Ember.inspect

until: 6.0.0
id: deprecate-import-inspect-from-ember

Previously, inspect could be accessed via the Ember import:

import Ember from 'ember';

Ember.inspect

inspect is also private.

There is no replacement for this API.

§ Ember.instrument

until: 6.0.0
id: deprecate-import-instrument-from-ember

Previously, instrument could be accessed via the Ember import:

import Ember from 'ember';

Ember.instrument

instrument is also private.

If needed, instrument can be imported:

import { instrument } from '@ember/instrumentation';

However, due to instrument being private, it is not recommended, nor supported.

§ Ember.Instrumentation

until: 6.0.0
id: deprecate-import-instrumentation-from-ember

Previously, Instrumentation could be accessed via the Ember import:

import Ember from 'ember';

Ember.Instrumentation

Instrumentation is also private.

If needed, Instrumentation can be imported:

import { * } from '@ember/instrumentation';

However, due to Instrumentation being private, it is not recommended, nor supported.

§ Ember.isArray

until: 6.0.0
id: deprecate-import-is-array-from-ember

Previously, isArray could be accessed via the Ember import:

import Ember from 'ember';

Ember.isArray

If needed, isArray can be imported:

import { isArray }  from '@ember/array';

§ Ember.isBlank

until: 6.0.0
id: deprecate-import-is-blank-from-ember

Previously, isBlank could be accessed via the Ember import:

import Ember from 'ember';

Ember.isBlank

If needed, isBlank can be imported:

import { isBlank } from '@ember/utils';

§ Ember.isEmpty

until: 6.0.0
id: deprecate-import-is-empty-from-ember

Previously, isEmpty could be accessed via the Ember import:

import Ember from 'ember';

Ember.isEmpty

If needed, isEmpty can be imported:

import { isEmpty } from '@ember/utils';

§ Ember.isEqual

until: 6.0.0
id: deprecate-import-is-equal-from-ember

Previously, isEqual could be accessed via the Ember import:

import Ember from 'ember';

Ember.isEqual

If needed, isEqual can be imported:

import { isEqual } from '@ember/utils';

§ Ember.isNamespace

until: 6.0.0
id: deprecate-import-is-namespace-from-ember

Previously, isNamespace could be accessed via the Ember import:

import Ember from 'ember';

Ember.isNamespace

There is no replacement for this API.

§ Ember.isPresent

until: 6.0.0
id: deprecate-import-is-present-from-ember

Previously, isPresent could be accessed via the Ember import:

import Ember from 'ember';

Ember.isPresent

If needed, isPresent can be imported:

import { isPresent } from '@ember/utils';

§ Ember.libraries

until: 6.0.0
id: deprecate-import-libraries-from-ember

Previously, libraries could be accessed via the Ember import:

import Ember from 'ember';

Ember.libraries

There is no replacement for this API.

If needed, libraries can be imported from a private module:

import { libraries } from '@ember/-internals/metal';

Instead of using this import, consider using a build plugin for your packager. Some options:

  • https://github.com/ubilabs/webpack-node-modules-list
  • https://github.com/yjl9903/unplugin-info

These are both more automatic than Ember's libraries utility.

§ Ember.lookup

until: 6.0.0
id: deprecate-import-lookup-from-ember

Previously, lookup could be accessed via the Ember import:

import Ember from 'ember';

Ember.lookup

There is no replacement for this API.

§ Ember.makeArray

until: 6.0.0
id: deprecate-import-make-array-from-ember

Previously, makeArray could be accessed via the Ember import:

import Ember from 'ember';

Ember.makeArray

makeArray is also private.

If needed, makeArray can be imported:

import { makeArray }  from '@ember/array';

However, due to makeArray being private, it is not recommended, nor supported.

§ Ember.meta

until: 6.0.0
id: deprecate-import-meta-from-ember

Previously, meta could be accessed via the Ember import:

import Ember from 'ember';

Ember.meta

meta is also private.

If needed, meta can be imported:

import { meta } from '@ember/-internals/meta';

However, due to meta being private, it is not recommended, nor supported.

§ Ember.mixin

until: 6.0.0
id: deprecate-import-mixin-from-ember

Previously, mixin could be accessed via the Ember import:

import Ember from 'ember';

Ember.mixin

mixin is also private.

If needed, mixin can be imported:

import { mixin } from '@ember/object/mixin';

However, due to mixin being private, it is not recommended, nor supported.

§ Ember.MutableArray

until: 6.0.0
id: deprecate-import-mutable-array-from-ember

Previously, MutableArray could be accessed via the Ember import:

import Ember from 'ember';

Ember.MutableArray

If needed, MutableArray can be imported:

import MutableArray  from '@ember/array/mutable';

§ Ember.MutableEnumerable

until: 6.0.0
id: deprecate-import-mutable-enumerable-from-ember

Previously, MutableEnumerable could be accessed via the Ember import:

import Ember from 'ember';

Ember.MutableEnumerable

MutableEnumerable is also private.

If needed, MutableEnumerable can be imported:

import MutableEnumerable from '@ember/enumerable/mutable';

However, due to MutableEnumerable being private, it is not recommended, nor supported.

§ Ember.Namespace

until: 6.0.0
id: deprecate-import-namespace-from-ember

Previously, Namespace could be accessed via the Ember import:

import Ember from 'ember';

Ember.Namespace

If needed, Namespace can be imported:

import Namespace from '@ember/application/namespace';

§ Ember.NativeArray

until: 6.0.0
id: deprecate-import-native-array-from-ember

Previously, NativeArray could be accessed via the Ember import:

import Ember from 'ember';

Ember.NativeArray

If needed, NativeArray can be imported:

import { NativeArray }  from '@ember/array';

§ Ember.NoneLocation

until: 6.0.0
id: deprecate-import-none-location-from-ember

Previously, NoneLocation could be accessed via the Ember import:

import Ember from 'ember';

Ember.NoneLocation

If needed, NoneLocation can be imported:

import NoneLocation from '@ember/routing/none-location';

§ Ember.notifyPropertyChange

until: 6.0.0
id: deprecate-import-notify-property-change-from-ember

Previously, notifyPropertyChange could be accessed via the Ember import:

import Ember from 'ember';

Ember.notifyPropertyChange

If needed, notifyPropertyChange can be imported:

import { notifyPropertyChange } from '@ember/object';

§ Ember.Object

until: 6.0.0
id: deprecate-import-object-from-ember

Previously, Object could be accessed via the Ember import:

import Ember from 'ember';

Ember.Object

If needed, Object can be imported:

import Object from '@ember/object';

§ Ember.ObjectProxy

until: 6.0.0
id: deprecate-import-object-proxy-from-ember

Previously, ObjectProxy could be accessed via the Ember import:

import Ember from 'ember';

Ember.ObjectProxy

If needed, ObjectProxy can be imported:

import ObjectProxy from '@ember/object/proxy';

§ Ember.Observable

until: 6.0.0
id: deprecate-import-observable-from-ember

Previously, Observable could be accessed via the Ember import:

import Ember from 'ember';

Ember.Observable

If needed, Observable can be imported:

import Observable from '@ember/object/observable';

§ Ember.observer

until: 6.0.0
id: deprecate-import-observer-from-ember

Previously, observer could be accessed via the Ember import:

import Ember from 'ember';

Ember.observer

If needed, observer can be imported:

import { observer } from '@ember/object';

§ Ember.on

until: 6.0.0
id: deprecate-import-on-from-ember

Previously, on could be accessed via the Ember import:

import Ember from 'ember';

Ember.on

If needed, on can be imported:

import { on } from '@ember/object/evented';

§ Ember.onLoad

until: 6.0.0
id: deprecate-import-on-load-from-ember

Previously, onLoad could be accessed via the Ember import:

import Ember from 'ember';

Ember.onLoad

If needed, onLoad can be imported:

import { onLoad } from '@ember/application';

§ Ember.onerror

until: 6.0.0
id: deprecate-import-onerror-from-ember

Previously, onerror could be accessed via the Ember import:

import Ember from 'ember';

Ember.onerror

There is no replacement for this API.

§ Ember.PromiseProxyMixin

until: 6.0.0
id: deprecate-import-promise-proxy-mixin-from-ember

Previously, PromiseProxyMixin could be accessed via the Ember import:

import Ember from 'ember';

Ember.PromiseProxyMixin

If needed, PromiseProxyMixin can be imported:

import EmberPromiseProxyMixin from '@ember/object/promise-proxy-mixin';

§ Ember.Registry

until: 6.0.0
id: deprecate-import-registry-from-ember

Previously, Registry could be accessed via the Ember import:

import Ember from 'ember';

Ember.Registry

Registry is also private.

There is no replacement for this API.

§ Ember.removeListener

until: 6.0.0
id: deprecate-import-remove-listener-from-ember

Previously, removeListener could be accessed via the Ember import:

import Ember from 'ember';

Ember.removeListener

If needed, removeListener can be imported:

import { removeListener } from '@ember/object/events';

§ Ember.removeObserver

until: 6.0.0
id: deprecate-import-remove-observer-from-ember

Previously, removeObserver could be accessed via the Ember import:

import Ember from 'ember';

Ember.removeObserver

If needed, removeObserver can be imported:

import { removeObserver } from '@ember/object/observers';

§ Ember.Route

until: 6.0.0
id: deprecate-import-route-from-ember

Previously, Route could be accessed via the Ember import:

import Ember from 'ember';

Ember.Route

If needed, Route can be imported:

import Route from '@ember/routing/route';

§ Ember.RouterDSL

until: 6.0.0
id: deprecate-import-router-dsl-from-ember

Previously, RouterDSL could be accessed via the Ember import:

import Ember from 'ember';

Ember.RouterDSL

There is no replacement for this API.

§ Ember.RSVP

until: 6.0.0
id: deprecate-import-rsvp-from-ember

Previously, RSVP could be accessed via the Ember import:

import Ember from 'ember';

Ember.RSVP

If needed, RSVP can be imported:

import RSVP from 'rsvp';

§ Ember.run

until: 6.0.0
id: deprecate-import-run-from-ember

Previously, run could be accessed via the Ember import:

import Ember from 'ember';

Ember.run

If needed, run can be imported:

import { run } from '@ember/runloop';

§ Ember.runInDebug

until: 6.0.0
id: deprecate-import-run-in-debug-from-ember

Previously, runInDebug could be accessed via the Ember import:

import Ember from 'ember';

Ember.runInDebug

If needed, runInDebug can be imported:

import { runInDebug } from '@ember/debug';

§ Ember.runLoadHooks

until: 6.0.0
id: deprecate-import-run-load-hooks-from-ember

Previously, runLoadHooks could be accessed via the Ember import:

import Ember from 'ember';

Ember.runLoadHooks

If needed, runLoadHooks can be imported:

import { runLoadHooks } from '@ember/application';

§ Ember.sendEvent

until: 6.0.0
id: deprecate-import-send-event-from-ember

Previously, sendEvent could be accessed via the Ember import:

import Ember from 'ember';

Ember.sendEvent

If needed, sendEvent can be imported:

import { sendEvent } from '@ember/object/events';

§ Ember.Service

until: 6.0.0
id: deprecate-import-service-from-ember

Previously, Service could be accessed via the Ember import:

import Ember from 'ember';

Ember.Service

If needed, Service can be imported:

import Service from '@ember/service';

§ Ember.set

until: 6.0.0
id: deprecate-import-set-from-ember

Previously, set could be accessed via the Ember import:

import Ember from 'ember';

Ember.set

If needed, set can be imported:

import { set } from '@ember/object';

§ Ember.setOwner

until: 6.0.0
id: deprecate-import-set-owner-from-ember

Previously, setOwner could be accessed via the Ember import:

import Ember from 'ember';

Ember.setOwner

If needed, setOwner can be imported:

import { setOwner } from '@ember/owner';

If you're working in a library and need to support earlier than ember-source@4.11, you may use @embroider/macros to selectively import from the old location

import {
  macroCondition,
  dependencySatisfies,
  importSync,
} from '@embroider/macros';

let setOwner;

if (macroCondition(dependencySatisfies('ember-source', '>= 4.11'))) {
  setOwner = importSync('@ember/owner').setOwner;
} else {
  setOwner = importSync('@ember/application').setOwner;
}

§ Ember.setProperties

until: 6.0.0
id: deprecate-import-set-properties-from-ember

Previously, setProperties could be accessed via the Ember import:

import Ember from 'ember';

Ember.setProperties

If needed, setProperties can be imported:

import { setProperties } from '@ember/object';

§ Ember.setupForTesting

until: 6.0.0
id: deprecate-import-setup-for-testing-from-ember

Previously, setupForTesting could be accessed via the Ember import:

import Ember from 'ember';

Ember.setupForTesting

There is no replacement for this API.

§ Ember.subscribe

until: 6.0.0
id: deprecate-import-subscribe-from-ember

Previously, subscribe could be accessed via the Ember import:

import Ember from 'ember';

Ember.subscribe

subscribe is also private.

If needed, subscribe can be imported:

import { subscribe } from '@ember/instrumentation';

However, due to subscribe being private, it is not recommended, nor supported.

§ Ember.TEMPLATES

until: 6.0.0
id: deprecate-import-templates-from-ember

Previously, TEMPLATES could be accessed via the Ember import:

import Ember from 'ember';

Ember.TEMPLATES

TEMPLATES is also private.

There is no replacement for this API.

§ Ember.Test

until: 6.0.0
id: deprecate-import-test-from-ember

Previously, Test could be accessed via the Ember import:

import Ember from 'ember';

Ember.Test

There is no replacement for this API.

§ Ember.testing

until: 6.0.0
id: deprecate-import-testing-from-ember

Previously, testing could be accessed via the Ember import:

import Ember from 'ember';

Ember.testing

There is no replacement for this API.

§ Ember.toString

until: 6.0.0
id: deprecate-import-to-string-from-ember

Previously, toString could be accessed via the Ember import:

import Ember from 'ember';

Ember.toString

There is no replacement for this API.

§ Ember.trySet

until: 6.0.0
id: deprecate-import-try-set-from-ember

Previously, trySet could be accessed via the Ember import:

import Ember from 'ember';

Ember.trySet

If needed, trySet can be imported:

import { trySet } from '@ember/object';

§ Ember.typeOf

until: 6.0.0
id: deprecate-import-type-of-from-ember

Previously, typeOf could be accessed via the Ember import:

import Ember from 'ember';

Ember.typeOf

If needed, typeOf can be imported:

import { typeOf } from '@ember/utils';

§ Ember.uuid

until: 6.0.0
id: deprecate-import-uuid-from-ember

Previously, uuid could be accessed via the Ember import:

import Ember from 'ember';

Ember.uuid

There is no replacement for this API.

§ Ember.VERSION

until: 6.0.0
id: deprecate-import-version-from-ember

Previously, VERSION could be accessed via the Ember import:

import Ember from 'ember';

Ember.VERSION

If needed, VERSION can be imported:

import { VERSION } from '@ember/version';

§ Ember.ViewUtils

until: 6.0.0
id: deprecate-import-view-utils-from-ember

Previously, ViewUtils could be accessed via the Ember import:

import Ember from 'ember';

Ember.ViewUtils

ViewUtils is also private.

If needed, ViewUtils can be imported:

import { isSerializationFirstNode } from '@ember/-internals/glimmer';

However, due to ViewUtils being private, it is not recommended, nor supported.

§ Ember.warn

until: 6.0.0
id: deprecate-import-warn-from-ember

Previously, warn could be accessed via the Ember import:

import Ember from 'ember';

Ember.warn

If needed, warn can be imported:

import { warn } from '@ember/debug';

§ Ember.wrap

until: 6.0.0
id: deprecate-import-wrap-from-ember

Previously, wrap could be accessed via the Ember import:

import Ember from 'ember';

Ember.wrap

wrap is also private.

There is no replacement for this API.