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

Remove deprecated MODEL_FACTORY_INJECTIONS #16462

Merged
merged 1 commit into from
Apr 4, 2018
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
18 changes: 0 additions & 18 deletions packages/ember/lib/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import require, { has } from 'require';
import { DEBUG } from 'ember-env-flags';

// ****ember-environment****
import { ENV, context } from 'ember-environment';
Expand Down Expand Up @@ -33,7 +32,6 @@ Ember.Registry = Registry;
// need to import this directly, to ensure the babel feature
// flag plugin works properly
import * as EmberDebug from 'ember-debug';
import { deprecate } from 'ember-debug';

// Using _globalsComputed here so that mutating the function is only available
// in globals builds
Expand Down Expand Up @@ -194,22 +192,6 @@ Object.defineProperty(Ember, 'LOG_VERSION', {
enumerable: false,
});

if (DEBUG) {
Object.defineProperty(Ember, 'MODEL_FACTORY_INJECTIONS', {
get() {
return false;
},
set() {
deprecate('Ember.MODEL_FACTORY_INJECTIONS is no longer required', false, {
id: 'ember-metal.model_factory_injections',
until: '2.17.0',
url: 'https://emberjs.com/deprecations/v2.x/#toc_id-ember-metal-model_factory_injections',
});
},
enumerable: false,
});
}

Object.defineProperty(Ember, 'LOG_BINDINGS', {
get() {
return ENV.LOG_BINDINGS;
Expand Down
22 changes: 0 additions & 22 deletions packages/ember/tests/reexports_test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Ember from '../index';
import { ENV } from 'ember-environment';
import { confirmExport } from 'internal-test-helpers';
import { DEBUG } from 'ember-env-flags';
import { moduleFor, AbstractTestCase } from 'internal-test-helpers';

moduleFor(
Expand All @@ -23,27 +22,6 @@ moduleFor(
['@test Ember.String.isHTMLSafe exports correctly'](assert) {
confirmExport(Ember, assert, 'String.isHTMLSafe', 'ember-glimmer', 'isHTMLSafe');
}

['@test Ember.MODEL_FACTORY_INJECTIONS'](assert) {
if (DEBUG) {
let descriptor = Object.getOwnPropertyDescriptor(Ember, 'MODEL_FACTORY_INJECTIONS');
assert.equal(descriptor.enumerable, false, 'descriptor is not enumerable');
assert.equal(descriptor.configurable, false, 'descriptor is not configurable');

assert.equal(Ember.MODEL_FACTORY_INJECTIONS, false);

expectDeprecation(function() {
Ember.MODEL_FACTORY_INJECTIONS = true;
}, 'Ember.MODEL_FACTORY_INJECTIONS is no longer required');
assert.equal(
Ember.MODEL_FACTORY_INJECTIONS,
false,
'writing to the property has no affect'
);
} else {
assert.expect(0);
}
}
}
);

Expand Down