Skip to content

Remove the server.enhanceMiddleware deprecation warning - #2091

Merged
huntie merged 1 commit into
mainfrom
robhogan/remove-enhance-middleware-warning
Oct 23, 2026
Merged

huntie merged 1 commit into
mainfrom
robhogan/remove-enhance-middleware-warning

Conversation

@robhogan

@robhogan robhogan commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Stop logging a deprecation warning when server.enhanceMiddleware is set. The config remains deprecated (as it has been for a long time), just removing the new/unreleased warning, which can't land in a patch release.

Frameworks still set enhanceMiddlware, so (eg) every Expo user sees the warning without being able to act on it.

In general, we should only introduce a loud deprecation warning:

  • In a new major
  • When we have a stable alternative or migration path.

In this case recommending an unstable API (which we're certain to remove or rename) over a deprecated one isn't moving folks forward.

Follow-up to #2031, unreleased. I'd consider this blocking for a Metro patch release.

Changelog: [Internal]

Stop logging a deprecation warning when `server.enhanceMiddleware` is set. The option stays documented as deprecated in favor of `server.unstable_middleware`, `server.unstable_priorityMiddleware` and `server.unstable_onServerCreated`. Expo CLI still sets it itself, so every Expo user sees the warning without being able to act on it.

The `defaultEnhanceMiddleware` sentinel only existed so the warning could tell the default apart from a user value, so it goes too. The default is an inline identity function again.

Follow-up to #2031.

Changelog: [Internal]
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 23, 2026
@robhogan
robhogan requested review from huntie and vzaidman October 23, 2026 15:55
@huntie
huntie merged commit 17fa699 into main Oct 23, 2026
16 checks passed
@huntie
huntie deleted the robhogan/remove-enhance-middleware-warning branch October 23, 2026 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants