All Versions
52
Latest Version
Avg Release Cycle
5 days
Latest Release
844 days ago
Changelog History
Page 6
Changelog History
Page 6
-
v0.12.9 Changes
February 04, 2020๐ฑ Major new features ๐
๐ Support for custom type aliases (phpstan/[email protected])
๐ง Type aliases (also known as
typedef
) are a popular feature in other languages like TypeScript or C++. Using the following configuration inphpstan.neon
will allow you to reference these types in your PHPDocs:parameters: typeAliases: Name: 'string'NameResolver: 'callable(): string'NameOrResolver: 'Name|NameResolver' /\*\* \* @param NameOrResolver $arg \*/function foo($arg){// $arg is string|(callable(): string)}
The development of this feature was sponsored by @tslettebo.
๐ Several performance optimizations - you should see performance improvements between 10โ20%:
- Memoizing dependency injection container (phpstan/[email protected]), #2915
- โ add memoize cache on ClassReflection::isGeneric() (#115), thanks @bastnic!
- ๐จ Cache calls to prettyPrintExpr in MutatingScope (#122), thanks @bastnic!
๐ Improvements ๐ง
- Possibly-wrong "cannot access offset" should be reported on level 7, not level 3 (phpstan/[email protected])
- Ignored error regex with unescaped '||' is an unavoidable error (phpstan/[email protected])
๐ Bugfixes ๐
- ๐ Threaded (pthreads) objects have array syntax support without ArrayAccess (#116), thanks @dktapps!
- ๐ Fix issue with PHAR when the analysed projects also includes jetbrains/phpstorm-stubs (phpstan/[email protected]), #2938
- Invalidate
json_last_error{,_msg}()
type onjson_{en,de}code()
call (#118), thanks @cs278! - FileCacheStorage - atomic save() (phpstan/[email protected], phpstan/[email protected])
๐ฑ Function signature fixes ๐ค
- zlib_decode() may return FALSE on corrupted data (#113), thanks @dktapps!
- ๐ Fix ext-ds object diffing and merging (#95), thanks @simPod!
- ext-ds stubs improvements (#126), thanks @enumag!
- Correct Phar::decompress() return data type (#114), thanks @peter-gribanov!
- โ added generic stub for SplFixedArray (#117), thanks @dktapps!
-
v0.11.20
October 12, 2020