|
1 | 1 | # Upgrading from Psalm 5 to Psalm 6
|
2 | 2 | ## Changed
|
3 | 3 |
|
| 4 | +- The minimum PHP version was raised to PHP 8.1.17. |
| 5 | + |
| 6 | +- [BC] The configuration settings `ignoreInternalFunctionFalseReturn` and `ignoreInternalFunctionNullReturn` are now defaulted to `false` |
| 7 | + |
4 | 8 | - [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.
|
5 | 9 | Nothing will change for users: the `list<T>` and `non-empty-list<T>` syntax will remain supported and its semantics unchanged.
|
6 | 10 | 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.
|
7 | 11 |
|
8 | 12 | - [BC] The only optional boolean parameter of `TKeyedArray::getGenericArrayType` was removed, and was replaced with a string parameter with a different meaning.
|
9 | 13 |
|
10 | 14 | - [BC] The `TDependentListKey` type was removed and replaced with an optional property of the `TIntRange` type.
|
| 15 | +- |
| 16 | +- [BC] `TCallableArray` and `TCallableList` removed and replaced with `TCallableKeyedArray`. |
| 17 | + |
| 18 | +- [BC] Class `Psalm\Issue\MixedInferredReturnType` was removed |
| 19 | + |
| 20 | +- [BC] Value of constant `Psalm\Type\TaintKindGroup::ALL_INPUT` changed to reflect new `TaintKind::INPUT_EXTRACT`, `TaintKind::INPUT_SLEEP` and `TaintKind::INPUT_XPATH` have been added. Accordingly, default values for `$taint` parameters of `Psalm\Codebase::addTaintSource()` and `Psalm\Codebase::addTaintSink()` have been changed as well. |
| 21 | + |
| 22 | +- [BC] Property `Config::$shepherd_host` was replaced with `Config::$shepherd_endpoint` |
| 23 | + |
| 24 | +- [BC] Methods `Codebase::getSymbolLocation()` and `Codebase::getSymbolInformation()` were replaced with `Codebase::getSymbolLocationByReference()` |
| 25 | + |
| 26 | +- [BC] Method `Psalm\Type\Atomic\TKeyedArray::getList()` was removed |
| 27 | + |
| 28 | +- [BC] Method `Psalm\Storage\FunctionLikeStorage::getSignature()` was replaced with `FunctionLikeStorage::getCompletionSignature()` |
| 29 | + |
| 30 | +- [BC] Property `Psalm\Storage\FunctionLikeStorage::$unused_docblock_params` was replaced with `FunctionLikeStorage::$unused_docblock_parameters` |
| 31 | + |
| 32 | +- [BC] Method `Plugin\Shepherd::getCurlErrorMessage()` was removed |
| 33 | + |
| 34 | +- [BC] Property `Config::$find_unused_code` changed default value from false to true |
| 35 | + |
| 36 | +- [BC] Property `Config::$find_unused_baseline_entry` changed default value from false to true |
| 37 | + |
| 38 | +- [BC] The return type of `Psalm\Internal\LanguageServer\ProtocolWriter#write() changed from `Amp\Promise` to `void` due to the switch to Amp v3 |
| 39 | + |
| 40 | +- [BC] All parameters, properties and return typehints are now strictly typed. |
| 41 | + |
| 42 | +- [BC] `strict_types` is now applied to all files of the Psalm codebase. |
| 43 | + |
| 44 | +- [BC] Properties `Psalm\Type\Atomic\TLiteralFloat::$value` and `Psalm\Type\Atomic\TLiteralInt::$value` became typed (`float` and `int` respectively) |
| 45 | + |
| 46 | +- [BC] Property `Psalm\Storage\EnumCaseStorage::$value` changed from `int|string|null` to `TLiteralInt|TLiteralString|null` |
| 47 | + |
| 48 | +- [BC] `Psalm\CodeLocation\Raw`, `Psalm\CodeLocation\ParseErrorLocation`, `Psalm\CodeLocation\DocblockTypeLocation`, `Psalm\Report\CountReport`, `Psalm\Type\Atomic\TNonEmptyArray` are now all final. |
| 49 | + |
| 50 | +- [BC] `Psalm\Config` is now final. |
| 51 | + |
| 52 | +- [BC] The return type of `Psalm\Plugin\ArgTypeInferer::infer` changed from `Union|false` to `Union|null` |
| 53 | + |
| 54 | +- [BC] The `extra_types` property and `setIntersectionTypes` method of `Psalm\Type\Atomic\TTypeAlias` were removed. |
| 55 | + |
| 56 | +- [BC] Methods `convertSeverity` and `calculateFingerprint` of `Psalm\Report\CodeClimateReport` were removed. |
11 | 57 |
|
12 | 58 | # Upgrading from Psalm 4 to Psalm 5
|
13 | 59 | ## Changed
|
|
0 commit comments