From b15efb6e33185a57117a3c5e3a5986484ca501c3 Mon Sep 17 00:00:00 2001 From: fzaninotto Date: Wed, 10 Jul 2024 12:12:52 +0200 Subject: [PATCH] Bump version --- CHANGELOG.md | 4 ++++ UPGRADE.md | 25 ++++--------------------- package.json | 2 +- 3 files changed, 9 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c41b16c3..5036fe47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 4.0.0 + +* Compatibility with react-admin v5 + ## 3.4.5 * Fix validation errors shown as "Server communication error" when creating an entity diff --git a/UPGRADE.md b/UPGRADE.md index 295def84..40ce33e1 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -1,24 +1,7 @@ -# Upgrade to 3.0 +# Upgrade to 4.0 -First of all, read the [UPGRADE guide from react-admin](https://marmelab.com/react-admin/doc/4.0/Upgrade.html). +API Platform Admin 4.0 has the same API as API Platform admin 3.4, but now requires react-admin v5. -Since API Platform Admin is built on top of react-admin, almost everything in the react-admin upgrade guide applies to API Platform Admin as well. +If your application only uses components from the '@api-platform/admin' package, it should work out of the box with API Platform Admin 4.0. -This UPGRADE guide will only cover the specific changes for API Platform Admin. - -## Authentication Support - -Since the way to define custom routes has completely changed in react-admin, the way to add authentication support in API Platform Admin has also been modified. - -In short, you need to use the `` component inside the `` or `` component, with a redirect condition on its child. -The condition is taken from a state variable, and the state updater function is given to the data provider and will be used when there is an unauthorized error. - -To see the full updated example, please [go to the related documentation page](https://api-platform.com/docs/main/admin/authentication-support/). - -## Mercure Support - -Since react-admin does not use Redux anymore, it's also the case for Mercure in API Platform Admin. - -Instead it uses react-query cache to update the received changes in real time. - -You will not see the Redux data action when a resource is updated by Mercure anymore. +If you have done some customization based on the 'react-admin' package, you will probably have to make some changes. Read the [UPGRADE guide from react-admin](https://marmelab.com/react-admin/doc/5.0/Upgrade.html) for further details. diff --git a/package.json b/package.json index 071d6271..82960f53 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@api-platform/admin", - "version": "3.4.8", + "version": "4.0.0", "description": "Automatic administration interface for Hydra-enabled APIs.", "files": [ "*.md",