All Versions
52
Latest Version
Avg Release Cycle
5 days
Latest Release
1601 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/phpstan-src@0e32301), #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/phpstan-src@518b20d), #3755
- StubValidator - analyse only project stub files (phpstan/phpstan-src@f956c6d)
- โก๏ธ Update phpstorm-stubs (phpstan/phpstan-src@fb95fab)
- ๐ ResultCacheManager - remove
parametersSchema
before comparing config files (phpstan/phpstan-src@2a87b3a)
๐ฑ 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/phpstan-src@a9ec174), #4099 - ๐ Fixed expression assignment throwing away native expression types for
treatPhpDocTypesAsCertain: false
(phpstan/phpstan-src@64da8f9), #3760 - โช Result cache - fix result cache save and restore with Neon with statements (phpstan/phpstan-src@602c718), #4125
- ๐ Catch more BetterReflection errors (phpstan/phpstan-src@3e8ec5f), #4135
- ๐ Fixed SimpleXMLElement cast to boolean (phpstan/phpstan-src@83c1e0b), #3965, #2997
- hrtime(true) returns benevolent union type (phpstan/phpstan-src@2a39e5a), #3650
๐ฑ Function signature fixes ๐ค
- ๐ Fix Reflection::getStaticProperties()'s return type (#377), thanks @jlherren!
mysqli_get_client_info()
argument is optional (phpstan/phpstan-src@b01c6c9), #4013- ๐ Fixed
RedisArray::__construct()
(phpstan/phpstan-src@3e95603), #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/phpstan-src@ef84d94) - 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/phpstan-src@dd11e25)
- FunctionCallParametersCheck - more precise lines (phpstan/phpstan-src@ba119bc)
๐ Bugfixes ๐
- ๐จ Refactored levels that report named arguments errors (phpstan/phpstan-src@1e42295)
- TeamcityErrorFormatter - attempt to fix notFileSpecificErrors that do not appear (phpstan/phpstan-src@8ec0a96)
- ๐ Fix FloatType equaling ConstantFloatType (#375), thanks @jlherren!
- ๐ Fixed wrong closure typehint (phpstan/phpstan-src@50aff6d), #4097
- PhpFunctionReflection - do not return nonexistent filename (phpstan/phpstan-src@e496d71, phpstan/phpstan-src@f000222, phpstan/phpstan-src@3ea4fc3), #4089
- โก๏ธ Updated BetterReflection (phpstan/phpstan-src@73a0c1b), #4095
- Turns out static method can be called on a trait (phpstan/phpstan-src@86c11d3), #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/phpstan-src@c507ae2)
๐ Bugfixes ๐
- ๐ Fix internal error (phpstan/phpstan-src@63de0e8), #4087
- Parallel analysis - fix UTF-8 error (phpstan/phpstan-src@0524fb5), #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/phpstan-src@56471f6) current()
dynamic return type extension (phpstan/phpstan-src@dafba25), #2539- OffsetAccessWithoutDimForReadingRule cannot be ignored (phpstan/phpstan-src@450592c)
- โก๏ธ Updated
jetbrains/phpstorm-stubs
(phpstan/phpstan-src@fa8a365) - Detect parameter type widening violation before PHP 7.2 (phpstan/phpstan-src@456f443)
- ๐ Improve comparison operators (#372), thanks @jlherren!
- Check also AssignRef in all assignment rules (phpstan/phpstan-src@1639213)
- โ Running with
--debug -vvv
will show how much memory each file consumes (phpstan/phpstan-src@29f8938)
๐ Bugfixes ๐
- ๐ Fix
range()
with string arguments (phpstan/phpstan-src@67a905a), #2378 - Assertions done on a variable used in a closure should be transferred inside the closure (phpstan/phpstan-src@36dac3d)
- More precise spaceship operator type (phpstan/phpstan-src@1a4f8b3)
- ๐ Merging scopes in root scope - create maybe-existent variables from the other scope too (phpstan/phpstan-src@310cb83), #4070
- Int and float toString() produces numeric-string (#371), #4005, thanks @b1rdex!
- ๐ Fix unreachable statement after switch with conditional break (phpstan/phpstan-src@46c39e8), #4076
- Fix detecting unused constructor parameters when func_get_args() is involved (phpstan/phpstan-src@37c6bbc), #1917
- Support ARRAY_FILTER_USE_KEY and ARRAY_FILTER_USE_BOTH (phpstan/phpstan-src@138cabd), #3132
- ๐ Fixed compatibility with PHP 7.1 (phpstan/phpstan-src@98b5509)
- Parallel analysis - listen to error on Encoder (phpstan/phpstan-src@1fd761d, phpstan/phpstan-src@95101a0, phpstan/phpstan-src@14928bf)
- ๐ 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/phpstan-src@9afec60), #4084
๐ฑ Function signature fixes ๐ค
- Add "base64" as key for
stream_get_meta_data
(#369), thanks @SvenRtbg! - PDOStatement::getColumnMeta can return false (phpstan/phpstan-src@9d5f053)
- 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/phpstan-src@cc91080), thanks @b1rdex! PHPStan\dumpType
dummy function and rule for debugging inferred types (phpstan/phpstan-src@c24c8ef)- โก๏ธ Updated
jetbrains/phpstorm-stubs
(phpstan/phpstan-src@51aaf57), #4029
๐ Bugfixes ๐
- ๐ Fix
ConstantArrayType::toBoolean()
(phpstan/phpstan-src@d22abbe), #4043 - ๐ Fix
array_slice()
with mixed argument (#367), thanks @jlherren! - Native return type
void
can be combined with PHPDoc typenever
(phpstan/phpstan-src@1857c6c), #4006 ConstantArrayType::generalize()
should generalize item type too (phpstan/phpstan-src@fc052c4), #4056- Result cache - export interface methods (phpstan/phpstan-src@e36e1cd), #4054
-
v0.12.53 Changes
November 01, 2020๐ Improvements ๐ง
- ๐ Support for
Stringable
(PHP 8) (phpstan/phpstan-src@3143833) - โก๏ธ Updated
jetbrains/phpstorm-stubs
(phpstan/phpstan-src@3714a73) - โ Add support for
no-return
andnever-returns
types as aliases ofnever
(#361), thanks @b1rdex! - Read
#[Pure]
from methods in phpstorm-stubs (phpstan/phpstan-src@500b160) - Detect unused constructor calls (phpstan/phpstan-src@21c50e3)
๐ Bugfixes ๐
- Sort
IntegerRangeType
numerically (#357), thanks @jlherren! - ๐ Fix grammar error (#356), thanks @ericpoe!
- ๐ MethodSignatureRule - fixed error message (phpstan/phpstan-src@38fe693), #4006, #4003
- General array after offset assign is non empty (phpstan/phpstan-src@d67dae3), #4016, #3752
- ๐ Fixed
ConstantArrayType::isSuperTypeOf()
(phpstan/phpstan-src@1753f2f) - Non-ArrayAccess object might be offset-accessible (phpstan/phpstan-src@b55656f, #363), #3836, thanks @b1rdex!
- PHPStan Pro - use Cloudflare DNS (phpstan/phpstan-src@fb55535)
- Do not inherit constructor PHPDocs from internal classes (phpstan/phpstan-src@3a57521), #4011, #4030
- ๐ Fix checking overriden method signature when method-level generics are involved (phpstan/phpstan-src@1c2b727), #4017, #4023
- CallToStaticMethodStamentWithoutSideEffectsRule - skip
parent::__construct()
(phpstan/phpstan-src@c8e4f8b) - ๐ PhpStormStubsSourceStubber AstLocator - use PHP 8 parser (phpstan/phpstan-src@3810804)
๐ฑ 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/phpstan-src@2817690)
๐ Bugfixes ๐
- Scope - any variable after
extract()
call might exist (phpstan/phpstan-src@d3e7b9c), #3990 - ๐ Fix false positive with
isset()
andempty()
(phpstan/phpstan-src@05942ca), #3991 - ๐ Fixed
assert()
bug (phpstan/phpstan-src@ca044c4), #3994 array_shift()
should invalidate rememberedcount()
call (phpstan/phpstan-src@26d29ec), #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/phpstan-src@fb8d3ef), #3997 - ๐ Fix literal array with empty item outside of left-side assign (phpstan/phpstan-src@a97477b), #4000
- ๐ Detect more unused function calls (generate
-
v0.12.51 Changes
October 23, 2020๐ Improvements ๐ง
- Implement
positive-int
andnegative-int
types (phpstan/phpstan-src@2fc6a5f), #3790 - Certain functions are known to only ever return 0 or positive integer (phpstan/phpstan-src@6784a1c, phpstan/phpstan-src@a78a2e7)
- Implement property name as an expression in AccessPropertiesRule and AccessStaticPropertiesRule (#348)
- โก๏ธ Update PhpStorm stubs (phpstan/phpstan-src@4a886db), #3975
- ๐ PhpStorm stubs - parse them with PHP 8 parser (phpstan/phpstan-src@59c0423, phpstan/phpstan-src@0f8a61a)
- ๐ Old-style constructors are no longer supported on PHP 8 (phpstan/phpstan-src@aa502ff)
๐ Bugfixes ๐
- ๐ Fixed casting CurlMultiHandle to
(int)
(phpstan/phpstan-src@7219419) - โก๏ธ Update PHP 8 stubs - fix
assert_options()
(phpstan/phpstan-src@2164616), #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/phpstan-src@5be8b80) - PropertyDescriptor - correctly resolve from reflection whether a property is static or not (phpstan/phpstan-src@fadb439)
- ๐ Fix scale parameter check in bc math return type extension (#353), #3978, thanks @jaroslavlibal!
- ๐ Fixed variable certainty of a nonexistent variable after
isset()
(phpstan/phpstan-src@3b21093), #3985 isset()
- fix false positive (phpstan/phpstan-src@fcb78d9), #2816- ๐ Fix truncating invalid UTF-8 strings (#354), thanks @jfreixa!
- ๐ Fix
array_slice
with non-empty-array (phpstan/phpstan-src@273b3ce)
๐ฑ Function signature fixes ๐ค
explode()
returns a non-empty array in certain scenarios (phpstan/phpstan-src@0069107), #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/phpstan-src@5f2d42c) - ๐ Support
::class
on expression (PHP 8.0) (phpstan/phpstan-src@cec1be7) - ๐ Support
non-empty-array
andnon-empty-list
(phpstan/phpstan-src@a4038b2)
๐ 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/phpstan-src@ea43e81), #3942
- ๐ Fixed casting CurlHandle to
(int)
(phpstan/phpstan-src@842b468), #3939 - ๐ Fixed SimpleXMLElement bug (phpstan/phpstan-src@af5921e), #3958
- ๐ Fix SimpleXMLElement iterable type on PHP 8 (phpstan/phpstan-src@befb743), #3947
- ๐ Report real file with a parse error (phpstan/phpstan-src@8113f38), #3943
๐ฑ Function signature fixes ๐ค
- ๐ Support for