From 5b01a2afeba1832a714b4c7ae69c90c6d6c70ff8 Mon Sep 17 00:00:00 2001 From: Michal Hajas Date: Fri, 21 Oct 2022 12:43:41 +0200 Subject: [PATCH] Add removal of deprecated methods to release notes/upgrading guide --- release_notes/topics/20_0_0.adoc | 9 +- upgrading/topics/keycloak/changes-20_0_0.adoc | 87 +++++++++++++++++++ 2 files changed, 95 insertions(+), 1 deletion(-) diff --git a/release_notes/topics/20_0_0.adoc b/release_notes/topics/20_0_0.adoc index da12dca998..e8366ba106 100644 --- a/release_notes/topics/20_0_0.adoc +++ b/release_notes/topics/20_0_0.adoc @@ -32,4 +32,11 @@ It’s important to emphasize that none of these breaking changes will come into == Realm Operator -As the new Operator currently lacks some of the CRs (e.g. Client and User), we're introducing a temporary workaround in the form of Realm Operator. Please see its https://github.com/keycloak/keycloak-realm-operator[GitHub Repository] for more details. See also https://www.keycloak.org/2022/09/operator-crs["The future of Keycloak Operator CRs" blogpost]. \ No newline at end of file +As the new Operator currently lacks some of the CRs (e.g. Client and User), we're introducing a temporary workaround in the form of Realm Operator. Please see its https://github.com/keycloak/keycloak-realm-operator[GitHub Repository] for more details. See also https://www.keycloak.org/2022/09/operator-crs["The future of Keycloak Operator CRs" blogpost]. + += Deprecated methods from data providers and models were removed + +Several deprecated methods were removed from data providers and models. +If not done already, their usage needs to be replaced with the corresponding +replacement documented in Javadoc of Keycloak 19 release. See +link:{upgradingguide_link}[{upgradingguide_name}] for more details. diff --git a/upgrading/topics/keycloak/changes-20_0_0.adoc b/upgrading/topics/keycloak/changes-20_0_0.adoc index d1816ff4be..d499cc7fde 100644 --- a/upgrading/topics/keycloak/changes-20_0_0.adoc +++ b/upgrading/topics/keycloak/changes-20_0_0.adoc @@ -88,3 +88,90 @@ The `hostname` and `tlsSecret` fields are now optional to align with the Quarkus = OLM channel was changed to fast The default channel of Keycloak Operator Lifecycle Manager was changed to `fast`. + + += Deprecated methods from data providers and models were removed + +Prior to Keycloak 15, there was a clean-up of provider and model interfaces +where we deprecated some methods. Javadoc of these methods contained +a corresponding replacement method (see Javadoc of Keycloak 19 release). +In this release the methods were removed. The following is a list of all +changed classes. + +The most common patterns for deprecating and removing the methods are +the following. + +* Streamification - interfaces now contain only Stream-based methods. ++ +For example in https://github.com/keycloak/keycloak/blob/19.0.3/server-spi/src/main/java/org/keycloak/models/GroupProvider.java[`GroupProvider`] interface ++ +[source,java] +---- +@Deprecated +List getGroups(RealmModel realm); +---- +was replaced by ++ +[source,java] +---- +Stream getGroupsStream(RealmModel realm); +---- ++ +More details on streamification work can be found in +https://issues.redhat.com/browse/KEYCLOAK-14011[KEYCLOAK-14011]. + +* Consistent parameter ordering - methods now have strict parameter +ordering where `RealmModel` is always the first parameter. ++ +For example in https://github.com/keycloak/keycloak/blob/19.0.3/server-spi/src/main/java/org/keycloak/storage/user/UserLookupProvider.java[`UserLookupProvider`] interface ++ +[source,java] +---- +@Deprecated +UserModel getUserById(String id, RealmModel realm); +---- +was replaced by ++ +[source,java] +---- +UserModel getUserById(RealmModel realm, String id) +---- + +== List of changed interfaces + +(`o.k.` stands for `org.keycloak.` package) + +* `server-spi` module +** `o.k.credential.CredentialInputUpdater` +** `o.k.credential.UserCredentialStore` +** `o.k.models.ClientProvider` +** `o.k.models.ClientSessionContext` +** `o.k.models.GroupModel` +** `o.k.models.GroupProvider` +** `o.k.models.KeyManager` +** `o.k.models.KeycloakSessionFactory` +** `o.k.models.ProtocolMapperContainerModel` +** `o.k.models.RealmModel` +** `o.k.models.RealmProvider` +** `o.k.models.RoleContainerModel` +** `o.k.models.RoleMapperModel` +** `o.k.models.RoleModel` +** `o.k.models.RoleProvider` +** `o.k.models.ScopeContainerModel` +** `o.k.models.UserCredentialManager` +** `o.k.models.UserModel` +** `o.k.models.UserProvider` +** `o.k.models.UserSessionProvider` +** `o.k.models.utils.RoleUtils` +** `o.k.sessions.AuthenticationSessionProvider` +** `o.k.storage.client.ClientLookupProvider` +** `o.k.storage.group.GroupLookupProvider` +** `o.k.storage.user.UserLookupProvider` +** `o.k.storage.user.UserQueryProvider` +* `server-spi-private` module +** `o.k.events.EventQuery` +** `o.k.events.admin.AdminEventQuery` +** `o.k.keys.KeyProvider` + +All changes are linked to the following https://github.com/keycloak/keycloak/issues/14720[issue]. +