Class CurrentDeprecations

public

Deprecation Management

EmberData allows users to opt-in and remove code that exists to support deprecated behaviors.

If your app has resolved all deprecations present in a given version, you may specify that version as your "compatibility" version to remove the code that supported the deprecated behavior from your app.

For instance, if a deprecation was introduced in 3.13, and the app specifies 3.13 as its minimum version compatibility, any deprecations introduced before or during 3.13 would be stripped away.

An app can use a different version than what it specifies as it's compatibility version. For instance, an App could be using 3.16 while specifying compatibility with 3.12. This would remove any deprecations that were present in or before 3.12 but keep support for anything deprecated in or above 3.13.

You may also specify that specific deprecations are resolved. These approaches may be used together.

setConfig(app, __dirname, {
  // declare that all deprecations through "5.0" have been fully resolved
  compatWith: '5.0',

  // mark individual deprecations as resolved by setting them to `false`
  deprecations: {
    // resolve individual deprecations here
  },
});

[!TIP] EmberData does not test against permutations of deprecations being stripped, our tests run against "all deprecated code included" and "all deprecated code removed". Unspecified behavior may sometimes occur when removing code for only some deprecations associated to a version number.