| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| phpstan.phar | < 7 hours ago | 31.2 MB | |
| phpstan.phar.asc | < 7 hours ago | 833 Bytes | |
| 2.3.2 source code.tar.gz | < 7 hours ago | 29.4 MB | |
| 2.3.2 source code.zip | < 7 hours ago | 29.4 MB | |
| README.md | < 7 hours ago | 8.2 kB | |
| Totals: 5 Items | 90.1 MB | 0 | |
Bleeding edge πͺ
BackedEnum::tryFrom()andBackedEnum::from()parameter types takes enum-backing type into account (#6790), [#11421], thanks @AJenbo!
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. Learn more
Improvements π§
- Tell the user when phpstan.phar runs without the Turbo extension (#6719), thanks @SanderMuller!
- [PHP 8.6] Allow ARRAY_FILTER_USE_VALUE as the mode of
array_filter()and narrow its result (#6681), [#15372], thanks @Amoifr! - [PHP 8.6] Add a dynamic return type extension for
clamp()(#6684), [#15366], thanks @Amoifr! - Ignore unused function params prefixed with
_(#6743), [#15480], thanks @bpfoley! - Respect
@apion class constants and traits in the API rules (#6791), thanks @SanderMuller! - Update BetterReflection
- Move from 6.73.0 to 6.75.0
- ReflectionParameterWithDocComment (https://github.com/ondrejmirtes/BetterReflection/commit/d9b88f6669e25b12c1efb7b03cf3089c15e00899)
- Keep the engine-provided enum methods internal through the cache (https://github.com/ondrejmirtes/BetterReflection/commit/38ddbf7aa9b02e8768c680338a33d27371832df0)
Bugfixes π
- Preserve property narrowing in match expression results (#6708), [#15433], thanks @drewmt!
- Keep the list flag when a list shape is intersected with an array type (#6717), [#15391], thanks @janedbal!
- Keep the list flag when a list shape is intersected with an array type (#6717), [#15391], thanks @janedbal!
- Check open integer-range bounds for shift-left overflow (#6647), thanks @JanTvrdik!
- Stop the recursion when an enum case value reads itself (#6731), [#15458], thanks @SanderMuller!
- Do not map mixed nested in invariant type arguments to strict mixed (#6754), [#15487], [#14002]
- Ask Composer's autoloaders for the file instead of letting them include it (#6431), [#15184], thanks @theodorejb!
- Invalidate the OPcache entries of included files before an autoloader runs in the autoload trap (#6742), thanks @SanderMuller!
OversizedArrayBuilder: expand unpacked items into types directly instead of feeding synthesizedTypeExpritems to the type callback (#6774), [#15510], thanks @VincentLanglet!- Read PHP 8.6 thread-safe EG() and CG() through the exported offsets (#6785), [#15504]
- Resolve template types of method calls on a concrete generic static return type (#6695), [#12680], thanks @pawell67!
- Keep an explicit key of an unsealed shape as an optional never key when subtracting its offset (#6792), [#15428]
- Walk closures in array-literal arguments after their siblings (#6794), [#15432]
- Keep the analysed PHP version as the floor of a PHP_VERSION_ID < X guard (#6746), [#15425], thanks @HawkForge!
- Skip trait methods the using class overrides by the native method's declaring class (#6798)
Performance ποΈ
- Restart process when
pcovortidewaysextension is loaded (#6757), [#15407], thanks @staabm! - Implement own multi extension restart manager (#6773), thanks @AJenbo!
- Cut recomputation in loop convergence and two on-demand re-walks (#6765)
- ForeachEmptyOrObjectNarrowingHelper: Prevent unnecessary work (#6766), thanks @staabm!
- Analyser: Prevent unnecessary work (#6767), thanks @staabm!
- Free and look up less: native fast paths, shared scope services, reasonless result sharing (#6768)
- Drop the
@phpstan-impuretip and the PossiblyImpureCallExpr entries behind it (#6771) - Price op-assigns as binary ops when deriving conditional expressions (#6777), [#15498]
- Cut memory and time of analysing large array literals (#6778), [#15452]
Function signature fixes π€
- [PHP 8.6] Add CURLINFO_SIZE_DELIVERED and the size_delivered key to
curl_getinfo()return types (#6683), [#15371], thanks @Amoifr! - Fix return types of
IntlBreakIterator::create*Instance()(#6566), thanks @Enfiladeguide!
Internals π
- Verify Composer's signature instead of pinning its version and checksum (#6714)
- Resolve the Windows PHP prerelease from windows.php.net's manifests (#6713)
- Accept all data provider arguments in OverridingMethodRuleTest::testBug3403() (#6737), thanks @gnutix!
- Add regression test for [#12882] (#6748), thanks @HawkForge!
- Add regression test for [#11507] (#6747), thanks @HawkForge!
- Add regression test for [#12743] (#6789), thanks @pawell67!
- Let another program that loads the phar use PHPStan Turbo (#6720), thanks @SanderMuller!
bashunit -ais deprecated. Usebashunit assertinstead. (#6761), thanks @staabm!- Improve
pcove2e tests (#6770), thanks @staabm! - Generate the expected turbo extension version on autoloader dump (#6784)
- Update fidry/cpu-core-counter (#6620), thanks @AJenbo!
- Mark the turbo worker extension lookup and isActive() as API (#6791), thanks @SanderMuller!
- Move exitImmediately() to ForkedChild, a shadowed class in the API (#6793), thanks @SanderMuller!
- Test the non-parse exception that stops the result cache save with a rule (#6729), thanks @SanderMuller!
- Prefix with "Restart" since the "Extension" keyword is ubiquitous in the codebase (#6796), thanks @staabm!