From 7fd4cab1f7be484ce7d51c7f81993cac20543091 Mon Sep 17 00:00:00 2001 From: Matthew Brown Date: Sun, 18 Nov 2018 12:10:00 -0500 Subject: [PATCH] Add v3 changes --- CHANGELOG.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a5e473f4..6460ddb32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,27 @@ +Version 3.0.0 (2018-11-18) + +- Refactored a lot of classes to support an overhauled [Plugin API](https://github.com/vimeo/psalm/blob/master/docs/plugins.md) created by @weirdan +- Config `allowCoercionFromStringToClassConst` now defaults to `false`, meaning Psalm now finds a problem with this code by default: + ```php + $a = "A"; + new $a(); // InvalidStringClass emitted + $a = A::class; + new $a(); // this is fine + ``` +- Disabled PHP's cycle-detecting garbage collector (which is often run unnecessarily) +- Improved docblock assertions to allow templated types e.g + ```php + /** + * Asserts that two variables are the same. + * + * @psalm-template T + * @psalm-param T $expected + * @param mixed $actual + * @psalm-assert !=T $actual + */ + function assertNotSame($expected, $actual) : void {} + ``` + Version 2.0.0 (2018-05-11) - Uses PHP Parser 4 (and thus requires PHP 7) @@ -9,3 +33,4 @@ Version 2.0.0 (2018-05-11) ``` - removed `stopOnFirstError` `` config attribute, which hasn't been used in ages - removed `UntypedParam` issue type, which also hasn't been used (`MissingParamType` is the replacement) +