1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Update BC notes

This commit is contained in:
Daniil Gentili 2023-07-26 10:22:42 +02:00
parent b839d8dfe0
commit 3aa9a1dc01
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7

View File

@ -1,6 +1,8 @@
# Upgrading from Psalm 5 to Psalm 6
## Changed
- The minimum PHP version was raised to PHP 8.1.17.
- [BC] Switched the internal representation of `list<T>` and `non-empty-list<T>` from the TList and TNonEmptyList classes to an unsealed list shape: the TList, TNonEmptyList and TCallableList classes were removed.
Nothing will change for users: the `list<T>` and `non-empty-list<T>` syntax will remain supported and its semantics unchanged.
Psalm 5 already deprecates the `TList`, `TNonEmptyList` and `TCallableList` classes: use `\Psalm\Type::getListAtomic`, `\Psalm\Type::getNonEmptyListAtomic` and `\Psalm\Type::getCallableListAtomic` to instantiate list atomics, or directly instantiate TKeyedArray objects with `is_list=true` where appropriate.
@ -9,6 +11,8 @@
- [BC] The `TDependentListKey` type was removed and replaced with an optional property of the `TIntRange` type.
- [BC] The return type of `Psalm\Internal\LanguageServer\ProtocolWriter#write() changed from `Amp\Promise` to `void` due to the switch to Amp v3
# Upgrading from Psalm 4 to Psalm 5
## Changed