Skip to content

Bump react-admin to 5.15.5 - #706

Merged
slax57 merged 8 commits into
api-platform:mainfrom
erwanMarmelab:bump-react-admin
Nov 6, 2026
Merged

slax57 merged 8 commits into
api-platform:mainfrom
erwanMarmelab:bump-react-admin

Conversation

@erwanMarmelab

Copy link
Copy Markdown
Contributor

Problem

API Platform Admin still depends on react-admin ^5.8.3. That blocks compatibility with recent react-admin releases and their new features.

Solution

Bump react-admin to ^5.15.5. The new version brings MUI 9 and TanStack Query 5.106, which required a few changes:

  • useOnSubmit: pass the MutationFunctionContext ({ client, meta }), now the 4th argument of onSuccess / onError
  • Stories: MUI 9 removed system props such as gap and width, so they move to sx
  • useOnSubmit.test.tsx: react-hotkeys-hook v5, a react-admin dependency, is ESM-only, so the test uses jest.unstable_mockModule instead of jest.requireActual
  • yarn.lock: bump nwsapi to 2.2.28 so jsdom can parse the CSS selectors MUI 9 generates

@api-platform/admin doesn't pin MUI, so new installs will now resolve MUI 9 through react-admin.

yarn build, yarn lint and yarn test pass locally.

Keep API Platform Admin compatible with recent react-admin releases.
The bump pulls MUI 9 and a newer TanStack Query, which required:
- passing the mutation context to onSuccess/onError in useOnSubmit
- replacing removed MUI system props with sx in stories
- using ESM module mocking since react-hotkeys-hook is now ESM-only
- updating nwsapi so jsdom can parse MUI 9 selectors
erwanMarmelab and others added 4 commits November 5, 2026 17:48
In Mercure 1.1, the "playground" directive redirects the site root "/" to
the debugger UI, which hijacks the API Platform entrypoint and breaks the
admin (302 without CORS headers). "debugger" keeps the Mercure UI without
side effects on "/".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@slax57
slax57 merged commit d8f91b1 into api-platform:main Nov 6, 2026
3 of 4 checks passed
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