Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX release] Prevent ArrayController deprecation on generated controllers. #11662

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions packages/ember-routing/tests/system/controller_for_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Namespace from 'ember-runtime/system/namespace';
import { classify } from 'ember-runtime/system/string';
import Controller from 'ember-runtime/controllers/controller';
import ObjectController from 'ember-runtime/controllers/object_controller';
import ArrayController, { arrayControllerDeprecation } from 'ember-runtime/controllers/array_controller';
import ArrayController from 'ember-runtime/controllers/array_controller';
import controllerFor from 'ember-routing/system/controller_for';
import generateController from 'ember-routing/system/generate_controller';
import {
Expand Down Expand Up @@ -103,7 +103,6 @@ QUnit.test('generateController should create Ember.ObjectController [DEPRECATED]
});

QUnit.test('generateController should create Ember.ArrayController', function() {
expectDeprecation(arrayControllerDeprecation);
var context = Ember.A();
var controller = generateController(container, 'home', context);

Expand Down Expand Up @@ -131,7 +130,6 @@ QUnit.test('generateController should create App.ObjectController if provided',
});

QUnit.test('generateController should create App.ArrayController if provided', function() {
expectDeprecation(arrayControllerDeprecation);
var context = Ember.A();
var controller;
namespace.ArrayController = ArrayController.extend();
Expand Down
3 changes: 2 additions & 1 deletion packages/ember-runtime/lib/controllers/array_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ export default ArrayProxy.extend(ControllerMixin, SortableMixin, {
},

init() {
Ember.deprecate(arrayControllerDeprecation);
Ember.deprecate(arrayControllerDeprecation, this.isGenerated);

this._super(...arguments);
this._subControllers = [];
},
Expand Down
5 changes: 1 addition & 4 deletions packages/ember/tests/helpers/link_to_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import isEnabled from 'ember-metal/features';
import { objectControllerDeprecation } from 'ember-runtime/controllers/object_controller';
import EmberHandlebars from 'ember-htmlbars/compat';
import EmberView from 'ember-views/views/view';
import { arrayControllerDeprecation } from 'ember-runtime/controllers/array_controller';

var compile = EmberHandlebars.compile;

Expand Down Expand Up @@ -482,7 +481,6 @@ QUnit.test('The {{link-to}} helper supports bubbles=false', function() {
});

QUnit.test('The {{link-to}} helper moves into the named route with context', function() {
expectDeprecation(arrayControllerDeprecation);
Router.map(function(match) {
this.route('about');
this.route('item', { path: '/item/:id' });
Expand Down Expand Up @@ -1048,8 +1046,7 @@ QUnit.test('The non-block form {{link-to}} helper updates the link text when it
});

QUnit.test('The non-block form {{link-to}} helper moves into the named route with context', function() {
expect(6);
expectDeprecation(arrayControllerDeprecation);
expect(5);
Router.map(function(match) {
this.route('item', { path: '/item/:id' });
});
Expand Down
2 changes: 0 additions & 2 deletions packages/ember/tests/homepage_example_test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'ember';
import Ember from 'ember-metal/core';
import EmberHandlebars from 'ember-htmlbars/compat';
import { arrayControllerDeprecation } from 'ember-runtime/controllers/array_controller';

var compile = EmberHandlebars.compile;

Expand All @@ -24,7 +23,6 @@ function setupExample() {

App.IndexRoute = Ember.Route.extend({
model() {
expectDeprecation(arrayControllerDeprecation);
var people = Ember.A([
App.Person.create({
firstName: 'Tom',
Expand Down
4 changes: 0 additions & 4 deletions packages/ember/tests/routing/basic_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -654,8 +654,6 @@ QUnit.test('The Homepage with a computed context that does not get overridden',
});

QUnit.test('The Homepage getting its controller context via model', function() {
expectDeprecation(arrayControllerDeprecation);

Router.map(function() {
this.route('home', { path: '/' });
});
Expand Down Expand Up @@ -2289,8 +2287,6 @@ QUnit.test('Nested index route is not overriden by parent\'s implicit index rout
});

QUnit.test('Application template does not duplicate when re-rendered', function() {
expectDeprecation(arrayControllerDeprecation);

Ember.TEMPLATES.application = compile('<h3>I Render Once</h3>{{outlet}}');

Router.map(function() {
Expand Down