All Versions
52
Latest Version
Avg Release Cycle
5 days
Latest Release
787 days ago
Changelog History
Page 4
Changelog History
Page 4
-
v0.12.29 Changes
June 14, 2020๐ Improvements ๐ง
- Check existence of stub files (phpstan/[email protected])
- Tip for Discovering Symbols on all "not found" messages (phpstan/[email protected])
- ๐ Use dev-master of jetbrains/phpstorm-stubs (phpstan/[email protected]), thanks @kukulich!
๐ Bugfixes ๐
- Silencing errors related to composer.json reading (phpstan/[email protected]), #3432
- Prevent some internal errors with methods by using the current node class reflection (phpstan/[email protected])
- ๐ Fix traits issues (phpstan/[email protected]), #3415
- 0๏ธโฃ PhpFunctionFromParserNodeReflection - fix optionality of parameters with default value followed by variadic parameters (phpstan/[email protected]), #3443
- Fix argument type checking in function with func_get_args() (phpstan/[email protected]), #3448
- PhpParameterReflection - safe guards against nonexistent classes (phpstan/[email protected], phpstan/[email protected], phpstan/[email protected]), #3422, #3445
- AutoloadSourceLocator - select the correct class node based on the line (phpstan/[email protected]), #3463
- PHAR compiler - prefix global functions and classes as usual - solves polyfill problems (phpstan/[email protected]), #3431, #3419
- ๐ Fix non-abstract class contains abstract method with more than one-level parent class away (phpstan/[email protected]), #3469
- ๐ Fix unknown properties for class extending
DateInterval
andDatePeriod
and loaded with runtime reflection (phpstan/[email protected]), #3468 - Only consider class-strings when resolving dependencies (#239), thanks @rainbow-alex!
- Fix
__DIR__
in global constant (phpstan/[email protected]), #3433
-
v0.12.28 Changes
June 10, 2020- ๐ Fix issues with bounded template types (#229), #3412, #3420, thanks @hrach!
- ๐ Fix various issues with variadic parameters (phpstan/[email protected]), #3403, #3195, #2600
- ๐ Fix undefined method
Generator::throw()
(phpstan/[email protected]), #3418 - ๐ Fixed parsing description started with HTML tag - it's no longer mistaken as generics (phpstan/phpdoc-parser#47), phpstan/phpdoc-parser#41, thanks @kukulich!
- ๐ Fix
PharData::offsetGet
return type (#230), thanks @gharlan! - ๐ Fixed getting constant on
self::
with duplicate classes (phpstan/[email protected]), #3424 - Do not complain about extending class with
@final
(phpstan/[email protected]), #3427
-
v0.12.27 Changes
June 08, 2020๐ Bugfixes ๐
- Function with
yield from
wasn't recognized as generator (phpstan/[email protected]), #3407 - ๐ Fix
finfo
constructor (phpstan/[email protected]), #3404 - ๐ Fix magic constants as default parameter values (phpstan/[email protected]), #3405
- 0๏ธโฃ Parameter with a default value followed by a variadic parameter is also optional (phpstan/[email protected]), #3409
- AbstractMethodInNonAbstractClassRule - fix abstract method from trait that overshadowed method from parent class (phpstan/[email protected]), #3406
- ๐ Print deprecation notice only when running the AnalyseCommand (phpstan/[email protected])
- In case of multiple comments, use the last one as reflection getDocComment (phpstan/[email protected]), #3402
- Function with
-
v0.12.26 Changes
June 07, 2020๐ Read more about this release in a feature article on PHPStan's blog ยป
๐ฑ Major new features ๐
Static reflection
- ๐ Less configuration needed. PHPStan no longer needs autoloading configuration setup, it works out of the box in most situations. Check out Discovering Symbols guide in the documentation for more details.
- Introduced new related configuration options
scanFiles
, andscanDirectories
. Deprecatedautoload_files
, andautoload_directories
.
- Introduced new related configuration options
- It's now possible to analyse files that mix class/function declarations and side-effects.
๐ Improvements ๐ง
- ๐ ConstantStringType - mark values coming from
::class
constant explicitly, for performance reasons (phpstan/[email protected]), #3054, #3193, #1275 - Limit size of ConstantArrayType coming from literal array (phpstan/[email protected]), #3055, #1275
- Inherit PHPDocs from internal classes (phpstan/[email protected]), #1802, #1682, #2445
- Option
checkExplicitMixed
that will eventually become level 9 (phpstan/[email protected]) - ๐จ Used memory will be printed with
-v
(phpstan/[email protected]) - โก๏ธ Update nikic/php-parser to 4.5.0 (phpstan/[email protected])
- ๐ Don't merge deprecated tag with parents (#225), thanks @ossinkine!
๐ Bugfixes ๐
- ๐ Add LIBXML_VERSION & LIBXML_DOTTED_VERSION dynamic constants (#203), thanks @schlessera!
- NodeScopeResolver - fix processing args in New_ (phpstan/[email protected])
- FileReader - assert is_file() before reading (phpstan/[email protected]), #3304
- Do not analyse trait method that's shadowed in the using class (phpstan/[email protected]), #2935
- ๐ Fix yield from return type (#207), thanks @enumag!
- ๐ FileAnalyser - fixed unignorable errors that were thrown away (phpstan/[email protected])
- Generics: fix isSuperTypeOf implementations (#206), thanks @hrach!
- โก๏ธ OptimizedSingleFileSourceLocator - fix const handling (phpstan/[email protected]), #2868
- ๐ get_class extension: fix support for generics (#209), #3263, thanks @hrach!
- Always accept
isset($array[$string])
(#214), thanks @nobuf! - InstanceOf: fix uncertainty (#211), thanks @hrach!
- 0๏ธโฃ IncompatibleDefaultParameterTypeRule - fix analysed functions with reflection from different place (phpstan/[email protected]), #3349
- 0๏ธโฃ Check default property value against native type (phpstan/[email protected])
- 0๏ธโฃ Default value property type does not observe strict types - it's always strict (phpstan/phpst[email protected])
๐ฑ Function signature fixes ๐ค
- Fix
mb_convert_encoding()
(#213), thanks @marcu87! - โ Added stubs for SplDoublyLinkedList, SplQueue and SplPriorityQueue (#205), thanks @dktapps!
- PDO stub - add missing constants (phpstan/[email protected]), #2883
- ๐ Fix return values for date_parse() (#217), thanks @cxj!
- DynamicReturnType for array search call not strict (#215), thanks @VincentLanglet!
- ๐ Fix some SplFileObject signature (#220), thanks @VincentLanglet!
- ๐ Make toArray() return list in ext-ds (#221), thanks @simPod!
- ๐ Fix sapi_windows_set_ctrl_handler signature (#224), thanks @Seldaek!
- ๐ Fix signature of XSLTProcessor::transformToXml (#226), thanks @czjvic!
- ๐ Less configuration needed. PHPStan no longer needs autoloading configuration setup, it works out of the box in most situations. Check out Discovering Symbols guide in the documentation for more details.
-
v0.12.25 Changes
May 10, 2020- ๐ Fixed IncompatibleDefaultParameterTypeRule (phpstan/[email protected]), #3275, #1961
- ๐ Fixed assigning to array shapes with optional keys (phpstan/[email protected]), #3276
-
v0.12.24 Changes
May 10, 2020๐ Improvements ๐ง
- ๐ PHPDoc: Multiline generics support with trailing commas (phpstan/phpdoc-parser#44), thanks @icanhazstring!
- ๐ Merge inherited PHPDocs (#196), #2914, thanks @alexeyinkin!
- โ Add config option to exclude
@mixin
classes (#198), thanks @canvural! - โ Removed tip about
inferPrivatePropertyTypeFromConstructor
(phpstan/[email protected])
๐ Bugfixes ๐
- ๐ Fix multiple array shapes issues by changing representation of ConstantArrayType with optional keys (#197, phpstan/[email protected]), #3248, #3192, #3234, #3214, #3009, #3040, #3046, #2001, #2232
- ๐ Fix
ArrayType::castToArrayKeyType()
for template types (phpstan/[email protected]), #3266 - ๐ Fix writing arrays array value type (phpstan/[email protected], phpstan/[email protected]), #3269
๐ฑ Function signature fixes ๐ค
- Add a more precise return type for
date_get_last_errors
(#199), thanks @stof! - PDO statement stub (#200), thanks @alexeyinkin!
-
v0.12.23 Changes
May 05, 2020- ๐ Fixed parsing constant fetch with wildcard in complex PHPDoc types (phpstan/[email protected]), phpstan/phpdoc-parser#45
- โฌ๏ธ Reduce the number of unprefixed whitelisted functions in the PHAR (phpstan/[email protected]), nunomaduro/larastan#561 (comment)
- ๐ Fix
SNMP
data types & optional parameters (#194), thanks @kiler129! - โ Add
SNMP
public properties (#195), thanks @kiler129!
-
v0.12.22 Changes
May 04, 2020- ๐ Fixed "Call to a member function
resolveMixinTags()
on null"` (phpstan/[email protected]), #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/[email protected]), #3237 -
v0.12.20 Changes
May 03, 2020๐ฑ Major new features ๐
- ๐ Support literals and class constants as PHPDoc types (phpstan/[email protected]), #2904 (see example usages)
- ๐ Support for
@mixin
(phpstan/[email protected]), #2797, #1756, #466, (see PHPStan documentation)
๐ Improvements ๐ง
- Stub with
@mixin
for RecursiveIteratorIterator (phpstan/[email protected]), #1756, #466 - MissingTypehintCheck - do not report iterable template types (phpstan/[email protected])
- MissingTypehintCheck - do not report non-generic object types of generic class (phpstan/[email protected])
๐ Bugfixes ๐
- ClassReflection::getConstant() - do not crash on unknown declaring class (phpstan/[email protected]), #3062
- ๐ Fix typos (#188), thanks @pgrimaud!
- ๐ Fix issue with different PHP-Parser version in the project (phpstan/[email protected]), #3224, #3186
- ๐ Fix issue with different phpstan/phpdoc-parser in the project (phpstan/[email protected])
- ๐ Fix constant array description verbosity (phpstan/[email protected]), #3168
- More rules use the recommended type description verbosity level (phpstan/[email protected], phpstan/[email protected]), #3231
- Fixed __toString() return type combining with phpDoc type (phpstan/[email protected]), #3226
- ๐ Fixed accepting ConstantArrayType (phpstan/[email protected]), #3228, #3172
- ๐ Fixes related to accepting array shapes (phpstan/[email protected], phpstan/[email protected], phpstan/[email protected]) , #3204, #3228, #3172
๐ฑ Function signature fixes ๐ค
- โก๏ธ Update signature for
datefmt_create
(#189), thanks @othercorey!