Releases: shipmonk-rnd/phpstan-rules
Releases · shipmonk-rnd/phpstan-rules
2.11.0
New features:
- forbidNotNormalizedType: deny
Child|Parent
within unions or intersections; there is nomixed|false
, justmixed
(#185) - enforceClosureParamNativeTypehint: enforce closures and array function to have typehinted parameters; configurable to omit when inferred (#192)
2.10.2
2.10.1
2.10.0
New features
- forbidArithmeticOperationOnNonNumber: deny arithmetic operations like
$a + $b
over non numbers (#180) - forbidIncrementDecrementOnNonInteger: deny
$i++
,$i--
,++$i
,--$i
with any non-integer (#179) - Add error identifiers to all rules: usable in upcoming PHPStan 1.11 (#140)
2.9.2
2.9.1
2.9.0
New features
- enforceIteratorToArrayPreserveKeys: ensure
$preserve_keys
is explicitly set (mitigate data loss / failure risk) (#154) - forbidCheckedExceptionInCallable:
Fixes
- forbidEnumInFunctionArguments: fix false negative when swapped named arguments are used (#155)
- forbidCheckedExceptionInCallable: fix edge case when two equally-named methods are set up as immediately called in different classes (#156)
2.8.0
New features
- forbidFetchOnMixed & forbidMethodCallOnMixed:
- forbidFetchOnMixed: check even class const fetches (#150)
- forbidReturnValueInYieldingMethod: avoid misuse of inaccessible value returned in yielding methods (#152)
2.7.0
New features
- forbidCheckedExceptionInCallableRule: exception tracking elevated to next level (#137) !
- disallows throwing checked exceptions in Closures and First class callables as those just return callback which can be called any time (thus cannot be tracked by phpstan)
- allows configuration of functions/methods where some callable argument is immediatelly called, then any checked exception in such callable is property tracked!
- this is a must if you use something like
EntityManager::transactional
- this is a must if you use something like
Dependencies
phpstan/phpstan
now requires at least 1.10.30 (was 1.10.0, see #137)