Skip to content

Deprecate PromiseProxyMixin, Enumerable and Observable per RFC 1116 - #21583

Closed
NullVoxPopuli-ai-agent wants to merge 1 commit into
emberjs:mainfrom
NullVoxPopuli-ai-agent:nvp/deprecate-mixin-followups
Closed

NullVoxPopuli-ai-agent wants to merge 1 commit into
emberjs:mainfrom
NullVoxPopuli-ai-agent:nvp/deprecate-mixin-followups

Conversation

@NullVoxPopuli-ai-agent

@NullVoxPopuli-ai-agent NullVoxPopuli-ai-agent commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

Advancement:

RFC:

Follow-up to #21577. That PR deprecated Mixin.create and listed three public mixins as remaining work. This PR deprecates those three.

Mixin Module Deprecation id
Ember.PromiseProxyMixin @ember/object/promise-proxy-mixin deprecate-promise-proxy-mixin
Ember.Enumerable @ember/enumerable deprecate-enumerable
Ember.Observable @ember/object/observable deprecate-observable

MutableEnumerable (@ember/enumerable/mutable) also uses deprecate-enumerable. It is the mutable half of the same module, so leaving it silent would leave a hole.

All three are available: 7.4.0, until: 8.0.0, and none are enabled yet.

How the notice fires

Each mixin records its own notice through deprecatedMixin, a new internal WeakMap in @ember/-internals/utils. CoreObject.extend and both reopen methods read that map and call the notice for each mixin they are given.

Ember builds its own classes from the same mixins, so those paths avoid extend. EmberObject reopens its PrototypeMixin with Observable in a static block, which is what extend does internally. @ember/array already applies Enumerable and Observable through INTERNAL_MIXIN_CREATE. Apps that never name a mixin get no notice.

Mixin.create(Observable) gets no extra notice. Authoring a mixin already fires deprecate-mixins.

Not in this PR

  • Observable#get and Observable#set on EmberObject still work with no notice. EmberObject is built from Observable, so deprecating the methods needs the internals to stop calling them first, the same way Deprecate Evented and @ember/object/events per RFC 1111 #21542 moved Route, EmberRouter and CoreView off Evented.
  • Deprecation guides. RFC 1116 still needs them.

Testing

Green in all five CI variants locally: default, ALL_DEPRECATIONS_ENABLED, OVERRIDE_DEPRECATION_VERSION=15.0.0, optional features, and the production build. Node tests and the tree-shakability probe also pass.

New tests live in packages/@ember/object/tests/mixin/deprecation_test.js. They cover the notice for each mixin and the silence of the framework path (EmberObject.extend({}), A([]), ArrayProxy.create()).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

best viewed ignoring invis chars

Follow-up to emberjs#21577, which deprecated `Mixin.create` itself. The advancement
RFC (emberjs/rfcs#1143) still lists these three public mixins as open work.

Each mixin records its own deprecation notice in a WeakMap through
`deprecatedMixin`. `CoreObject.extend` and both `reopen` methods read that map
and fire the notice for each mixin they are given. `EmberObject` reopens its
`PrototypeMixin` with `Observable` directly, which is what `extend` does
internally, so apps that never name the mixin get no notice.

`MutableEnumerable` shares the `deprecate-enumerable` id, because leaving it
alone would leave an obvious hole in the same module.

The three notices are available but not enabled, so they only fire when
`_ALL_DEPRECATIONS_ENABLED` is set. Test suite is green in the default,
all-deprecations, deprecations-as-errors, optional-features and production
variants.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T3ZrBpLnFsT39EKiAe4897
@NullVoxPopuli

Copy link
Copy Markdown
Contributor

Superseded by human: #21588

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