Update phpstan packages
This MR contains the following updates:
Package | Type | Update | Change |
---|---|---|---|
phpstan/phpstan | require-dev | patch |
0.12.3 -> 0.12.14
|
phpstan/phpstan-strict-rules | require-dev | patch |
0.12.0 -> 0.12.2
|
Release Notes
phpstan/phpstan
v0.12.14
🐛
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 - Fix signature for MongoDB\Driver\ReadPreference constructor (#150), thanks @Baldinof!
- Update setcookie parameters (#152), thanks @spl1nes!
v0.12.13
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
v0.12.12
🚀
Major new features Read more about this release at Medium.com!
Parallel analysis
PHPStan runs in multiple threads! This leads to huge performance gain roughly equivalent to the number of your CPU cores! This works on all operating systems and does not require any special PHP extension. This is enabled by default.
Result cache
PHPStan now analyses changed files only (since the last analysis) and the files depending on the changed files! This is enabled by default. Read more about it here.
🔪
Bleeding edge- Rule for checking null-coalescing
??
operator issues - levels 1 and 4 (#36), thanks @leongersen! - Rule for checking additional issues like always-defined/never-defined properties, array offsets etc. in
isset()
- level 4 (phpstan/phpstan-src@25b61d9
)
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.
🔧
Improvements - Check for invalid
@phpstan-
PHPDocs (#146), thanks @BackEndTea! - Overridable static reflection class name patterns (phpstan/phpstan-src@
f4e7ce8
) - Parameters schema - structured featureToggles to disallow unsupported keys (phpstan/phpstan-src@
4f51382
) - PHAR - rename file extensions of PhpStorm stubs (phpstan/phpstan-src@
e18b3b4
)
🐛
Bugfixes - StubValidator - set analysed files to correctly analysed stubbed traits (phpstan/phpstan-src@
7cd1d70
) - DerivativeContainerFactory - fix missing parameters (phpstan/phpstan-src@
b5ed37b
)
🤖
Function signature fixes - Fix signature for
ReflectionProperty::isInitialized
(#144), thanks @leongersen! - Add
Vector::merge()
(ext-ds) (#145), thanks @enumag! -
stream_socket_enable_crypto
returns int|bool (#148), thanks @frederikbosch!
v0.12.11
🔧
Improvements - Parallel analysis improvements:
- Configurable process timeout (phpstan/phpstan-src@
ebe779c
), #2985 - Configurable maximum number of processes (threads to use) (phpstan/phpstan-src@
71bda09
) - Configurable minimum number of jobs per process (phpstan/phpstan-src@
7e28fb8
)
- Configurable process timeout (phpstan/phpstan-src@
🐛
Bugfixes - Fixed three most common reported problems with parallel analysis:
- Fixing Windows & ARM Linux "child process error" issue (phpstan/phpstan-src@
54eb9ce
), #2993 - Do not use recursive
mkdir()
- it's not thread-safe (phpstan/phpstan-src@96d8202
), #2982 - Use
php -d memory_limit=X for worker
processes (phpstan/phpstan-src@2905d86
), #2981
- Fixing Windows & ARM Linux "child process error" issue (phpstan/phpstan-src@
- Fix Hoa prefixing (phpstan/phpstan-src@
0464d0f
) - Fixed running parallel analysis via shortcut command (phpstan/phpstan-src@
0a5cd64
), #2986 - StubPhpDocProvider - cannot cache methods because of varying $positionalParameterNames (phpstan/phpstan-src@
e8bb833
), #2950
🤖
Function signature fixes - Fix return type of
fpassthru()
(#143), thanks @jlherren!
v0.12.10
🔧
Improvements - Build phpstan-src using GitHub Actions. Huge thanks to @localheinz for this one
🙂 #128 - NeonAdapter: throw more meaningful error which contains the filename (#136), thanks @clxmstaab!
🔪
Bleeding edgePHPStan runs in multiple threads! This leads to huge performance gain roughly equivalent to the number of your CPU cores! This works on all operating systems and does not require any special PHP extension.
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 - Use AutoloadSourceLocator to see existing classes in memory for static reflection (phpstan/phpstan-src@
c0cb3a6
), #2958 - Fix traits issue in parallel analysis (phpstan/phpstan-src@
cedc99f
), #2975 - {Inc,dec}rement operators did not change type of union of int ranges (#140), thanks @cs278!
- Fixed methods caching issue because of same cache key for implicit/explicit mixed (phpstan/phpstan-src@
f83240f
)
🤖
Function signature fixes -
readline()
may return FALSE (e.g. when user presses ctrl+D) (#129), thanks @dktapps! - Add support for
iterator_to_array()
(#138), thanks @Lctrs! - ext-ds: add
Vector::map()
(#139), thanks @enumag!
v0.12.9
🚀
Major new features Support for custom type aliases (phpstan/phpstan-src@3151160
)
Type aliases (also known as typedef
) are a popular feature in other languages like TypeScript or C++. Using the following configuration in phpstan.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/phpstan-src@
3eb84e2
), #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/phpstan-src@
c36df00
) - Ignored error regex with unescaped '||' is an unavoidable error (phpstan/phpstan-src@
3b71993
)
🐛
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/phpstan-src@
49314cb
), #2938 - Invalidate
json_last_error{,_msg}()
type onjson_{en,de}code()
call (#118), thanks @cs278! - FileCacheStorage - atomic save() (phpstan/phpstan-src@
65118a2
, phpstan/phpstan-src@a672c89
)
🤖
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.12.8
🔧
Improvements - Report unintended ignoreErrors regexes as warnings (phpstan/phpstan-src@
3e1ce5d
, phpstan/phpstan-src@a6223f3
) - Support
[]
in PHPDocs after generic types and array shapes, likeclass-string<Foo>[]
(phpstan/phpdoc-parser#37), phpstan/phpdoc-parser#36, thank you @iluuu1994! - Check generic type of ArrayAccess in hasOffsetValueType (phpstan/phpstan-src@
e68852a
, phpstan/phpstan-src@7e89f44
), #2858, thanks @nishimura! - OffsetAccessValueAssignmentRule - level 3 (we already have a rule for checking offset type) (phpstan/phpstan-src@
e71259c
) - Detect undefined variable when assigning property (phpstan/phpstan-src@
a613567
), #2748 - CallStaticMethodsRule - check calling abstract methods (phpstan/phpstan-src@
cefb459
), #2892
🐛
Bugfixes - Fixed resolving static on static (phpstan/phpstan-src@
5ab5450
), #2885 - OffsetAccessAssignmentRule - skip offset-inaccessible types, they're already checked by NonexistentOffsetInArrayDimFetchRule (phpstan/phpstan-src@
21d4198
) - Fix StringType::setOffsetValueType() (phpstan/phpstan-src@
6b045e7
) - NodeScopeResolver - do not change type of ArrayAccess in ArrayDimFetch assignment (phpstan/phpstan-src@
c7db447
) - Fix more treatPhpDocTypesAsCertain regressions (phpstan/phpstan-src@
a086c3c
), #2870
🤖
Function signature fixes - Update to jetbrains/phpstorm-stubs 2019.3
- Update Reflection (#107), thanks @dg!
- Updated image-signatures to account for resources (#108), thanks @EtienneBruines!
- SoapVar constructor arguments are optional and nullable (#112), thanks @eigan!
v0.12.7
- Fixed false positives introduced in 0.12.6 (phpstan/phpstan-src@
4b18031
), #2877, #2875 - Progress bar - do not output too many lines in CI environment (phpstan/phpstan-src@
117736f
), #2832, #2542
v0.12.6
🔧
Improvements - Config option
treatPhpDocTypesAsCertain
to ignore always true/false type comparisons for types coming from phpDocs (phpstan/phpstan-src@222545e
), #1254, #1926, #1950, #1969, #1991, #2070, #2431, #2538, #2854 - Improvements to how the default error report looks like on the command line (phpstan/phpstan-src@
bc9f7cc
, phpstan/phpstan-src@bfcc2e9
), #162
🔪
Bleeding edgeSee explanation in previous release notes.
-
random_int()
dynamic return type extension and parameters rule (#99), thanks @cs278! - Rule checking for indirect usage of
$this
in closures (phpstan/phpstan-src@5e8127d
)
🐛
Bugfixes - Fix mixed with subtraction not being a super type of never (#101), thanks @cs278!
- Invalidate array type info when using array_{push,pop,shift,unshift} (#101), #2851, thanks @cs278!
- Fix problem with Assert::stringNotEmpty in webmozart/assert (phpstan/phpstan-src@
4724469
) - Fixed regression from commit phpstan/phpstan-src@
9665e16
(phpstan/phpstan-src@c981d89
), #2850 - Compatibility with Composer v2 installed.json file format (phpstan/phpstan-src@
7c0fdfe
)
🤖
Function signature fixes -
curl_share_setopt()
fix $value parameter type (#97), thanks @cs278! - Corrent return types for
DOMDocument::saveHTMLFile
andDOMDocument::saveXML
(#103), thanks @Slamdunk! -
mysqli_warning::next()
will return bool (#105), thanks @voku!
v0.12.5
🔧
Improvements - Renamed stub files extensions to not pollute PhpStorm index (phpstan/phpstan-src@
b20d7b6
) - Constructor phpDocs are inherited without remapping parameter names by position (phpstan/phpstan-src@
ca37ebd
), #2819 - Allow missing return for unions with void type (phpstan/phpstan-src@
e208c05
), #2643
🐛
Bugfixes - Skip Composer loader directories where installed.json is not present (phpstan/phpstan-src@
e4fe64c
), #2818 - Magic method referencing correct type based on **get or **set (#92), #2358, thanks @JeroenVanOort!
- Expand relative
tmpDir
in phpstan.neon the same way as other paths are expanded (phpstan/phpstan-src@79333d3
), #2843 - Fix trait caching issue (phpstan/phpstan-src@
6f6ea7e
), #1601 - TypeCombinator: fix integer ranges operations (#89), thanks @hrach!
- Generics: fix ObjectType's isSuperTypeOf & accepts with TemplateType (#85), thanks @hrach!
- Fix filename that isn't a valid file issue (phpstan/phpstan-src@
d279fe5
), #2841, #2838 - Assignment must wipe out all dependant variables types (#96), #2822, thanks @cs278!
- Fixed internal error with LevelDB stub (phpstan/phpstan-src@
6bd522c
), #2823 - Fixed expression invalidation when
$i++
is involved (phpstan/phpstan-src@9665e16
), #2835
🤖
Function signature fixes - Update ext-ds.php (#90), thanks @enumag!
- Fix openssl_seal() function signature (#91), thanks @luxemate!
v0.12.4
You can now sponsor PHPStan development right here on GitHub! Does GitHub already have your
🚀
Major new features - Zero dependencies -
phpstan/phpstan
Composer package drops dependency on nikic/php-parser. This means it can be used with projects that depend on different PHP-Parser versions. - PHP extensions are no longer required to be loaded - thanks to Roave/BetterReflection and PhpStorm stubs!
- Stubs validation - files referenced in
stubFiles
config option are now subject to few select rules - Parameter name remapping when inheriting phpDocs (phpstan/phpstan-src@
ae238a1
), #671 - JUnit error formatter (#65), thanks @mavimo!
- Performance improvements by @lookyman: #75, #82, #88
🔧
Improvements - Optimized ignoring errors by baseline (phpstan/phpstan-src@
2a6901a
), #2790 - Constant cache size (phpstan/phpstan-src@
eeae2da
), #2606 - Skip invalid class names in phpDocs (phpstan/phpstan-src@
af21e23
) - Implement ext-ds generics (#60), thanks @enumag!
- Add support for FILTER_NULL_ON_FAILURE flag in filter_var (#73), thanks @BackEndTea!
- Stubs - no need to repeat inherited methods (phpstan/phpstan-src@
dc9221b
) - Exclude stubFiles from main analysis (phpstan/phpstan-src@
92df236
) - Exclude stubFiles from RobotLoader (phpstan/phpstan-src@
d24dee2
) - Improved error message when a file could not be read (phpstan/phpstan-src@
148f323
), #2787 -
list
andlist<foo>
support (#83), #2804, thanks @orklah!
🐛
Bugfixes - Stub fixes (phpstan/phpstan-src@
dfcb75d
) - Add test to avoid regression (#68), thanks @VincentLanglet!
- RawErrorFormatterTest - fix on Windows (#74), thanks @orklah!
- Fixed situation where ancestors appeared multiple times in the hierarchy (phpstan/phpstan-src@
65e578c
), #2740, thanks @orklah! - Fixed IntersectionType::toBoolean() (phpstan/phpstan-src@
2b0013f
), #2722 - PropertyReflectionFinder - fixed #2745 (phpstan/phpstan-src@
d4bfc70
), #2767 - Fix
Cannot unset offset 0 on $this
when extending SimpleXMLElement (phpstan/phpstan-src@3f20c2d
), #2752 - Fixed wrong template types resolution when inheriting phpDocs (phpstan/phpstan-src@
13fb5b1
), #2752 - ArrayType - do not degrade TemplateMixedType as key into BenevolentUnionType (phpstan/phpstan-src@
3a5cd06
) - Fixed invalidating function call to count() outside of namespaces (phpstan/phpstan-src@
81b1afa
), #2648
🤖
Function signature fixes - Fix exif_read_data function signature (#57), thanks @norkunas!
- Fix XMLWriter::openURI signature (phpstan/phpstan-src@
3c4b0a7
) - Update signature of RedisCluster::__construct (#62), thanks @codegain!
- 2nd argument of ini_{set,alter}() only accepts a string (#63), thanks @cs278!
- Fixed mysqli_stmt::bind_result() (phpstan/phpstan-src@
63ec225
), #2553 - Fix spelling error in method name (#72), thanks @ericpoe!
- Update Redis extension signature map (#80), thanks @demijohn!
- functionMap: fix return type of SQLite3Result::fetchArray() (#86), thanks @dktapps!
Renovate configuration
-
If you want to rebase/retry this MR, check this box
This MR has been generated by WhiteSource Renovate. View repository job log here.