All Versions
52
Latest Version
Avg Release Cycle
5 days
Latest Release
910 days ago
Changelog History
Page 1
Changelog History
Page 1
-
v0.12.59 Changes
December 07, 2020๐ Bugfixes ๐
- Ignore NeverType in subtractable types (#389), thanks @jlherren!
- Try fixing CpuCoreCounter problem (phpstan/[email protected]), #4147
- is_a(): specify class-string types if allow_string: true (#392), #4124, thanks @jiripudil!
- CallableType: accept [class-string, constant-string] array as callable (#394), #2880, thanks @jiripudil!
- ๐ is_a(): support class-string in parameter $class (#393), #2799, thanks @jiripudil!
- ๐ Support "null" and "false" pseudotypes in native unions (#400), #4198, #4179, thanks @jiripudil!
๐ฑ Function signature fixes ๐ค
-
v0.12.58 Changes
November 29, 2020๐ Improvements ๐ง
- ๐ง Configurable result cache path (phpstan/[email protected]), #3755
- StubValidator - analyse only project stub files (phpstan/[email protected])
- โก๏ธ Update phpstorm-stubs (phpstan/[email protected])
- ๐ ResultCacheManager - remove
parametersSchema
before comparing config files (phpstan/[email protected])
๐ฑ Bleeding edge ๐ช
๐ If you want to see the shape of things to come and adopt bleeding edge features early, you can include this config file in your project's
phpstan.neon
:includes: - vendor/phpstan/phpstan/conf/bleedingEdge.neon
Of course, there are no backwards compatibility guarantees when you include this file. The behaviour and reported errors can change in minor versions with this file included.
๐ Bugfixes ๐
- Concat between numeric and empty string produces numeric string (#378), thanks @jlherren!
- ๐ Fix array dim fetches with
treatPhpDocTypesAsCertain: false
(phpstan/[email protected]), #4099 - ๐ Fixed expression assignment throwing away native expression types for
treatPhpDocTypesAsCertain: false
(phpstan/[email protected]), #3760 - โช Result cache - fix result cache save and restore with Neon with statements (phpstan/[email protected]), #4125
- ๐ Catch more BetterReflection errors (phpstan/[email protected]), #4135
- ๐ Fixed SimpleXMLElement cast to boolean (phpstan/[email protected]), #3965, #2997
- hrtime(true) returns benevolent union type (phpstan/[email protected]), #3650
๐ฑ Function signature fixes ๐ค
- ๐ Fix Reflection::getStaticProperties()'s return type (#377), thanks @jlherren!
mysqli_get_client_info()
argument is optional (phpstan/[email protected]), #4013- ๐ Fixed
RedisArray::__construct()
(phpstan/[email protected]), #3688 - ๐ Fix
DateTime
/DateTimeImmutable::getLastErrors()
return types (#380), thanks @b1rdex! - Use dynamic return type extension for
mb_str_split
(#379), thanks @VincentLanglet! XMLWriter::*Ns()
can accept null in$prefix
(#383), thanks @spaze!- ๐ Support for numeric string in bc math (#382), thanks @aszenz!
- ๐ Fix socket_select's signature https://www.php.net/manual/en/function.socket-select.php (#385), thanks @szepeviktor!
- ๐ Fix imageColorAllocate* and imageColorAt return type declarations https://www.php.net/manual/en/function.imagecolorallocate.php#refsect1-function.imagecolorallocate-returnvalues (#386), thanks @mundschenk-at!
-
v0.12.57 Changes
November 21, 2020๐ Improvements ๐ง
- ๐ New Docker image hosted in GitHub Container Registry and based on PHP 8. See the homepage and the documentation.
- ๐ Support for attributes (PHP 8)
- Result cache does not get invalidated when only ignoreErrors changes (phpstan/[email protected]) - this makes working with the baseline instantaneous!
- โช Result cache - do not restore and save when only files (not directories) are passed as analysed paths (phpstan/[email protected])
- FunctionCallParametersCheck - more precise lines (phpstan/[email protected])
๐ Bugfixes ๐
- ๐จ Refactored levels that report named arguments errors (phpstan/[email protected])
- TeamcityErrorFormatter - attempt to fix notFileSpecificErrors that do not appear (phpstan/[email protected])
- ๐ Fix FloatType equaling ConstantFloatType (#375), thanks @jlherren!
- ๐ Fixed wrong closure typehint (phpstan/[email protected]), #4097
- PhpFunctionReflection - do not return nonexistent filename (phpstan/[email protected], phpstan/[email protected], phpstan/[email protected]), #4089
- โก๏ธ Updated BetterReflection (phpstan/[email protected]), #4095
- Turns out static method can be called on a trait (phpstan/[email protected]), #4107
๐ฑ Function signature fixes ๐ค
-
v0.12.56 Changes
November 16, 2020๐ Improvements ๐ง
- ๐ Support for named arguments (PHP 8)
- FunctionCallParametersCheck - argument errors reported on more precise lines (phpstan/[email protected])
๐ Bugfixes ๐
- ๐ Fix internal error (phpstan/[email protected]), #4087
- Parallel analysis - fix UTF-8 error (phpstan/[email protected]), #3956
-
v0.12.55 Changes
November 14, 2020๐ Improvements ๐ง
- Support for match expression (PHP 8)
- ๐ Support for nullsafe operator (PHP 8)
- ๐ Check for no longer supported
(unset)
cast (PHP 8) (phpstan/[email protected]) current()
dynamic return type extension (phpstan/[email protected]), #2539- OffsetAccessWithoutDimForReadingRule cannot be ignored (phpstan/[email protected])
- โก๏ธ Updated
jetbrains/phpstorm-stubs
(phpstan/[email protected]) - Detect parameter type widening violation before PHP 7.2 (phpstan/[email protected])
- ๐ Improve comparison operators (#372), thanks @jlherren!
- Check also AssignRef in all assignment rules (phpstan/[email protected])
- โ Running with
--debug -vvv
will show how much memory each file consumes (phpstan/[email protected])
๐ Bugfixes ๐
- ๐ Fix
range()
with string arguments (phpstan/[email protected]), #2378 - Assertions done on a variable used in a closure should be transferred inside the closure (phpstan/[email protected])
- More precise spaceship operator type (phpstan/[email protected])
- ๐ Merging scopes in root scope - create maybe-existent variables from the other scope too (phpstan/[email protected]), #4070
- Int and float toString() produces numeric-string (#371), #4005, thanks @b1rdex!
- ๐ Fix unreachable statement after switch with conditional break (phpstan/[email protected]), #4076
- Fix detecting unused constructor parameters when func_get_args() is involved (phpstan/[email protected]), #1917
- Support ARRAY_FILTER_USE_KEY and ARRAY_FILTER_USE_BOTH (phpstan/[email protected]), #3132
- ๐ Fixed compatibility with PHP 7.1 (phpstan/[email protected])
- Parallel analysis - listen to error on Encoder (phpstan/[email protected], phpstan/[email protected], phpstan/[email protected])
- ๐ Fix IntegerRangeType overflowing (#372), #4010, thanks @jlherren!
- โ Add missing pre/post inc/dec type specifiers in conditions (#372), thanks @jlherren!
- Map phpDoc parameter names for native methods because stub parameter names might be different (phpstan/[email protected]), #4084
๐ฑ Function signature fixes ๐ค
- Add "base64" as key for
stream_get_meta_data
(#369), thanks @SvenRtbg! - PDOStatement::getColumnMeta can return false (phpstan/[email protected])
- ceil() never returns int (#373), thanks @jlherren!
-
v0.12.54 Changes
November 05, 2020๐ Improvements ๐ง
- ๐ Support for promoted properties (PHP 8)
- ๐ Support for
@return never
as an alternative toearlyTerminatingMethodCalls
andearlyTerminatingFunctionCalls
(#366, phpstan/[email protected]), thanks @b1rdex! PHPStan\dumpType
dummy function and rule for debugging inferred types (phpstan/[email protected])- โก๏ธ Updated
jetbrains/phpstorm-stubs
(phpstan/[email protected]), #4029
๐ Bugfixes ๐
- ๐ Fix
ConstantArrayType::toBoolean()
(phpstan/[email protected]), #4043 - ๐ Fix
array_slice()
with mixed argument (#367), thanks @jlherren! - Native return type
void
can be combined with PHPDoc typenever
(phpstan/[email protected]), #4006 ConstantArrayType::generalize()
should generalize item type too (phpstan/[email protected]), #4056- Result cache - export interface methods (phpstan/[email protected]), #4054
-
v0.12.53 Changes
November 01, 2020๐ Improvements ๐ง
- ๐ Support for
Stringable
(PHP 8) (phpstan/[email protected]) - โก๏ธ Updated
jetbrains/phpstorm-stubs
(phpstan/[email protected]) - โ Add support for
no-return
andnever-returns
types as aliases ofnever
(#361), thanks @b1rdex! - Read
#[Pure]
from methods in phpstorm-stubs (phpstan/[email protected]) - Detect unused constructor calls (phpstan/[email protected])
๐ Bugfixes ๐
- Sort
IntegerRangeType
numerically (#357), thanks @jlherren! - ๐ Fix grammar error (#356), thanks @ericpoe!
- ๐ MethodSignatureRule - fixed error message (phpstan/[email protected]), #4006, #4003
- General array after offset assign is non empty (phpstan/[email protected]), #4016, #3752
- ๐ Fixed
ConstantArrayType::isSuperTypeOf()
(phpstan/[email protected]) - Non-ArrayAccess object might be offset-accessible (phpstan/[email protected], #363), #3836, thanks @b1rdex!
- PHPStan Pro - use Cloudflare DNS (phpstan/[email protected])
- Do not inherit constructor PHPDocs from internal classes (phpstan/[email protected]), #4011, #4030
- ๐ Fix checking overriden method signature when method-level generics are involved (phpstan/[email protected]), #4017, #4023
- CallToStaticMethodStamentWithoutSideEffectsRule - skip
parent::__construct()
(phpstan/[email protected]) - ๐ PhpStormStubsSourceStubber AstLocator - use PHP 8 parser (phpstan/[email protected])
๐ฑ Function signature fixes ๐ค
- ๐ Support for
-
v0.12.52 Changes
October 25, 2020๐ Improvements ๐ง
- ๐ Detect more unused function calls (generate
functionMetadata.php
from PhpStorm stubs'#[Pure]
attribute) (phpstan/[email protected])
๐ Bugfixes ๐
- Scope - any variable after
extract()
call might exist (phpstan/[email protected]), #3990 - ๐ Fix false positive with
isset()
andempty()
(phpstan/[email protected]), #3991 - ๐ Fixed
assert()
bug (phpstan/[email protected]), #3994 array_shift()
should invalidate rememberedcount()
call (phpstan/[email protected]), #3993- Do not complain about non-covariant return type in
count()
method in implementations of Countable interface (MethodSignatureRule - read PHPDoc types instead of combined types) (phpstan/[email protected]), #3997 - ๐ Fix literal array with empty item outside of left-side assign (phpstan/[email protected]), #4000
- ๐ Detect more unused function calls (generate
-
v0.12.51 Changes
October 23, 2020๐ Improvements ๐ง
- Implement
positive-int
andnegative-int
types (phpstan/[email protected]), #3790 - Certain functions are known to only ever return 0 or positive integer (phpstan/[email protected], phpstan/[email protected])
- Implement property name as an expression in AccessPropertiesRule and AccessStaticPropertiesRule (#348)
- โก๏ธ Update PhpStorm stubs (phpstan/[email protected]), #3975
- ๐ PhpStorm stubs - parse them with PHP 8 parser (phpstan/[email protected], phpstan/[email protected])
- ๐ Old-style constructors are no longer supported on PHP 8 (phpstan/[email protected])
๐ Bugfixes ๐
- ๐ Fixed casting CurlMultiHandle to
(int)
(phpstan/[email protected]) - โก๏ธ Update PHP 8 stubs - fix
assert_options()
(phpstan/[email protected]), #3944 - ๐ Fix resolving type of
isset($arr['key'])
(#346), thanks @jlherren! - ๐ Fix
isset()
with multiple arguments (#345), thanks @jlherren! - 0๏ธโฃ Create only the default
tmpDir
directory (phpstan/[email protected]) - PropertyDescriptor - correctly resolve from reflection whether a property is static or not (phpstan/[email protected])
- ๐ Fix scale parameter check in bc math return type extension (#353), #3978, thanks @jaroslavlibal!
- ๐ Fixed variable certainty of a nonexistent variable after
isset()
(phpstan/[email protected]), #3985 isset()
- fix false positive (phpstan/[email protected]), #2816- ๐ Fix truncating invalid UTF-8 strings (#354), thanks @jfreixa!
- ๐ Fix
array_slice
with non-empty-array (phpstan/[email protected])
๐ฑ Function signature fixes ๐ค
explode()
returns a non-empty array in certain scenarios (phpstan/[email protected]), #3596, #3961setlocale()
can take as argument string|null (#351), thanks @peter-gribanov!
- Implement
-
v0.12.50 Changes
October 16, 2020๐ Improvements ๐ง
- ๐ Support for
throw
expression (PHP 8.0) (phpstan/[email protected]) - ๐ Support
::class
on expression (PHP 8.0) (phpstan/[email protected]) - ๐ Support
non-empty-array
andnon-empty-list
(phpstan/[email protected])
๐ Bugfixes ๐
- ๐ Fix an intersection with NeverType (#341), thanks @jlherren!
- ๐ Fix GenericClassStringType being equal when it's not (#341), thanks @jlherren!
- ๐ Fix intersection of iterable and array (#341), thanks @jlherren!
- ๐ Fixed nested ternary (phpstan/[email protected]), #3942
- ๐ Fixed casting CurlHandle to
(int)
(phpstan/[email protected]), #3939 - ๐ Fixed SimpleXMLElement bug (phpstan/[email protected]), #3958
- ๐ Fix SimpleXMLElement iterable type on PHP 8 (phpstan/[email protected]), #3947
- ๐ Report real file with a parse error (phpstan/[email protected]), #3943
๐ฑ Function signature fixes ๐ค
- ๐ Support for