All Versions
85
Latest Version
Avg Release Cycle
6 days
Latest Release
13 days ago
Changelog History
Page 8
Changelog History
Page 8
-
v0.12.22 Changes
May 04, 2020- ๐ Fixed "Call to a member function
resolveMixinTags()on null"` (phpstan/phpstan-src@e625228), #3238 - ๐ Fix rewinddir() return type (#192), thanks @steevanb!
- ๐ Fixed "Call to a member function
-
v0.12.21 Changes
May 04, 2020๐ Fixed error when PHPStan 0.12.20 was installed alongside
phpmetrics/phpmetrics(phpstan/phpstan-src@a1d3990), #3237 -
v0.12.20 Changes
May 03, 2020๐ฑ Major new features ๐
- ๐ Support literals and class constants as PHPDoc types (phpstan/phpstan-src@730a902), #2904 (see example usages)
- ๐ Support for
@mixin(phpstan/phpstan-src@b02ee14), #2797, #1756, #466, (see PHPStan documentation)
๐ Improvements ๐ง
- Stub with
@mixinfor RecursiveIteratorIterator (phpstan/phpstan-src@2d1cac0), #1756, #466 - MissingTypehintCheck - do not report iterable template types (phpstan/phpstan-src@a7893a8)
- MissingTypehintCheck - do not report non-generic object types of generic class (phpstan/phpstan-src@a3fad5e)
๐ Bugfixes ๐
- ClassReflection::getConstant() - do not crash on unknown declaring class (phpstan/phpstan-src@00e3090), #3062
- ๐ Fix typos (#188), thanks @pgrimaud!
- ๐ Fix issue with different PHP-Parser version in the project (phpstan/phpstan-src@87897c2), #3224, #3186
- ๐ Fix issue with different phpstan/phpdoc-parser in the project (phpstan/phpstan-src@9a46f7f)
- ๐ Fix constant array description verbosity (phpstan/phpstan-src@1e02e9d), #3168
- More rules use the recommended type description verbosity level (phpstan/phpstan-src@d4f0907, phpstan/phpstan-src@56eadce), #3231
- Fixed __toString() return type combining with phpDoc type (phpstan/phpstan-src@db656b0), #3226
- ๐ Fixed accepting ConstantArrayType (phpstan/phpstan-src@34edb50), #3228, #3172
- ๐ Fixes related to accepting array shapes (phpstan/phpstan-src@b55208e, phpstan/phpstan-src@61cb5aa, phpstan/phpstan-src@34edb50) , #3204, #3228, #3172
๐ฑ Function signature fixes ๐ค
- โก๏ธ Update signature for
datefmt_create(#189), thanks @othercorey!
-
v0.12.19 Changes
April 19, 2020๐ฑ Major new features ๐
- PHPStan has a new website with documentation, refreshed playground, and blog! Read more about it here
- Ignoring errors in code using comments : use
@phpstan-ignore-lineor@phpstan-ignore-next-lineto ignore errors locally. Examples in the documentation, original issue #786
๐ Improvements ๐ง
- Code around
class_exists()does not complain about nonexistent classes (phpstan/phpstan-src@1605bb2), #3169, #2529, #265, #188, #146, #2359, #308 - Result cache - run full analysis after 7 days since the last full analysis (before it was 24 hours) (phpstan/phpstan-src@1b72fa1)
- ResultCacheManager - exclude XDebug from the list of loaded extensions (phpstan/phpstan-src@8ce9207) - to be able to debug result cache behaviour even if it was first saved without XDebug enabled
- ๐ Support single-quoted and double-quoted keys in array shapes (phpstan/phpstan-src@e210a6e)
- ConstantStringType - do not truncate existing class names (phpstan/phpstan-src@c5c49c1), #3145
- PHAR file is around 2 MB smaller and contains 500 less files (phpstan/phpstan-src@f31ee7c)
phpstan/phpstanintentionally conflicts withphpstan-shim- you should installphpstan/phpstanonly (#3139), thanks @szepeviktor!- ๐ Documentation URL showed with autoloading errors (phpstan/phpstan-src@836d227)
- โก๏ธ Update to nikic/php-parser 4.4.0 (phpstan/phpstan-src@2514514)
- ๐จ Print stacktrace when including bootstrap-files throws (#51), thanks @staabm!
- โ Added
is_countable()to TypeSpecifyingFunctionsDynamicReturnTypeExtension (phpstan/phpstan-src@8a894c5)
๐ Bugfixes ๐
- Solve
timecopextension issues by enabling static reflection forDateTimeclasses (phpstan/phpstan-src@d59629b), #2801 - ๐ Fixed false-negative with
checkExplicitMixedMissingReturn: true(phpstan/phpstan-src@08b4eab) - ๐ Fix issue in method return type override annotation on same class or from trait (#173), #3155, thanks @Korbeil!
- ๐ Fix overriding trait properties in PHPDocs (phpstan/phpstan-src@55a3444), #1216
- ๐ Checkstyle error formatter - always use file path, not file description (phpstan/phpstan-src@94dc8d2), #1872
- ๐ Fix SOAP extension issues (#182), #618
- Result cache gets invalidated with different
-a|--autoload-fileCLI option passed (phpstan/phpstan-src@37c29d5)
๐ฑ Function signature fixes ๐ค
strip_tags2nd parameter accepts array on PHP 7.4 (phpstan/phpstan-src@7d3123d), #3125- More precise
Phar::getSignature()signature (phpstan/phpstan-src@4b23061) - ๐ Fixed
DateInterval::$daystype (phpstan/phpstan-src@4e64f0d), #3127 - ๐ Fix return type of
IntlDateFormatter::parse()(#172), thanks @ADmad! date_create_from_format(): accepts null (#174), thanks @homersimpsons!- โก๏ธ Update ext-ds.stub (#180), thanks @enumag!
- ๐ Fix inferred union types for Ds
Map::get()andMap::remove()(#176), thanks @simPod! readlink()may return false on error (#178), thanks @dktapps!hash_file()returns false and emits E_WARNING on nonexisting file (#179), thanks @dktapps!
-
v0.12.18 Changes
March 22, 2020๐ Improvements ๐ง
Dedicated CLI option
--generate-baselinewith improved DX (phpstan/phpstan-src@f4a9d5f), #3082, #2703, #2776, #2695, #2534๐ Use it from now on instead of
--error-format baselineNeon. Here are the advantages:- The current baseline file does not have to be commented-out nor emptied when generating the new baseline. It's excluded automatically.
0๏ธโฃ 2. Output no longer has to be redirected to a file, PHPStan saves the baseline to a specified path (defaults to
phpstan-baseline.neon). - Baseline contains correct relative paths if saved to a subdirectory.
๐ Bugfixes ๐
- ๐ Fix reporting unmatched ignored error from path that wasn't analysed (phpstan/phpstan-src@c9df2f4), #3099
๐ฑ Function signature fixes ๐ค
- ๐ Fix
bcdivreturn (#167), thanks @BackEndTea! - ๐ Fix other
bc*function types (#168), thanks @BackEndTea!
- The current baseline file does not have to be commented-out nor emptied when generating the new baseline. It's excluded automatically.
0๏ธโฃ 2. Output no longer has to be redirected to a file, PHPStan saves the baseline to a specified path (defaults to
-
v0.12.17 Changes
March 17, 2020- ๐ Fixed issue with arrow function type inference and TooWideArrowFunctionReturnTypehintRule (phpstan/phpstan-src@5581928)
- ๐ Fixed issue with ArrayAccess stub (phpstan/phpstan-src@ab85120)
-
v0.12.16 Changes
March 17, 2020๐ Improvements ๐ง
- Arrow function return type inference (phpstan/phpstan-src@19482b7), #3091
- Result cache - use lazy callback for errors array in case older PHPStan gets handed newer result cache (phpstan/phpstan-src@5a032f6)
๐ Bugfixes ๐
- ๐ Fix
is_numericissues (phpstan/phpstan-src@337fbee), #3094, #3092, #3090 - ๐ Fix
property_existsissues (phpstan/phpstan-src@a44bad9), #2221 - ๐ Fixed
iterable<T>vs. empty constant array (phpstan/phpstan-src@3b64b12), #3010, #3072
-
v0.12.15 Changes
March 16, 2020๐ Improvements ๐ง
- Result cache improvements:
- Use file hashes instead of modified times (phpstan/phpstan-src@be3e4fc). It's now possible to use result cache in all CI environments!
- Result cache contains all errors, filtering through
ignoreErrorseach time (phpstan/phpstan-src@9e10b4c), #3058. This means that the "report unmatched ignore errors" behavior is now deterministic, it doesn't matter if the cache is used or not. - Do not save the cache with non-ignorable errors (phpstan/phpstan-src@762277e), #3056
- Unmatched ignored error for a specific file reported in that file (phpstan/phpstan-src@3b0c6a2)
- โก๏ธ Update BetterReflection to v4.0 (phpstan/phpstan-src@d56c832)
- ๐ Windows - use logical CPU cores count (phpstan/phpstan-src@2f649fa)
- Detect calling static method and accessing static property on a trait (phpstan/phpstan-src@67fc8f3, phpstan/phpstan-src@e089754, phpstan/phpstan-src@88d2607)
๐ Bugfixes ๐
- ๐ป AutoloadSourceLocator - do not throw exception on nonexistent file (phpstan/phpstan-src@d0a9aa1), #3066
- ๐ Fixed
assert(is_numeric($x))false positive (phpstan/phpstan-src@53a5171) phpstan/phpstan-beberlei-assert#11
๐ฑ Function signature fixes ๐ค
- โ Add missing parameter to
cropThumbnailImage(#153), thanks @Riimu! - โ Add missing parameter to
thumbnailImage(#154), #3055, #3057, #3054, thanks @Riimu! - Fix
gmp_random_seed()signature (#156), thanks @simPod! - ๐ Fix
imageconvolution()signature (#157), thanks @simPod! - ๐ Fix
iptcembed()signature (#158), thanks @simPod! - Fix
libxml_get_errors()andlibxml_get_last_error()signatures (#155), thanks @simPod! RedisCluster::__constructexpects #1 parameter to be string or null (#162), thanks @dada-amater!
- Result cache improvements:
-
v0.12.14 Changes
March 02, 2020๐ Bugfixes ๐
๐ Result cache fixes:
- ๐ Fixed issue with files being analysed multiple times when result cache is used (phpstan/phpstan-src@349bd9e), #3041, #3042
- ResultCacheManager - skip deleted files in "files to analyse" list (phpstan/phpstan-src@1100202)
- Result cache - fix handling deleted files (phpstan/phpstan-src@ffb7796, phpstan/phpstan-src@b13181e), #3043
๐ Improvements ๐ง
- Error "Ignored error pattern is expected to occur N times but occured M times" can no longer be ignored (phpstan/phpstan-src@304d472)
- Report error "Ignored error pattern is expected to occur N times but occured only M times" even if only subset of project is analysed (phpstan/phpstan-src@4f53a82)
- Report error "Ignored error pattern is expected to occur N times but occured only M times" as file-specific (phpstan/phpstan-src@eec492e)
๐ฑ Function signature fixes ๐ค
-
v0.12.13 Changes
March 02, 2020๐ Fixed problem with result cache that caused it to not be invalidated when the main project configuration file is changed. (phpstan/phpstan-src@5b764c7), #3036