Skip to content

Commit

Permalink
[docs] Document the headers rework
Browse files Browse the repository at this point in the history
  • Loading branch information
joffrey-bion committed Sep 18, 2024
1 parent d2fdcc2 commit 24616e8
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/migration-guides.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
Here are some details about how to migrate from one major version to another.

## From 7.x to 8.x

### Headers rework

The headers types have been vastly reworked, for multiple reasons described in issue
[#518](https://github.com/joffrey-bion/krossbow/issues/518).

The following source-incompatible changes have been made:

* The `StompHeaders` interface no longer extends `MutableMap`, and is no longer mutable.
* for modifications, use the `copy` functions of different header types to create a copy of the instance with some changes.
* for access, use the typed properties for standard headers, and the `get(headerName)` function to get custom headers.
* for access as a map (e.g. iteration), please open an issue describing your use case.
The experimental `asMap()` function can be used in the meantime.
* Header types were converted from `data class` to `interface`.
* Header constructors with typed parameters were replaced with factory functions of the same name.
These functions take the mandatory headers as arguments, and the optional headers can be set via a lambda parameter.
* Header constructors that used to take a `rawHeaders: StompHeaders` argument were removed.
If you need this functionality, please open an issue describing your use case.

## From 6.x to 7.x

### Web socket subprotocol negotiation
Expand Down

0 comments on commit 24616e8

Please sign in to comment.