Deprecations Added in Ember 6.x

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

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

Deprecations Added in 6.2.0

Importing inject from @ember/service

until: 7.0.0
id: importing-inject-from-ember-service

Importing inject from @ember/service is deprecated. Please import service instead.

Example:

my-route.js
import { Route } from '@ember/routing/route';
import { inject as service } from '@ember/service';
import { service } from '@ember/service';

export default class MyRoute extends Route {
  @service store;
}

You can use the ember-codemod-remove-inject-as-service codemod, to fix all violations.