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

[CLEANUP] Remove legacy controller proxy behavior #15922

Merged
merged 1 commit into from
Dec 7, 2017
Merged
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
11 changes: 0 additions & 11 deletions packages/ember-runtime/lib/mixins/-proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,6 @@ export default Mixin.create({
unknownProperty(key) {
let content = get(this, 'content');
if (content) {
deprecate(
`You attempted to access \`${key}\` from \`${this}\`, but object proxying is deprecated. Please use \`model.${key}\` instead.`,
!this.isController,
{ id: 'ember-runtime.controller-proxy', until: '3.0.0' }
);
return get(content, key);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rwjblue shouldn't we remove the remaining code too instead of removing just the deprecation warning?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Turbo87 What do you mean by remaining code?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the return get(content, key); 🤔

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, that code supports proxies generally. The deprecation was only for when a Ember.Controller base class mixed in the proxy mixin (which is how Ember.ObjectController and Ember.ArrayController worked). Those two classes have been removed, and this mixin is private so there was just no need for the deprecation for when included in controllers...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, thanks :)

},
Expand All @@ -127,12 +122,6 @@ export default Mixin.create({
let content = get(this, 'content');
assert(`Cannot delegate set('${key}', ${value}) to the \'content\' property of object proxy ${this}: its 'content' is undefined.`, content);

deprecate(
`You attempted to set \`${key}\` from \`${this}\`, but object proxying is deprecated. Please use \`model.${key}\` instead.`,
!this.isController,
{ id: 'ember-runtime.controller-proxy', until: '3.0.0' }
);

return set(content, key, value);
}
});