diff --git a/dotnet-manual/modules/ROOT/content-nav.adoc b/dotnet-manual/modules/ROOT/content-nav.adoc index dc541f1e..8e07092f 100644 --- a/dotnet-manual/modules/ROOT/content-nav.adoc +++ b/dotnet-manual/modules/ROOT/content-nav.adoc @@ -3,4 +3,5 @@ * xref:client-applications.adoc[] * xref:cypher-workflow.adoc[] * xref:session-api.adoc[] +* xref:upgrade.adoc[] * xref:terminology.adoc[] diff --git a/dotnet-manual/modules/ROOT/pages/upgrade.adoc b/dotnet-manual/modules/ROOT/pages/upgrade.adoc new file mode 100644 index 00000000..9c084d38 --- /dev/null +++ b/dotnet-manual/modules/ROOT/pages/upgrade.adoc @@ -0,0 +1,167 @@ +:driver-changelog-url: https://github.com/neo4j/neo4j-dotnet-driver/wiki/5.X-Change-Log + += Upgrade from older versions + +This page contains the list of new features and breaking changes of the driver from version 4.4 to 5.x. + +For a full list of changes, see the link:{driver-changelog-url}[Driver -> Changelog]. + +[NOTE] +This page may be revised with new changes up until when the latest 5.x version is released. + +The latest driver version of the 5.x series (5.27) is compatible with Neo4j server both 4.4 and 5.x, so you can upgrade the driver before you upgrade the server. +At the same time, the driver version 4.4 is forward compatible with Neo4j server 5.x, so you could also upgrade the server before the driver; however, given that it's easier to roll back an application upgrade than a server upgrade, it's recommended to start with the driver. + +[TIP] +When upgrading the Neo4j server to a newer version, the Cypher queries in your application may also need updating. + +See link:https://neo4j.com/docs/cypher-manual/current/deprecations-additions-removals-compatibility/[Cypher -> Deprecations, additions, and compatibility]. + + +[[new-features]] +== New features + +[cols="1a,1a"] +|=== + +| +.Support for .NET 8 +[%collapsible] +==== +The driver supports .NET versions from 2 to 8, and the .NET Standard 2.0. +==== +| +.Run transactions with less knowledge of driver's internals +[%collapsible] +==== +The new method `Driver.ExecutableQuery()` is a wrapper for `Session.ExecuteRead/Write()`, but it abstracts away the result processing part and returns a list of records to the caller directly. + +For more information, see link:https://github.com/neo4j/neo4j-dotnet-driver/wiki/5.X-Change-Log#examples[`ExecutableQuery`]. +==== + +| +.Record to object mapping +[%collapsible] +==== + + +For more information, see link:https://github.com/neo4j/neo4j-dotnet-driver/wiki/5.X-Change-Log#crystal_ball-preview-feature-record-to-object-mapping[Record to Object Mapping]. +==== +| +.Re-authentication +[%collapsible] +==== +Allows for handling expiring authentication (backwards compatible) as well as session scoped authentication. + +For more information, see link:https://github.com/neo4j/neo4j-dotnet-driver/discussions/705[Re-authentication]. +==== + +| +.Mutual TLS (mTLS) as second authentication factor (2FA) +[%collapsible] +==== +Allows for configuring client side TLS certificates to authenticate against the server. + +// See link:https://github.com/neo4j/neo4j-javascript-driver/pull/1183[Mutual TLS]. +==== +| +.`BookmarkManager` support +[%collapsible] +==== +Bookmark managers make it easier to achieve causal chaining of sessions. + +See link:https://neo4j.com/docs/api/dotnet-driver/current/api/Neo4j.Driver.IBookmarkManager.html[interface `IBookmarkManager`]. +==== + +| +.Notification filtering API +[%collapsible] +==== +Filtering allows to receive only a subset of notifications from the server, and to improve performance server-side. + +For more information, see link:https://github.com/neo4j/neo4j-dotnet-driver/wiki/5.X-Change-Log#notificationconfig[NotificationConfig]. +==== +| +.GQL statuses and errors +[%collapsible] +==== +The property link:https://neo4j.com/docs/api/dotnet-driver/current/api/Neo4j.Driver.IResultSummary.GqlStatusObjects.html[`IResultSummary.GqlStatusObjects`] contains a sequence of link:https://neo4j.com/docs/api/dotnet-driver/current/api/Neo4j.Driver.IGqlStatusObject.html[`IGqlStatusObject`], holding information about the execution of the query. +This API is planned to supersede the current notifications API. + +// Interface link:https://neo4j.com/docs/api/java-driver/current/org.neo4j.driver/org/neo4j/driver/exceptions/Neo4jException.html[`Neo4jException`] exposes GQL metadata as well. + +// For more information, see xref:result-summary.adoc#_notifications[Explore the query execution summary -> Notifications]. +==== + +| +.Telemetry +[%collapsible] +==== +The driver sends anonymous API usage statistics to the server. +Use the driver configuration method `.WithTelemetryDisabled()` to opt out. + +See link:https://github.com/neo4j/neo4j-dotnet-driver/pull/735[API Telemetry]. +==== +| + +|=== + + +[[breaking-changes]] +== Breaking changes and deprecations + +Deprecated features are likely to be removed in version 6. + +[cols="1,5a,1"] +|=== +|Version |Message |Status + +|5.0 +|Baseline Java version 17. +|label:removed[Changed] + +|5.0 +|link:https://neo4j.com/docs/api/java-driver/current/org.neo4j.driver/org/neo4j/driver/GraphDatabase.html[`GraphDatabase`] -- Method `.routingDriver()` has been removed. Use `.driver()` instead. +|label:removed[] + +|5.0 +|link:https://neo4j.com/docs/api/java-driver/current/org.neo4j.driver/org/neo4j/driver/summary/ServerInfo.html[`ServerInfo`] -- Method `.version()` has been removed. +Use `.agent()`, `.protocolVersion()`, or call the link:https://neo4j.com/docs/operations-manual/current/reference/procedures/#procedure_dbms_components[`dbms.components`] Cypher procedure instead. +|label:removed[] + +|5.0 +|link:https://neo4j.com/docs/api/java-driver/current/org.neo4j.driver/org/neo4j/driver/Session.html[`Session`] -- Method `.reset()` has been removed without replacement. +|label:removed[] + +|5.0 +|link:https://neo4j.com/docs/api/java-driver/current/org.neo4j.driver/org/neo4j/driver/exceptions/Neo4jException.html[`Neo4jException`] -- Method `.neo4jErrorCode()` has been removed in favor of `.code()`. +|label:removed[] + +|5.0 +|link:https://neo4j.com/docs/api/java-driver/current/org.neo4j.driver/org/neo4j/driver/Session.html[`Session`] -- Methods `.readTransaction()` and `.writeTransaction()` are deprecated in favor of `.executeRead()` and `.executeWrite()`. The same holds for their async conterparts `.executeReadAsync()` and `.executeWriteAsync()`. +The new methods behave similarly, but the argument types are different and the new methods do not support the `.commit()`, `.rollback()`, `.close()`, and `.closed()` methods. +|label:deprecated[] + +|5.0 +|link:https://neo4j.com/docs/api/java-driver/current/org.neo4j.driver/org/neo4j/driver/Session.html[`Session`] -- Method `.lastBookmark()` is deprecated in favor of link:https://neo4j.com/docs/api/java-driver/current/org.neo4j.driver/org/neo4j/driver/Session.html#lastBookmarks()[`.lastBookmarks()`]. +|label:deprecated[] + +|5.0 +|link:https://neo4j.com/docs/api/java-driver/current/org.neo4j.driver/org/neo4j/driver/Session.html[`Session`] -- Methods `.asyncSession()` and `reactiveSession()` are deprecated. Use `Session(Class)`, with `Class` controlling what type of session you wish for. +|label:deprecated[] + +|5.0 +|link:https://neo4j.com/docs/api/java-driver/current/org.neo4j.driver/org/neo4j/driver/types/Node.html[`Node`], link:https://neo4j.com/docs/api/java-driver/current/org.neo4j.driver/org/neo4j/driver/types/Relationship.html[`Relationship`] -- Method `.id()` (`long`) is deprecated in favor of `.elementId()` (`string`). +|label:deprecated[] + +|5.0 +|link:https://neo4j.com/docs/api/java-driver/current/org.neo4j.driver/org/neo4j/driver/types/Relationship.html[`Relationship`] -- Methods `.starNodeId()` and `.endNodeId()` are deprecated in favor of `.startNodeElementId()` and `.endNodeElementId()`. Old identifiers were `long`, wereas new ElementIds are `string`. +|label:deprecated[] + +|5.0 +|Reactive sessions -- Interface link:https://neo4j.com/docs/api/java-driver/current/org.neo4j.driver/org/neo4j/driver/reactive/RxSession.html[`RxSession`] is deprecated in favor of link:https://neo4j.com/docs/api/java-driver/current/org.neo4j.driver/org/neo4j/driver/reactive/ReactiveSession.html[`ReactiveSession` (Flow)] and link:https://neo4j.com/docs/api/java-driver/current/org.neo4j.driver/org/neo4j/driver/reactivestreams/ReactiveSession.html[`ReactiveSession` (reactivestreams)]. +|label:deprecated[] + +|5.7 +|link:https://neo4j.com/docs/api/java-driver/current/org.neo4j.driver/org/neo4j/driver/summary/Notification.html[`Notification`] -- Method `.severity()` is deprecated. Use `.rawSeverityLevel()` for the raw value and `.severityLevel()` for an enumerated value. +|label:deprecated[] + +|===