php-parallel-soap
php-parallel-soap copied to clipboard
chore(deps): update dependency phpstan/phpstan to v2
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| phpstan/phpstan | 1.12.7 -> 2.1.8 |
Release Notes
phpstan/phpstan (phpstan/phpstan)
v2.1.8
Improvements 🔧
@readonlyproperty cannot be passed by-ref (#3850), #12676, thanks @staabm!- ClassReflection - cannot be a subclass of final-overriden class (https://github.com/phpstan/phpstan-src/commit/ed4ea0a3b5784e3e39b28cff2fc92b6445a48419)
- Deprecated
ClassReflection::isSubclassOf(string $className)in favour ofClassReflection::isSubclassOfClass(ClassReflection $class)- If you just have
string $classNameinstead ofClassReflectionand you are too lazy to get ClassReflection via ReflectionProvider, you can still useClassReflection::is(string $className)
- If you just have
Bugfixes 🐛
- This release includes fixes from PHPStan 1.12.21
- Cannot override being final for abstract classes (https://github.com/phpstan/phpstan-src/commit/9bb2ed5b90d76d416a985eeb67411999be187263)
- Fix unsetting array item triggering
unset.possiblyHookedProperty(#3855), #12695, thanks @staabm! - UnusedPrivatePropertyRule - handle virtual properties that can only be read or only written (https://github.com/phpstan/phpstan-src/commit/da737711e4017bac54ce133e0c074d094daf1969, https://github.com/phpstan/phpstan-src/commit/12185abf062ea03e51dae9226b35a6639bee0cd5), #12702
- Faster analysis with a big const array in a class (#3862), #12159, thanks @staabm!
Internals 🔍
- Fix typo false-positive (#3856), thanks @staabm!
- Reduce method calls in ExpressionTypeHolder (#3859), thanks @staabm!
- Faster
TrinaryLogic::and()(#3860), thanks @staabm! - Faster
MutatingScope::mergeWith()(#3861), thanks @staabm! - Added regression test (#3863), thanks @staabm!
v2.1.7
Improvements 🔧
- Introduce
IgnoreErrorExtension(#3783), thanks @ruudk!- Learn more: https://phpstan.org/developing-extensions/ignore-error-extensions
- Understand that
new Foo()cannot be a subclass (#3853) - Object type narrowed after
$a::classandget_class($a)cannot be a subclass (https://github.com/phpstan/phpstan-src/commit/772f2979425574897b525de95dd8a535e1882f39) - Teamcity - show rule identifier when verbose output is set (#3804), thanks @kamil-zacek!
- Class constants cannot be directly accessed on a trait (https://github.com/phpstan/phpstan-src/commit/d56d0842ca297ad6cc4ac3cf3918433ed8a80394)
- Hooked properties cannot be both final and private (#3830), #12336, thanks @staabm!
- Hooked properties cannot be both abstract and private (#3839), #12336, thanks @staabm!
- Implement FinalPrivateConstantRule (#3838), thanks @staabm!
- Readonly properties cannot be
unset()(#3827), #12421, thanks @staabm! - Hooked properties cannot be
unset()(#3842), #12336, thanks @staabm! - Handle BcMath\Number overloaded operators (#3787), #12099, thanks @schlndh!
- TypeNodeResolver - check for existing
Integerclass before resolving toint(#3848), #12660, thanks @stepo2!
Bugfixes 🐛
- This release includes fixes from PHPStan 1.12.20
- Fix
ClassLike::$namespacedName must not be accessed before initialization(https://github.com/phpstan/phpstan-src/commit/948f79d2da9e3767129b5432730fcbdec44995dc), #12627 - Fix referencing
%env%inincludes(https://github.com/phpstan/phpstan-src/commit/d4d7e116a20b179ca1502b651fd0b779e8fede6a), #12606 - Property can be written in get hook (https://github.com/phpstan/phpstan-src/commit/8de182dbdeff1bcff34cc6c0b24ed379f77bbc42), #12621
- Fix scope in enum match arm body (#3786), #12422, thanks @dmytro-dymarchuk!
- Fix integer range pow issues (#3787), #7937, #8555, thanks @schlndh!
- Fix GetNonVirtualPropertyHookReadRule on abstract property (#3845), thanks @staabm!
- VarTagTypeRuleHelper - remove namespace and uses from NameScope (https://github.com/phpstan/phpstan-src/commit/189a4cc4c3875c1e8f4c19b3ea4b7aa89e88f919)
Function signature fixes 🤖
- Change return type of
ResourceBundle::getLocales(#3840), #12579, thanks @mat-se! - Make precise
scandir()argument and return type (#3808), thanks @zonuexe! - More precise return type for
mysqli_fetch_all()(#3778), thanks @oxan!
Internals 🔍
- StrlenFunctionReturnTypeExtension: Cleanup
instanceof ConstantString(#3780), thanks @staabm! - Adjust and make space for tests for new behaviour of
new(#3852)
v2.1.6
Improvements 🔧
- This release includes improvements from PHPStan 1.12.19
- PHP 8.4: Overriding property - when overriding readable property, the property has to be readable (same for writable) (https://github.com/phpstan/phpstan-src/commit/924a7a2f647acd3c62a054c4358c13c0b1cc2886)
- ClassReflection - hasProperty cache (https://github.com/phpstan/phpstan-src/commit/73d7b88d60f4b8ebbff777060f8bc4e5e25bde12)
- Updated phpdoc-parser
- Allow multiple new lines in union and intersection declaration (https://github.com/phpstan/phpdoc-parser/pull/265), thanks @DaDeather!
- TypeParser - support comments at EOL with
//(https://github.com/phpstan/phpdoc-parser/pull/264), https://github.com/phpstan/phpdoc-parser/issues/184, thanks @shmax!
Bugfixes 🐛
- Do not report constructor unused parameter if class is an Attribute class (#3776), #7165, thanks @carlos-granados!
Internals 🔍
- Test for set-hooked property being overriden by readonly property (https://github.com/phpstan/phpstan-src/commit/d3909c7fbf169069d8099ec67a3a0cd75ce873af)
v2.1.5
Improvements 🔧
- Hooked property cannot be static (#3810), #12336, thanks @jakubtobiasz!
- Array shape from general array with single finite key (https://github.com/phpstan/phpstan-src/commit/6c45175093157f773725e70e4dd3c4f316027f67, https://github.com/phpstan/phpstan-src/commit/8a5bfb9208891055ecff4a39586d542b70546f82)
- Allows
array<value-of<MyEnum::FIRST>, X>to create an array shape where the key is backed enum case value
- Allows
- Update phpdoc-parser (https://github.com/phpstan/phpstan-src/commit/d25a815b1069174acf3efe97812617d679f30769)
- TypeParser: Allow multiple newlines and also allow multiline union and intersection types for array shapes (https://github.com/phpstan/phpdoc-parser/pull/263), https://github.com/phpstan/phpdoc-parser/issues/258, https://github.com/phpstan/phpdoc-parser/issues/183, thanks @DaDeather!
Bugfixes 🐛
- This release includes fixes from PHPStan 1.12.18
- Fix
GenericStaticTypein@phpstan-self-out, use@phpstan-self-outtype when returning$this(https://github.com/phpstan/phpstan-src/commit/dab99cba7be39fb71c70e42373ff40dca64b82ad), #12575, #12548, #8439, #8316, #8275 - Fix
@phpstan-self-outwith GenericStaticType when method is called on$this(https://github.com/phpstan/phpstan-src/commit/cf6476188b73036741e916e1e3e58972b53bb8b3) - Update BetterReflection (#3822)
- Fixed property from interface implemented by trait (https://github.com/Roave/BetterReflection/pull/1487), #12553, thanks @kukulich!
- Readonly property can override get-only property declared in interface (https://github.com/phpstan/phpstan-src/commit/0c8e9d2905371039cf453509e044d367529aa2b9), #12586
v2.1.4
Improvements 🔧
- PHP 8.4: Prevent setting a default value for a virtual property (#3812), #12336, thanks @jakubtobiasz!
Bugfixes 🐛
- PHP 8 stubs: Put built-in PHP enums in classes map instead of functions map, #12549, #12546
- https://github.com/phpstan/php-8-stubs/commit/3816597f86f912a2f9c34f70b3d9d0baf9053304
- https://github.com/phpstan/php-8-stubs/commit/97d994e9f3bc539ccabf2392a6e478cdf25a7940
- https://github.com/phpstan/phpstan-src/pull/3813
- https://github.com/phpstan/phpstan-src/commit/ad610cf827fa1025615ab8870dfb61b625ffbcf2
- Virtual property cannot be uninitialized (https://github.com/phpstan/phpstan-src/commit/b82230a48267ef3d55c568a707a5560b30ccea20), #12547
- Do not report invoking an aliased trait method by its original name as an error, #12544
- https://github.com/Roave/BetterReflection/pull/1485, thanks @kukulich!
- #3814
- https://github.com/phpstan/phpstan-src/commit/e664bed7b62e2a58d571fb631ddf47030914a2b5
Function signature fixes 🤖
v2.1.3
If you're using larastan/larastan PHPStan extension, please update to version 3.0.4 alongside PHPStan 2.1.3 for improved compatibility with the new generic static<...> type. Thank you.
This release includes fixes and improvements from PHPStan 1.12.17. Most impportantly it introduces GenericStaticType - support for static<...> (#1289), #12485, #11398, #10417, #9807, #9449, #8623, #5512
Improvements 🔧
- Look for overriden property prototype in implemented interfaces (https://github.com/phpstan/phpstan-src/commit/b3ca610fb4ae14d46da6f14d77499b35195ae40d)
- AttributeReflection for easy attributes reading (https://github.com/phpstan/phpstan-src/commit/a387fa32788fd38bc35313558f6e6a46fc2c451c), #10443, #9618
- You can now call
->getAttributes()on any thinkable reflection object, including$scope->getFunction()and you'll get a new PHPStan's AttributeReflection class: https://apiref.phpstan.org/2.1.x/PHPStan.Reflection.AttributeReflection.html - See https://github.com/phpstan/phpstan/discussions/12510
- You can now call
- Prevent declaring hooked properties as readonly (#3803), #12525, thanks @jakubtobiasz!
- Improved support for enum-string types (#3807), thanks @zonuexe!
Bugfixes 🐛
- Do not check abstract properties as uninitialized (https://github.com/phpstan/phpstan-src/commit/1cc534759f1cbb5ae05f2e3057d0f487a572aa12), #12466
- Properties might be covariant or contravariant, depending on the allowed operations on the parent (https://github.com/phpstan/phpstan-src/commit/50f8e491212197ca317b169e5c67978215ef4a0f), #12466
- Enable usage of
ReflectionClass::isSubclassOf()with invariant@template T(https://github.com/phpstan/phpstan-src/commit/4f2af3bcdfec8699598303ee7a9bf49b4938a0ba), #12473 - Fix crash on unknown trait use:
array_combine()args must have the same number of elements (https://github.com/ondrejmirtes/BetterReflection/commit/36f3291bd53f057a50613a99cbd805464723a94b), #12327
Function signature fixes 🤖
- fix ext-amqp signatures (#3793), #12469, #12461, thanks @esler!
Imagick::getConfigureOptions()returns array instead of string (#3801), thanks @blankse!
Internals 🔍
- Issue bot - skip
phpstanPlayground.configParametererrors (https://github.com/phpstan/phpstan-src/commit/71d032761916517f18932bdee69c9468d8e83c84) - Cleanup (https://github.com/phpstan/phpstan-src/commit/0b28f6001b4d308e9fbfe3cb7feff6c259f47cc2)
- Add a test covering a hooked property in a readonly class (#3809), thanks @jakubtobiasz!
v2.1.2
Improvements 🔧
- Add support for result cache meta extensions (#3765), https://github.com/phpstan/phpstan-symfony/issues/255, thanks @Wirone!
- See the docs: https://phpstan.org/developing-extensions/result-cache-meta-extensions
- Overwrite property expression type only if it's subtype of the native type (https://github.com/phpstan/phpstan-src/commit/eb0e0bcfe2e4947d06c5eb680f5cf568a688ff4a, https://github.com/phpstan/phpstan-src/commit/bed30a79f4ed17651c48c031b89b60d4ce7453b2), #12438, #12393
- Enabling constructor check for class-string variables (#3661), thanks @sayuprc!
- PHP 8.4: ReflectionClass stub with lazy object methods (https://github.com/phpstan/phpstan-src/commit/25ec5eb2db6474f95a0b9dcac1cca8210ea1a021), #12435
- RFC: https://wiki.php.net/rfc/lazy-objects
Bugfixes 🐛
- This release includes fixes from PHPStan 1.12.16
- BooleanType - implement getConstantScalarTypes (#3781), thanks @staabm!
Function signature fixes 🤖
- shell_exec - add
falseto the return type (#3730), thanks @sreichel! - Fix
samesitecookie argument precision (https://github.com/phpstan/phpstan-src/commit/a54cdb0675e23385adba9d1b2b9e643994fa20d7)
Internals 🔍
- Pass ExtendedMethodReflection into AlwaysUsedMethodExtension (https://github.com/phpstan/phpstan-src/commit/5d35811a87a85aeaac6a16824391a948c9a62335)
- Remove private method
ConstantArrayType::findTypeAndMethodNames()used only once (https://github.com/phpstan/phpstan-src/commit/30b9cd86c523b59739b609dc4e325d3275d71188)
v2.1.1
Improvements 🔧
- Introduce
getNextStatementsin UnreachableStatementNode (#3745), thanks @samsonasik! - Improve loose comparison on string types (#3756), thanks @staabm!
- Enforce safe constructor overrides with
@phpstan-consistent-constructor(#3687), #12137, thanks @herndlm! - Improve loose comparison on constant types (#3755), thanks @staabm!
- Improve loose comparison on IntegerRange containing zero (#3764), thanks @staabm!
- NodeScopeResolver: 10x faster constant array processing (#3769), thanks @staabm!
- UninitializedPropertyRule should be always reported when
checkUninitializedPropertiesis enabled (https://github.com/phpstan/phpstan-src/commit/ca86412b4c53af26c21ddb3dd01f3fe200f17b48)
Bugfixes 🐛
- This release includes fixes from PHPStan 1.12.15
- GetNonVirtualPropertyHookReadRule - do not report if get hook is not present at all (https://github.com/phpstan/phpstan-src/commit/b614f70e0154010f74e36dc9264962facac8122e)
- Support named arguments after unpacking on PHP 8.1+ (#3742), #11418, #8046, thanks @herndlm!
Internals 🔍
- Update PHP-Parser and BetterReflection (#3767)
- Simplify code thanks to PHP-Parser update
- Simplify code thanks to BetterReflection update
- PropertyHookReturnStatementsNode is invoked for short body hooks
- ShortGetPropertyHookReturnTypeRule is no longer needed
- PropertyHookNameVisitor is no longer needed, PHP-parser comes with
propertyNameattribute
v2.1.0
Read all about this release on PHPStan's blog!
Major new features 🚀
- Support for PHP 8.4's property hooks (RFC)
- Support for PHP 8.4's asymmetric visibility (RFC)
- Support for PHP 8.4's
#[Deprecated]attribute (RFC)
Bleeding edge 🔪
- UnusedFunctionParametersCheck: report precise line (#3743), thanks @janedbal!
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 🔧
- Readonly classes cannot be combined with
#[AllowDynamicProperties](#3738), #12281, thanks @staabm! - Check trait attributes (#3738), thanks @staabm!
- Named argument detection is scope-PHP version dependent (#3662), thanks @staabm!
- Improve loose comparison on integer (#3748), #12317, #12312, thanks @staabm!
- Improve loose comparison on union type (#3750), thanks @staabm!
- AccessStaticPropertiesRule - fixed blindspot about
parent::(https://github.com/phpstan/phpstan-src/commit/41837b490b12e3c71b4ca50003690f2900f74876)
Bugfixes 🐛
Internals 🔍
- Attributes rules use
In*Nodevirtual nodes for more precise Scope https://github.com/phpstan/phpstan-src/commit/90e48fa876696f221874a2766c2bf3fc1bea0ec0) - Remove duplicated PHPDoc from InternalScopeFactory classes (#3761), thanks @herndlm!
- Scope: use
Scope::getConstantinstead (#3666), thanks @staabm!
v2.0.4
This release includes improvements and fixes from PHPStan 1.12.13.
Improvements 🔧
- Added
strictRulesInstalledparameter (#3729), thanks @staabm!- Will be used for https://github.com/phpstan/phpstan-phpunit/pull/216
Bugfixes 🐛
- Skip param castable to X on non-arrays (#3694), #12146, thanks @schlndh!
- Remove incorrect CURLOPT_ACCEPT_ENCODING alias (#3703), #12171, thanks @xPaw!
- Fix
htmlspecialcharsandhtmlentitiesbeingnon-empty-stringwithout ENT_SUBSTITUTE flag (#3710), #12021, thanks @jack-worman!
Function signature fixes 🤖
- Fix
fgetcsvreturn type; never returns null (#3712), thanks @janedbal! - Fix
apcu_cache_infoandapcu_sma_infosignatures (#3726, https://github.com/phpstan/phpstan-src/commit/e7e80934023abc94a4f4bb9066ba6d6db26f6cde), thanks @vindic!
Internals 🔍
- Workaround for bug in slevomat/coding-standard TypeNameMatchesFileName (https://github.com/phpstan/phpstan-src/commit/7b4c9afd090d89d595eb113831bc4b79b45d22e2)
- Remove incorrect doc leftover from 1.x (#3732), thanks @AJenbo!
v2.0.3
This release includes improvements and fixes from PHPStan 1.12.12.
Bleeding edge 🔪
- Check that values passed to array_sum/product are castable to number (level 5) (#3658), #11883, thanks @schlndh!
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 🔧
- Update BetterReflection with https://github.com/Roave/BetterReflection/pull/1462, thanks @kukulich!
- Sanity checks around hooked properties in interfaces and classes (#3656), thanks @jakubtobiasz!
- Full support for PHP 8.4 is coming soon in PHPStan 2.1
Bugfixes 🐛
- Fix subtracting enums inside
in_array(#3646), #12083, thanks @janedbal! - Last value was not recognized when passing an associative array as an argument (#3668), #11815, thanks @sayuprc!
- Update PhpStorm stubs (#3683), #12132
Function signature fixes 🤖
- 3rd parameter of htmlentities and htmlspecialchars allows null (#3644), thanks @sreichel!
- Update curl_setopt string values and allow nullable (#3634), thanks @xPaw!* bccomp: more precise return type (#3647), thanks @claudepache!
Internals 🔍
- FunctionCallParametersCheck: Add native parameter type (#3641), thanks @staabm!
- Refactor TryRemove/Accepts for DateTime|DateTimeImmutable and Exception|Error (#3654), thanks @VincentLanglet!
- Implement
Scope::getPhpVersion()(#3642), thanks @staabm! - Non-capturing catch support detection is scope PHP-version dependent (#3663), #12114, thanks @staabm!
- Remove shortArraySyntax definition in
Printer::__construct()(#3680), thanks @samsonasik!
v2.0.2
Improvements 🔧
- More details about PHP version information in
diagnosecommand (#3609), thanks @staabm! - Utilize
phpVersion.minandmaxin VersionCompareFunctionDynamicReturnTypeExtension (#3631), thanks @staabm! - Improvements and fixes from PHPStan 1.12.11
Internals 🔍
v2.0.1
Bugfixes 🐛
- fix: check for existence of second arg in CountCharsFunctionDynamicReturnTypeExtension (#3620), thanks @canvural!
- Fix resolving tentative return type (https://github.com/phpstan/phpstan-src/commit/753fc4d98fe8929aa8816f454d2f9a836ccd7a6b)
- And fixes from PHPStan 1.12.10
v2.0.0
Check out the UPGRADING guide!.
Buy the PHPStan elephpant and T-shirts!
Major new features 🚀
- Level 10 - level 9 on steroids, treats all
mixedtypes strictly, not just explicitmixed - Array
listtype (#1751), #3311, #8185, #6243, thanks @rvanvelzen!- Lists are arrays with sequential integer keys starting at 0
- Lower memory consumption thanks to breaking up of reference cycles
- Learn more »
- In testing the memory consumption was reduced by 50–70 %.
- Enhancements in handling parameters passed by reference
- Learn more on phpstan.org
- #2941, thanks @ljmaskey!
- New rules (level 0):
- MagicConstantContextRule (#2741), #10099, thanks @staabm!
- MissingMagicSerializationMethodsRule (#1711), #7482, thanks @staabm!
- Check vprintf/vsprintf arguments against placeholder count (#3126), thanks @staabm!
- Check if required file exists (#3294), #3397, thanks @Bellangelo!
- Add
@readonlyrule that disallows default values (#1391), thanks @herndlm! - Rule about
@phpstan-consistent-constructor(#1296), thanks @canvural! - Check code in custom PHPStan extensions for runtime reflection concepts like
is_a()orclass_parents()(https://github.com/phpstan/phpstan-src/commit/c4a662ac6c3ec63f063238880b243b5399c34fcc) - Check code in custom PHPStan extensions for runtime reflection concepts like
new ReflectionMethod()(https://github.com/phpstan/phpstan-src/commit/536306611cbb5877b6565755cd07b87f9ccfdf08) - ApiInstanceofRule
- Report
instanceofof classes not covered by backward compatibility promise (https://github.com/phpstan/phpstan-src/commit/ff4d02d62a7a2e2c4d928d48d31d49246dba7139) - Report
instanceofof classes covered by backward compatibility promise but where the assumption might change (https://github.com/phpstan/phpstan-src/commit/996bc69fa977aa64f601bd82b8a0ae39be0cbeef)
- Report
- Check that PHPStan class in class constant fetch is covered by backward compatibility promise (https://github.com/phpstan/phpstan-src/commit/9e007251ce61788f6a0319a53f1de6cf801ed233)
- Previously absent type checks:
- Check existing classes in
@phpstan-self-out(https://github.com/phpstan/phpstan-src/commit/6838669976bf20232abde36ecdd52b1770fa50c9) - Check nonexistent classes in local type aliases (https://github.com/phpstan/phpstan-src/commit/2485b2e9c129e789ec3b2d7db81ca30f87c63911)
- Check unresolvable types in local type aliases (https://github.com/phpstan/phpstan-src/commit/5f7d12b2fb2809525ab0e96eeae95093204ea4d3)
- Check generics in local type aliases (https://github.com/phpstan/phpstan-src/commit/5a2d4416d94ab77a2a2e7e1bfaba4c5ed2a13c25)
- Check existing classes in
@param-out(https://github.com/phpstan/phpstan-src/commit/30c4b9e80f51af8b5f166ba3aae93d8409c9c0ea), #10260 - Check existing classes in
@param-closure-this(https://github.com/phpstan/phpstan-src/commit/2fa539a39e06bcc3155b109fd8d246703ceb176d), #10933
- Check existing classes in
- New rules (level 2):
- Validate inline PHPDoc
@vartag type against native type (https://github.com/phpstan/phpstan-src/commit/a69e3bc2f1e87f6da1e65d7935f1cc36bd5c42fe)- Set
reportWrongPhpDocTypeInVarTagtotrueto have all types validated, not just native ones - Use config option
reportAnyTypeWideningInVarTag: truefor stricter behaviour (#2840), thanks @janedbal! - IncompatibleDefaultParameterTypeRule for closures (https://github.com/phpstan/phpstan-src/commit/0264f5bc48448c7e02a23b82eef4177d0617a82f)
- Set
- Checking truthiness of
@phpstan-pureabove functions and methods - Check variance of template types in properties (#2314), thanks @jiripudil!
- Report narrowing
PHPStan\Type\Typeinterface via@var(https://github.com/phpstan/phpstan-src/commit/713b98fb107213c28e3d8c8b4b43c5f5fc47c144), https://github.com/nunomaduro/larastan/issues/1567#issuecomment-1460445389 - Previously absent type checks:
- Check
@mixinPHPDoc tag above traits (https://github.com/phpstan/phpstan-src/commit/0d0de946900adf4eb3c799b1b547567536e23147) - Check
@extends,@implements,@usefor unresolvable types (https://github.com/phpstan/phpstan-src/commit/2bb528233edb75312614166e282776f279cf2018), #11552 - Check types in
@methodtags (https://github.com/phpstan/phpstan-src/commit/5b7e474680eaf33874b7ed6a227677adcbed9ca5) - Check generics
@method@templatetags above traits (https://github.com/phpstan/phpstan-src/commit/aadbf62d3ae4517fc7a212b07130bedcef8d13ac) - Check types in
@propertytags (https://github.com/phpstan/phpstan-src/commit/55ea2ae516df22a071ab873fdd6f748a3af0520e), #10752, #9356
- Check
- Validate inline PHPDoc
- New rule (level 3):
- ArrayUnpackingRule (#856), thanks @canvural!
- New rules (level 4):
- Check too wide private property type (https://github.com/phpstan/phpstan-src/commit/7453f4f75fae3d635063589467842aae29d88b54)
- LogicalXorConstantConditionRule (https://github.com/phpstan/phpstan-src/commit/3a12724fd636b1bcf36c22b36e8f765d97150895, https://github.com/phpstan/phpstan-src/commit/3b011f6524254dad0f16840fdcfdbe7421548617), #7539
- Check that each trait is used and analysed at least once (https://github.com/phpstan/phpstan-src/commit/c4d05276fb8605d6ac20acbe1cc5df31cd6c10b0)
- Report useless return values of function calls like
var_exportwithout$return=true(#3225), #11320, thanks @staabm! - ConstantLooseComparisonRule (https://github.com/phpstan/phpstan-src/commit/6ebf2361a3c831dd105a815521889428c295dc9f)
- Check
new/function call/method call/static method call on a separate line without any side effects even without@phpstan-purePHPDoc tag on the declaration side - Always report always true conditions, except for last elseif and match arm (https://github.com/phpstan/phpstan-src/commit/565fb0f6da9cdc58e8686598015561a848693972)
- Remove "unreachable branches" rules: UnreachableIfBranchesRule, UnreachableTernaryElseBranchRule, unreachable arm error in MatchExpressionRule
- Because "always true" is always reported, these are no longer needed
- New rules (level 5):
- Check preg_quote delimiter sanity (#3252), #11338, thanks @staabm!
- Rule for
call_user_func()(#2479), thanks @staabm! - Report useless
array_filter()calls (#1077), #6840, thanks @leongersen! - Report useless
array_values()calls (#2917), thanks @kamil-zacek! - Check array functions which require stringish values (#3132), #11141, #5848, #3694, #11111, thanks @schlndh!
- Check unresolvable parameters (#1319), thanks @rvanvelzen!
- Enforce
@no-named-arguments(https://github.com/phpstan/phpstan-src/commit/74ba8c23696948f2647d880df72f375346f41010), #5968
- New rules (level 6):
- Previously absent type checks:
- Check missing types in
@phpstan-self-out(https://github.com/phpstan/phpstan-src/commit/892b319f25f04bc1b55c3d0063b607909612fe6d) - Check missing types in local type aliases (https://github.com/phpstan/phpstan-src/commit/ce7ffaf02d624a7fb9d38f8e5dffc9739f1233fc)
- Check missing types in
@mixin(https://github.com/phpstan/phpstan-src/commit/3175c81f26fd5bcb4a161b24e774921870ed2533)
- Check missing types in
- Previously absent type checks:
- New option:
polluteScopeWithBlock(defaults totrue,falseinphpstan-strict-rules) (https://github.com/phpstan/phpstan-src/commit/946cf180c960930c2c42075d0f28ff9090507272) - Support
@readonlyproperty and@immutableclass PHPDoc (#1295, #1335), #4082, thanks @herndlm! - Deprecate various
instanceof *Typein favour of new methods onTypeinterface, (https://github.com/phpstan/phpstan-src/commit/436e6d3015cbeba4645d38bc7a6a865b9c6d7c74), learn more: Why Is instanceof *Type Wrong and Getting Deprecated?
Improvements 🔧
- TableErrorFormatter - always output identifiers (https://github.com/phpstan/phpstan-src/commit/fc66c24113e9fe88c3155703224eb03768846fdd)
- Config option
exceptions.check.tooWideThrowTypemade true by default (https://github.com/phpstan/phpstan-src/commit/1b1da3e2ce3acf10dde03d9656638cda4f7389a4) - Use
implicitThrowsto only look for explicit throw points in too-wide@throwsrules when set tofalse(https://github.com/phpstan/phpstan-src/commit/a0e688c1d1e4c5e82f989b26485eb9162f47aa97) - Rules about tooWideThrowType moved to level 4 (https://github.com/phpstan/phpstan-src/commit/d7798d7f2c47f426efe91c566e6cafd5a4e2410c)
- Both .php and .neon baselines now include error identifiers (https://github.com/phpstan/phpstan-src/commit/f38addda2b151b6e41a746a37659c0bbe9e2293b, https://github.com/phpstan/phpstan-src/commit/c8b7ea9e8f51c8bbc38dfa6b04f9a0172f5cfea0)
- PHPDoc parser: Require whitespace before description with limited start tokens (https://github.com/phpstan/phpdoc-parser/pull/128), https://github.com/phpstan/phpdoc-parser/issues/125, thanks @rvanvelzen!
- Unescape strings in PHPDoc parser (https://github.com/phpstan/phpstan-src/commit/97786ed8376b478ec541ea9df1c450c1fbfe7461)
- PHPDoc parser: add config for lines in its AST & enable ignoring errors within PHPDocs (#2807), thanks @janedbal!
- InvalidPhpDocTagValueRule: include PHPDoc line number in the error message (https://github.com/phpstan/phpstan-src/commit/a04e0be832900749b5b4ba22e2de21db8bfa09a0)
- No implicit wildcard in FileExcluder (https://github.com/phpstan/phpstan-src/commit/e19e6e5f8cfa706cc30e44a17276a6bc269f995c), #10299
- Report invalid exclude paths in PHP config (https://github.com/phpstan/phpstan-src/commit/9718c14f1ffac81ba3d2bf331b4e8b4041a4d004)
- Do not generalize template types, except when in
GenericObjectType(#2818, #2821) - Non-static methods cannot be used as static callables in PHP 8+ (#2420), thanks @staabm!
- Analysis with zero files results in non-zero exit code (https://github.com/phpstan/phpstan-src/commit/46ff440648e62617df86aa74ba905ffa99897737), #9410
- Fail build when project config uses custom extensions outside of analysed paths
- This will only occur after a run that uses already present and valid result cache
- Returning plain strings as errors no longer supported, use RuleErrorBuilder
- Require identifier in custom rules (https://github.com/phpstan/phpstan-src/commit/969e6fa31d5484d42dab902703cfc6820a983cfd)
- New
RuleLevelHelper::accepts()behaviour (https://github.com/phpstan/phpstan-src/commit/941fc815db49315b8783dc466cf593e0d8a85d23), #11119, #4174 - Infer explicit mixed when instantiating generic class with unknown template types (https://github.com/phpstan/phpstan-src/commit/089d4c6fb6eb709c44123548d33990113d174b86), #6398
- Use explicit mixed for global array variables (#1411), #7082, thanks @herndlm!
- Consider implicit throw points when the only explicit one is
Throw_(https://github.com/phpstan/phpstan-src/commit/22eef6d5ab9a4afafb2305258fea273be6cc06e4), #4912 - Run missing type check on
@param-out(https://github.com/phpstan/phpstan-src/commit/56b20024386d983927c64dfa895ff026bed2798c) - Report "missing return" error closer to where the return is missing (https://github.com/phpstan/phpstan-src/commit/04f8636e6577cbcaefc944725eed74c0d7865ead)
- Report dead types even in multi-exception catch (#2399), thanks @JanTvrdik!
- MethodSignatureRule - look at abstract trait method (https://github.com/phpstan/phpstan-src/commit/5fd8cee591ce1b07daa5f98a1ddcdfc723f1b5eb)
- OverridingMethodRule - include template types in prototype declaring class description (https://github.com/phpstan/phpstan-src/commit/ca2c66cc4dff59ba44d52b82cb9e0aa3256240f3)
- Detect overriding
@finalmethod in OverridingMethodRule, #9135 - Improve error wording of the NonexistentOffset, BooleanAndConstantConditionRule, and BooleanOrConstantConditionRule (#1882), thanks @VincentLanglet!
- Stricter ++/-- operator check (#3255), thanks @schlndh!
- Check mixed in binary operator (#3231), #7538, #10440, thanks @schlndh!
- Check mixed in unary operator (#3253), thanks @schlndh!
- Stub files validation - detect duplicate classes and functions (https://github.com/phpstan/phpstan-src/commit/ddf8d5c3859c2c75c20f525a0e2ca8b99032373a, https://github.com/phpstan/phpstan-src/commit/17e4b74335e5235d7cd6708eb687a774a0eeead4)
- NoopRule - take advantage of impure points (https://github.com/phpstan/phpstan-src/commit/a6470521b65d7424f552633c1f3827704c6262c3), [#10389](https
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
- [ ] If you want to rebase/retry this PR, check this box
This PR was generated by Mend Renovate. View the repository job log.