Skip to content

Deprecate Evented and @ember/object/events (RFC 1111)#21491

Open
NullVoxPopuli-ai-agent wants to merge 2 commits into
emberjs:mainfrom
NullVoxPopuli-ai-agent:deprecate-evented
Open

Deprecate Evented and @ember/object/events (RFC 1111)#21491
NullVoxPopuli-ai-agent wants to merge 2 commits into
emberjs:mainfrom
NullVoxPopuli-ai-agent:deprecate-evented

Conversation

@NullVoxPopuli-ai-agent

Copy link
Copy Markdown
Contributor

Implements RFC 1111: Deprecating Ember.Evented and @ember/object/events.

This finishes the work started in #20970 (the squashed original work is preserved with @wagenet as author; a follow-up commit rebases it onto current main and resolves the open questions).

What this deprecates

All under the single id deprecate-evented (since: { available: '7.3.0' }, until: '8.0.0', staged as available only since the RFC is at the Accepted stage):

  • Applying the Evented mixin (via a new internal mixin-deprecation mechanism: setDeprecation/findDeprecation fire in Mixin#reopen when a deprecated mixin — or a mixin containing one — is applied, DEBUG-only)
  • Calling the Evented methods on/one/off/trigger/has (including on framework classes like classic Component, Route, and EmberRouter)
  • addListener/removeListener/sendEvent imported from @ember/object/events (deprecating wrappers; the internal @ember/-internals/metal implementations remain silent)
  • The on() event decorator from @ember/object/evented

RouterService exemption

Per the RFC, RouterService's event methods are not deprecated: it no longer extends Evented and instead implements on/one/off/trigger/has directly on top of the internal (non-deprecating) listener functions, with routeWillChange/routeDidChange documented types.

Framework internals fire no deprecations

  • Internal mixin applications (CoreView, Route, EmberRouter) are wrapped in disableDeprecations()
  • Classic component lifecycle events (didInsertElement, willRender, …) and EventDispatcher dispatch now go through new internal sendCoreViewEvent/hasCoreViewListener helpers instead of view.trigger()/view.has()
  • Route activate/deactivate and EmberRouter routeWillChange/routeDidChange use internal sendEvent directly
  • Mixin observer/listener bookkeeping uses the internal addListener/removeListener

This is proven by the ALL_DEPRECATIONS_ENABLED=true suite run: any unexpected deprecation fails a test, and all 9427 tests pass.

Differences from #20970

  • Deprecation id settled as deprecate-evented (was placeholder ember-evented), versions updated from 6.12.0 to 7.3.0; the guide in Add deprecation guide for Ember.Evented and @ember/object/events ember-learn/deprecation-app#1404 (evented.md) should be renamed to deprecate-evented.md and its versions updated to match
  • Rebased onto current main: deep-path imports (ember-local/no-barrel-imports), the removed packages/ember barrel, and the reorganized glimmer internals
  • The previously failing smoke tests and Node.js tests pass (failures appear to have been staleness of the old branch)

Verified locally

  • Browser suite in all four variants: default, ALL_DEPRECATIONS_ENABLED=true, OVERRIDE_DEPRECATION_VERSION=15.0.0, production — 0 failures
  • All 7 smoke-test scenarios (classic, embroider webpack/vite, strict resolver, node), plus classic-basics with OVERRIDE_DEPRECATION_VERSION=15.0.0
  • type-check:internals, type-check:types, eslint, prettier, node tests, docs coverage

🤖 Generated with Claude Code

wagenet and others added 2 commits July 7, 2026 23:14
Squashed from PR emberjs#20970 by Peter Wagenet, rebased onto current main.

Co-authored-by: Peter Wagenet <peter@wagenet.us>
…tibility

- Register the deprecation as `deprecate-evented` (since 7.3.0, until 8.0.0),
  matching the current DEPRECATIONS id conventions
- Use deep module imports per current main conventions
- Drop the resurrected packages/ember/barrel.ts (deleted on main)
- Drop the mixin-deprecation re-exports from the eager utils barrel
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.

3 participants