# Depractions while upgrading ember-js to 1.12.0 and ember-cli to 0 0.2.5

**URL:** <https://discuss.emberjs.com/t/depractions-while-upgrading-ember-js-to-1-12-0-and-ember-cli-to-0-0-2-5/8056>\
**Category:** Uncategorized\
**Created:** [May 22, 2015, 9:31am UTC](https://discuss.emberjs.com/t/depractions-while-upgrading-ember-js-to-1-12-0-and-ember-cli-to-0-0-2-5/8056 "2015-05-22T09:31:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![webdo\_mane](https://avatars.discourse-cdn.com/v4/letter/w/4af34b/32.png) [@webdo\_mane](https://discuss.emberjs.com/u/webdo_mane)\
**Post date:** [May 22, 2015, 9:31am UTC](https://discuss.emberjs.com/t/depractions-while-upgrading-ember-js-to-1-12-0-and-ember-cli-to-0-0-2-5/8056/1 "2015-05-22T09:31:15Z")

</div>

I am upgrading my Emberjs =\> from 1.10.0 to 1.12.0 Ember-cli =\> from 0.1.12 to 0.2.5

While i am figuring out most of the deprecations there are few which i am not able to understand. PFB the same

1. DEPRECATION: Ember.required is deprecated as its behavior is inconsistent and unreliable. Where is this used and how to change it?
2. DEPRECATION: `lookupFactory` was called on a Registry. The `initializer` API no longer receives a container, and you should use an `instanceInitializer` to look up objects from the container.  
I do understand this issue but my initializer does not use lookup at all. PFB the code of my initializer.

//app/initializer/abc

```
initialize: function(registry, app) {
  app.register('store:main', Store);
  // Inject into each route a store property with an instance of store:main
  app.inject('route', 'store', 'store:main');
  // Inject into each controller a store property with an instance of store:main
  app.inject('controller', 'store', 'store:main');
}

```

//app/initializer/def

```
initialize: function(registry, app) {
        // Register the session object.
        app.register('session:main', Session);

        // Inject the session object into all controllers.
        app.inject('controller', 'session', 'session:main');
    }

```

1. DEPRECATION: Using the context switching form of {{each}} is deprecated. Please use the block param form (`{{#each bar as |foo|}}`) instead. See [http://emberjs.com/guides/deprecations/#toc\_more-consistent-handlebars-scope](http://emberjs.com/guides/deprecations/#toc_more-consistent-handlebars-scope) for more details.  
 I understand here that `{{#each foo in bar itemController="abc"}}` should be changed to `{{#each bar itemController="abc" as |foo|}}`. But my code is as below and does not have `"in"`, meaning using this context!

---

<div class="post-metadata">

**Author:** ![dpreston](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/dpreston/32/10590_2.png) [@dpreston](https://discuss.emberjs.com/u/dpreston)\
**Post date:** [May 22, 2015, 10:11am UTC](https://discuss.emberjs.com/t/depractions-while-upgrading-ember-js-to-1-12-0-and-ember-cli-to-0-0-2-5/8056/2 "2015-05-22T10:11:25Z")

</div>

1. I don’t think I can help you with this one.
2. This is likely being caused by a [bug in ember-data beta.16+](https://github.com/emberjs/data/issues/3051)
3. I think you need to use `{{#each paged itemController="class.adm.man.stop-term" as |page|}}` see [Ember.js - Deprecations](http://emberjs.com/deprecations/v1.x/#toc_deprecations-added-in-1-12)

---

<div class="post-metadata">

**Author:** ![webdo\_mane](https://avatars.discourse-cdn.com/v4/letter/w/4af34b/32.png) [@webdo\_mane](https://discuss.emberjs.com/u/webdo_mane)\
**Post date:** [May 22, 2015, 10:48am UTC](https://discuss.emberjs.com/t/depractions-while-upgrading-ember-js-to-1-12-0-and-ember-cli-to-0-0-2-5/8056/3 "2015-05-22T10:48:46Z")

</div>

1. Is there anyone you know to whom i can tag that first question to?
2. Cool thanks
3. if i use `{{#each paged itemController="class.adm.man.stop-term" as |page|}}` then itemController properties wont be called since the context is not “this”, the context is still the parent controller context. Doing `{{#each paged itemController="class.adm.man.stop-term" as this}}` also didn help!

---

<div class="post-metadata">

**Author:** ![dpreston](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/dpreston/32/10590_2.png) [@dpreston](https://discuss.emberjs.com/u/dpreston)\
**Post date:** [May 22, 2015, 12:23pm UTC](https://discuss.emberjs.com/t/depractions-while-upgrading-ember-js-to-1-12-0-and-ember-cli-to-0-0-2-5/8056/4 "2015-05-22T12:23:19Z")

</div>

I hope this helps for 3.

> **[JS Bin](http://emberjs.jsbin.com/jejuri/1/edit?html,js,output)**
>
> A live pastebin for HTML, CSS & JavaScript and a range of processors, including SCSS, CoffeeScript, Jade and more...

See also [Ember - 4.6 - Ember API Documentation](http://emberjs.com/api/classes/Ember.Handlebars.helpers.html#toc_wrapping-each-item-in-a-controller)

---

<div class="post-metadata">

**Author:** ![webdo\_mane](https://avatars.discourse-cdn.com/v4/letter/w/4af34b/32.png) [@webdo\_mane](https://discuss.emberjs.com/u/webdo_mane)\
**Post date:** [May 22, 2015, 4:26pm UTC](https://discuss.emberjs.com/t/depractions-while-upgrading-ember-js-to-1-12-0-and-ember-cli-to-0-0-2-5/8056/5 "2015-05-22T16:26:27Z")

</div>

works like a charm. thanks a bunch dpreston
