-
-
Notifications
You must be signed in to change notification settings - Fork 407
Deprecate Classic Classes #1117
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| --- | ||
| stage: accepted | ||
| start-date: 2025-06-20T00:00:00.000Z | ||
| release-date: | ||
| release-versions: | ||
| teams: # delete teams that aren't relevant | ||
| - cli | ||
| - data | ||
| - framework | ||
| - learning | ||
| - steering | ||
| - typescript | ||
| prs: | ||
| accepted: https://github.com/emberjs/rfcs/pull/1117 | ||
| project-link: | ||
| --- | ||
|
|
||
| # Deprecate Classic Classes | ||
|
|
||
| ## Summary | ||
|
|
||
| Deprecate the Classic Class system. | ||
|
|
||
| ## Motivation | ||
|
|
||
| For quite a while now, Ember has recommended the use of Native Classes over the Classic Class | ||
| system. The one remaining sticking point has been Mixins. If we | ||
| [Deprecate Mixins](https://github.com/emberjs/rfcs/pull/1116), then we can deprecate the Classic Class system. | ||
|
|
||
| ## Transition Path | ||
|
|
||
| All uses of Classic Classes should be converted to Native Classes. Anything that cannot be converted will be deprecated first, such as [Mixins](https://github.com/emberjs/rfcs/pull/1116) and the [`observer` helper function](https://github.com/emberjs/rfcs/pull/1115). | ||
|
|
||
| The `@classic` decorator (and any other APIs or patterns used to enable classic class interop) will also be deprecated as part of this transition. All code should migrate to native class syntax and patterns. | ||
|
|
||
| ## Exploration | ||
|
|
||
| To validate this deprecation, I've tried removing all of the Classic Class system in this PR: | ||
| https://github.com/emberjs/ember.js/pull/20923 | ||
|
|
||
| ## How We Teach This | ||
|
|
||
| We should remove all references from the guides. | ||
|
|
||
| ## Drawbacks | ||
|
|
||
| Other than it being a lot of work, there are no drawbacks. | ||
|
|
||
| ## Alternatives | ||
|
|
||
| None | ||
|
|
||
| ## Unresolved questions | ||
|
|
||
| Should we keep `EmberObject` around as a home for some utility methods and sugar or remove it entirely? | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
@classicdecorator pretty much does not work at this point. I recommend people remove it because it only had dev-time behavior, anyway.