1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 12:24:49 +01:00

Add v3 changes

This commit is contained in:
Matthew Brown 2018-11-18 12:10:00 -05:00 committed by GitHub
parent 37dedee7b6
commit 7fd4cab1f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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` `<psalm />` config attribute, which hasn't been used in ages
- removed `UntypedParam` issue type, which also hasn't been used (`MissingParamType` is the replacement)