# Is this possible to turn off SOME deprecations warnings?

**URL:** <https://discuss.emberjs.com/t/is-this-possible-to-turn-off-some-deprecations-warnings/8196>\
**Category:** Uncategorized\
**Created:** [June 16, 2015, 12:41pm UTC](https://discuss.emberjs.com/t/is-this-possible-to-turn-off-some-deprecations-warnings/8196 "2015-06-16T12:41:40Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jacekkolasa](https://avatars.discourse-cdn.com/v4/letter/j/b2d939/32.png) [@jacekkolasa](https://discuss.emberjs.com/u/jacekkolasa)\
**Post date:** [June 16, 2015, 12:41pm UTC](https://discuss.emberjs.com/t/is-this-possible-to-turn-off-some-deprecations-warnings/8196/1 "2015-06-16T12:41:40Z")

</div>

I want to upgrade my app to version 1.11 and the biggest problem is the removal of ObjectController. It would be very helpfull for me to have warnings on “You attempted to access […] but object proxying is deprecated”, but not “Ember.ObjectController is deprecated, please use Ember.Controller…”.

Is this possible?

The reason for that is that I want to have ObjectController, so nothing breaks and just repair the proxying.

p.s. Is it also possible to hook to some deprecations? So when certain one is occurring, i can for example trigger some tracker and log it on server?

---

<div class="post-metadata">

**Author:** ![pixelhandler](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/pixelhandler/32/18649_2.png) [@pixelhandler](https://discuss.emberjs.com/u/pixelhandler)\
**Post date:** [June 17, 2015, 4:57am UTC](https://discuss.emberjs.com/t/is-this-possible-to-turn-off-some-deprecations-warnings/8196/2 "2015-06-17T04:57:10Z")

</div>

I would like to know how to disable warnings, aside from managing a fork of Ember, cause I’ve tried that.

---

<div class="post-metadata">

**Author:** ![rwjblue](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/rwjblue/32/9411_2.png) [@rwjblue](https://discuss.emberjs.com/u/rwjblue)\
**Post date:** [June 17, 2015, 1:19pm UTC](https://discuss.emberjs.com/t/is-this-possible-to-turn-off-some-deprecations-warnings/8196/3 "2015-06-17T13:19:48Z")

</div>

> [@pixelhandler](#):
>
> I would like to know how to disable warnings

- The best way is to fix what they are warning you about. 😃
- @pangratz has submitted an RFC (that I believe @mixonic has also reviewed and helped with) to make a public log level API, please check that out: [emberjs/rfcs#65](https://github.com/emberjs/rfcs/pull/65).
- If you need to be able to silence warnings and deprecations immediately, you can conditionally override the `Ember.deprecate` and `Ember.warn` methods. For example, while running your tests (or just running the app but without tests) you might add something like the following to `tests/test-helper.js`:

```javascript
import Ember from 'ember';

Ember.deprecate = function() { };
Ember.warn = function() { };

```

---

<div class="post-metadata">

**Author:** ![jacekkolasa](https://avatars.discourse-cdn.com/v4/letter/j/b2d939/32.png) [@jacekkolasa](https://discuss.emberjs.com/u/jacekkolasa)\
**Post date:** [June 17, 2015, 1:35pm UTC](https://discuss.emberjs.com/t/is-this-possible-to-turn-off-some-deprecations-warnings/8196/4 "2015-06-17T13:35:23Z")

</div>

> [@rwjblue](#):
>
> The best way is to fix what they are warning you about. smiley

I’ve asked the question because I want to fix the deprecations. 🙂Problem is that (if I see correctly) this RFC you are talking about is for the master branch so I don’t know if it’s possible to use in Ember 1.11…

I think this way would be good for many teams, when upgrading from 1.10 to 1.11:

- fixing all references to model without ‘model’ keyword
- at the same time leaving ObjectController, so nothing breaks (this causes unwanted obvious deprecation logs)
- eventually hook some api calls to all other deprecation logs
- after two weeks of work and testing, we are sure that there are no bad references to the model (no more logs from step above), we just replace all ObjectController with Controller everywhere in the app

p.s. so yeah, maybe replacing Ember.deprecate method, filtering the message text and, if passed, forwarding to the original method, is the best option…

---

<div class="post-metadata">

**Author:** ![pixelhandler](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/pixelhandler/32/18649_2.png) [@pixelhandler](https://discuss.emberjs.com/u/pixelhandler)\
**Post date:** [June 18, 2015, 5:16pm UTC](https://discuss.emberjs.com/t/is-this-possible-to-turn-off-some-deprecations-warnings/8196/5 "2015-06-18T17:16:41Z")

</div>

@rwjblue I recall there used to be hooks for dev only code I forget what happened to those, I used to have helpers for inspecting views and things like that. Seems like it would be cool to revive that dev plugin hook to easily redefine what deprecations you ignore during upgrade work. It’s been so noisy sometimes the deprecation just get in the way of development work.

---

<div class="post-metadata">

**Author:** ![rwjblue](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/rwjblue/32/9411_2.png) [@rwjblue](https://discuss.emberjs.com/u/rwjblue)\
**Post date:** [June 18, 2015, 5:32pm UTC](https://discuss.emberjs.com/t/is-this-possible-to-turn-off-some-deprecations-warnings/8196/6 "2015-06-18T17:32:43Z")

</div>

Yeah, I definitely understand your point. I intend to use the RFC that I linked above to make it trivial for an Ember CLI app to use `RAISE_ON_DEPRECATE` for any/all new deprecations but allow (or silence) ones that are still being worked on by a dev team. This both makes your console easier to look at, and gives you a concrete list of the “chores” that the team needs to cleanup over time.

Please review and chime in on that RFC…

---

<div class="post-metadata">

**Author:** ![pixelhandler](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/pixelhandler/32/18649_2.png) [@pixelhandler](https://discuss.emberjs.com/u/pixelhandler)\
**Post date:** [June 23, 2015, 8:09pm UTC](https://discuss.emberjs.com/t/is-this-possible-to-turn-off-some-deprecations-warnings/8196/7 "2015-06-23T20:09:24Z")

</div>

I really like the RFC for configuring log level and silencing deprecations. [https://github.com/emberjs/rfcs/pull/65](https://github.com/emberjs/rfcs/pull/65) hope it gets traction.

---

<div class="post-metadata">

**Author:** ![sandstrom](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/sandstrom/32/15173_2.png) [@sandstrom](https://discuss.emberjs.com/u/sandstrom)\
**Post date:** [March 2, 2017, 12:54pm UTC](https://discuss.emberjs.com/t/is-this-possible-to-turn-off-some-deprecations-warnings/8196/8 "2017-03-02T12:54:06Z")

</div>

The RFC mentioned above is now live and you can do something like this (in an initializer):

```auto
let list = ['id-for-deprecation']; // change this list

Ember.Debug.registerDeprecationHandler((message, options, next) => {
  if (!list.includes(options.id)) {
    next(message, options);
  }
});

```

_(noted here since this thread often comes up in Google queries)_
