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

[DOCS beta] Update Ember.deprecate and Ember.warn calls in ember-metal with required options #11839

Merged
merged 1 commit into from Jul 21, 2015

Conversation

ghost
Copy link

@ghost ghost commented Jul 21, 2015

See #11835

@@ -648,11 +648,11 @@ export function readOnly(dependentKey) {
export function deprecatingAlias(dependentKey) {
return computed(dependentKey, {
get(key) {
Ember.deprecate(`Usage of \`${key}\` is deprecated, use \`${dependentKey}\` instead.`);
Ember.deprecate(`Usage of \`${key}\` is deprecated, use \`${dependentKey}\` instead.`, false, { id: 'ember-metal.deprecating-alias', until: '3.0.0' });
Copy link
Member

Choose a reason for hiding this comment

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

This one needs to be tweaked a bit. We need to provide options at the calling site.

Basically, all usage of deprecatingAlias need to be updated, so that the 'id' and 'until' is unique to each deprecated property.

Copy link
Author

Choose a reason for hiding this comment

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

How about giving deprecatingAlias an options param?

Copy link
Member

Choose a reason for hiding this comment

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

Yep, sounds exactly correct. Then all the calling sites need to be updated to pass in their own options arg.

@rwjblue
Copy link
Member

rwjblue commented Jul 21, 2015

Looks great, I left some inline comments on tweaks. Thanks for tackling this!

@ghost
Copy link
Author

ghost commented Jul 21, 2015

@rwjblue Updated with tweaks.

@rwjblue
Copy link
Member

rwjblue commented Jul 21, 2015

👍

rwjblue added a commit that referenced this pull request Jul 21, 2015
…etal

[DOCS beta] Update `Ember.deprecate` and `Ember.warn` calls in ember-metal with required options
@rwjblue rwjblue merged commit 31dff06 into emberjs:master Jul 21, 2015
@rwjblue
Copy link
Member

rwjblue commented Jul 21, 2015

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants