Update PHPStan packages
This MR contains the following updates:
Package | Type | Update | Change |
---|---|---|---|
phpstan/phpstan | require-dev | minor |
1.9.14 -> 1.10.15
|
phpstan/phpstan-symfony | require-dev | minor |
1.2.20 -> 1.3.1
|
Release Notes
phpstan/phpstan
v1.10.15
🔪
Bleeding edge - InvalidPhpDocTagValueRule: include PHPDoc line number in the error message (https://github.com/phpstan/phpstan-src/commit/a04e0be832900749b5b4ba22e2de21db8bfa09a0)
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 phpdoc-parser to 1.20.4
- Changelog
- Notable changes:
- CallableTypeNode - support object shape in return type
- CallableTypeNode - support
$this
in return type - CallableTypeNode - support ConstTypeNode in return type
- Implement IniGetReturnTypeExtension (#2362), #3063, thanks @staabm!
- PHPStan\Node\ClassMethod is covered by BC promise (https://github.com/phpstan/phpstan-src/commit/1036d199c8ef24c62ca5026c911c0af6ef6d9058), #9249
- Enforce magic
__serialize()
and__unserialize()
return types (#2372), thanks @staabm! - Report
?->
call on always-null (https://github.com/phpstan/phpstan-src/commit/74d1c9a1ca1cd6199a8771444e9bc4d6b7737f46), #9284
🐛
Bugfixes - Fix object shapes with interfaces and final classes (https://github.com/phpstan/phpstan-src/commit/f199980c3c436636cae59502da178c4c804efb38)
- Fix
ConstantFloatType::toPhpDocNode()
for whole numbers ending with 0 (#2355), thanks @rvanvelzen! - Add type for ini_get() 'default_socket_timeout' and 'precision' (#2365), thanks @staabm!
- Fix Docker detection (https://github.com/phpstan/phpstan-src/commit/8d0c032d19cd6ca9bb8462f8cf74362b2b4a6ae9)
- strval accepts Stringable (https://github.com/phpstan/phpstan-src/commit/3a4cd59e46e72fe26119ab356e62a288367643d4), #9283
-
CURLOPT_HTTPHEADER
should not accept a dictionary (#2369), #9263, thanks @staabm!
🤖
Function signature fixes -
intval()
andfloatval()
should handle non-scalar values (#2351), thanks @dravnic! - More precise
strval()
family function signatures (#2354), thanks @dravnic!
🔍
Internals - Allow referencing StringAlwaysAcceptingObjectWithToStringType in functionMap (https://github.com/phpstan/phpstan-src/commit/670d04d817134929a48e9313525a328f648fa422)
v1.10.14
🔪
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. Learn more
🔧
Improvements - Update phpdoc-parser
- Add extension to add additional constructors through code (#2348), thanks @raalderink!
🐛
Bugfixes - Fix
BackedEnum::tryFrom
not being nullable (#2302), thanks @schlndh! - Specify
never
forarray_combine
with different number of elements (#2303), thanks @herndlm! - ConstantFloatType - fix
equals()
(https://github.com/phpstan/phpstan-src/commit/e01ce6865f9498340d60c696ee569080f2f62b09) - Fix INF logic (https://github.com/phpstan/phpstan-src/commit/fc673ee9966b7fce1a7ec8f1ca40952a3772a3b1)
- Prevent false-positive in
get_parent_class()
on interfaces (#2336), #4302, thanks @staabm!
🤖
Function signature fixes
🔍
Internals -
Type::toPhpDocNode()
(https://github.com/phpstan/phpstan-src/commit/8633125f66aadce22938adc3a32b8463596513d0) - Remove
symfony/polyfill-php72
(https://github.com/phpstan/phpstan-src/commit/8ff8fb0bfb1c9511600f5e14fcf6063e1654b2d5)
v1.10.13
- Fix internal error: FilterVarArrayDynamicReturnTypeExtension for
mixed
input (#2338), #9178, thanks @zonuexe!
v1.10.12
🚀
Major new features - Object shapes, #2923
- Documentation
- Twitter thread about implementing it
- phpdoc-parser implementation
🔪
Bleeding edge - Stricter function signature map (https://github.com/phpstan/phpstan-src/commit/06b746d8e72cc0843707896ec161559bb6a81137, #2163), #7239, thanks @staabm!
- Specify
Imagick
parameter types (#2334), thanks @zonuexe!
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 - Improve
filter_*
array handling, supportFILTER_REQUIRE_ARRAY
(#2318), thanks @herndlm! - Asymmetric
@property
types (#2327, #2328, #2329), #9062, thanks @jtojnar! - Specify return type for
filter_input()
(#2010), #6261, thanks @herndlm! - Improve return type precision of
filter_input
with invalid first args (#2333), thanks @herndlm! - Allow
@property
and@method
to override above the same class (https://github.com/phpstan/phpstan-src/commit/3467a215cf4fdb0a7ba39edd47f986cb9910902f) - Add
FilterVarArrayDynamicReturnTypeExtension
(#2257), thanks @zonuexe!
🐛
Bugfixes - Fix usage of
TypeSpecifierContext::truthy()
(#2230), #3013, #7686, thanks @VincentLanglet! - Parent template type should respect child class bound when unspecified (https://github.com/phpstan/phpstan-src/commit/1017dc7bc7c997e07c488088a199427790c5ef5a), https://github.com/phpstan/phpstan-doctrine/issues/333
- Fix bug with match expression and
treatPhpDocTypesAsCertain
(#2250), #8937, thanks @VincentLanglet! - Generics: fix position variance of readonly-by-phpdoc properties (#2337), #9153, thanks @jiripudil!
- PHPStan Pro - show errors from CollectedData (https://github.com/phpstan/phpstan-src/commit/b85a9613be49b917133a97ff20d0d94a0aa07876)
- Fix methods in IntersectionTypePropertyReflection (https://github.com/phpstan/phpstan-src/commit/d1c4c6d014eea52895b4c0655777134e1cd3c7ce)
🤖
Function signature fixes
🔍
Internals - Switch to
cweagans/composer-patches
(#2307), thanks @herndlm! - WritingToReadOnlyPropertiesRule - hook on better node (https://github.com/phpstan/phpstan-src/commit/bddf57352f07f3a5007afb26cc44445c6344d35b)
- Validate usages of
assert*
functions in TypeInferenceTestCase (#2326), thanks @staabm!
v1.10.11
🔪
Bleeding edge - Fix position variance of static method parameters (#2313), thanks @jiripudil!
- Check variance of template types in properties (#2314), thanks @jiripudil!
- OverridingMethodRule - include template types in prototype declaring class description (https://github.com/phpstan/phpstan-src/commit/ca2c66cc4dff59ba44d52b82cb9e0aa3256240f3)
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 - Helper PHPDoc type:
template-type
(callingType::getTemplateType()
method) (https://github.com/phpstan/phpstan-src/commit/b6d0c87db5c418d5ea4a026790f6e4c1df3da184), https://github.com/phpstan/phpstan/discussions/9053 - Some useful advanced PHPDoc types (https://github.com/phpstan/phpstan-src/commit/387ebd5059990086444e993cc0fb40e167cc71c6)
enum-string
empty-scalar
non-empty-scalar
non-empty-literal-string
pure-callable
closed-resource
non-empty-mixed
callable-array
- RuleErrorBuilder - support multiple tips nicely (https://github.com/phpstan/phpstan-src/commit/e06c529ffc64f84c11ef0e6cd0a9725c6862666c)
- StrictComparisonOfDifferentTypesRule - tip for always true comparison between enums (https://github.com/phpstan/phpstan-src/commit/a327965dc58ade31d5ab457435139a283a63f3aa, https://github.com/phpstan/phpstan-src/commit/9850ea7e9833e8929497c3df113dd92c056f54fa)
- Handle invalid type aliases better (https://github.com/phpstan/phpstan-src/commit/fc5515a516c6573c01ca786decfb5a509771ab36), #9077, #8473
🐛
Bugfixes - Be smarter about new array keys after assignment (https://github.com/phpstan/phpstan-src/commit/6c32371f7c7b8aa330bf7c78b680bc4347f8ce37), #9131, #8900, #8222
- Fix
StaticType::isSuperTypeOf()
for subtypes ofObjectType
(https://github.com/phpstan/phpstan-src/commit/b439fed7b19fc11287237c85bc50baf73fae0158), #9142 -
TypehintHelper::decideTypeFromReflection()
should accept correct ancestor's ClassReflection, not just class name (https://github.com/phpstan/phpstan-src/commit/297a9feca4c5df2e809bc7393959694566d23344)
🤖
Function signature fixes
v1.10.10
🔧
Improvements - JsonErrorFormatter - include identifiers (https://github.com/phpstan/phpstan-src/commit/6910be2321136601b75112a8c1e3d107bf3a25c7)
- AccessPropertiesRule - tip with article link (https://github.com/phpstan/phpstan-src/commit/e6e2d1a63417909c50900a10fbedf0a426f5ac21)
- Note about
--xdebug
when Xdebug is enabled (https://github.com/phpstan/phpstan-src/commit/1d4ede19f6f08d6a07216cfe8536dc7dec2f4001)
🐛
Bugfixes - IssetCheck - respect
treatPhpDocTypesAsCertain
for variables (https://github.com/phpstan/phpstan-src/commit/5b7a1153dd76b2f771b13dcd28ef4f7b832e2b84), #9126 - IssetCheck - respect
treatPhpDocTypesAsCertain
in more places (https://github.com/phpstan/phpstan-src/commit/49d2aa6fd0205da790f251d7ee42fb0fc0676888) - Do not check template type variance in constructor (#2311), thanks @jiripudil!
🤖
Function signature fixes
v1.10.9
🔧
Improvements - Test cases - make some methods static because of PHPUnit 10 dataProviders (https://github.com/phpstan/phpstan-src/commit/ea2670a086f0f699b92dd6b2535504771054498c), https://github.com/phpstan/phpstan/discussions/9070
- StrictComparisonOfDifferentTypesRule - tip about
treatPhpDocTypesAsCertain
(https://github.com/phpstan/phpstan-src/commit/40400aeb2830f1e4f29748f5a20989fa34d4d02f) - ConstantLooseComparisonRule - respect
treatPhpDocTypesAsCertain
(https://github.com/phpstan/phpstan-src/commit/72472dd441e445ff6bf4b01b53dfee3613cfea78) - ConstantLooseComparisonRule - tip about
treatPhpDocTypesAsCertain
(https://github.com/phpstan/phpstan-src/commit/d892c34e9b2865e6e1908b08b2a84823f2ec54cf) - PHPStan Pro - configurable DNS servers (https://github.com/phpstan/phpstan-src/commit/f3711a2598c6dd8c9e1ca2f1990736db4de61ee3), #9106
- Attempt unloading Xdebug before showing warnings (#2299), thanks @AJenbo!
🤖
Function signature fixes - Fix
pg_pconnect
function signature (#2300), thanks @dravnic! - Fix incorrect type for
NumberFormatter::parseCurrency
(#2309), thanks @rovansteen!
v1.10.8
🔧
Improvements - Detect large
.php
baseline file in analysed paths and warn about possible PHPStan slowdown (https://github.com/phpstan/phpstan-src/commit/d6d9ef72d73c0030e0a309aa5b9d56a3c8b0c4b1)
🐛
Bugfixes - Don't report unknown class in inline
@var
afterclass_exists()
(#2292), #9055, thanks @staabm! - Improve
Ds\Map::get()
@throws
inference (#2297), #9066, thanks @simPod! - Support of unofficial specifiers in
sprintf
/printf
(#2301), #9072, #2342, thanks @kukulich!
🔍
Internals - Rich PHPDocs for extension interfaces (https://github.com/phpstan/phpstan-src/commit/23d29aba97762c39f5d6df58461a2545bb270d9b, https://github.com/phpstan/phpstan-src/commit/f67a3729dc263c63cc302f431cdd7a232b543fba, https://github.com/phpstan/phpstan-src/commit/cbfb23d8420420324396bffd9e1c096553c933b3)
- Browse at: https://apiref.phpstan.org/
v1.10.7
🔧
Improvements - Backed enums - dynamic return type extension for
from()
andtryFrom()
(https://github.com/phpstan/phpstan-src/commit/edcaaba2ad5bc1bbf4d770a5998fe6944eb3a234)
🤖
Function signature fixes - Fix
XMLReader::XML
return type (https://github.com/phpstan/phpstan-src/commit/195cb7bf839c51113244995e4a17ff699c75c962)
🔍
Internals - Compiled PHAR - commit and sign as @phpstan-bot (https://github.com/phpstan/phpstan-src/commit/e73523da355f45487cd47ca87cfd334a7327bfd1)
v1.10.6
🔪
Bleeding edge - Report narrowing
PHPStan\Type\Type
interface via@var
(https://github.com/phpstan/phpstan-src/commit/713b98fb107213c28e3d8c8b4b43c5f5fc47c144), https://github.com/nunomaduro/larastan/issues/1567#issuecomment-1460445389 - Check invalid PHPDocs in previously unchecked statement types (https://github.com/phpstan/phpstan-src/commit/9780d352f3264aac09ac7954f691de1877db8e01)
- InvalidPHPStanDocTagRule in StubValidator (https://github.com/phpstan/phpstan-src/commit/9c2552b7e744926d1a74c1ba8fd32c64079eed61)
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 - InvalidPHPStanDocTagRule - add forgotten handling of ClassConst (https://github.com/phpstan/phpstan-src/commit/d943d58c219b457403dc536f855d9d6f32e2280f)
🐛
Bugfixes - Fix false positive with
array_combine()
on PHP 8+ (#2276), #9011, thanks @staabm! - Ignore Nop nodes in NodeScopeResolver when creating UnreachableStatementNode (#2279), #8966, thanks @herndlm!
- Fix wrong positives about templates in conditional types (#2241), #8609, #7310, #8408, thanks @KmeCnin!
v1.10.5
🔧
Improvements - Check local type aliases above traits (https://github.com/phpstan/phpstan-src/commit/4654c1651f1ec9c1799774bffd2c641828d43d4a)
🐛
Bugfixes - Fix type aliases in method-level template types (https://github.com/phpstan/phpstan-src/commit/c926144c2e1c1b25639857a3c1cb12bbe541162c), #9008
- Fix type aliases in traits (https://github.com/phpstan/phpstan-src/commit/60021c2857841155fcd54f3783d8ed86a647a684), #5091
- Fix interface accepting a Closure (https://github.com/phpstan/phpstan-src/commit/0dbe3ab24dd40d6e291413aa64db5eca9f0f6d68), #9006
- Process enum case expression (https://github.com/phpstan/phpstan-src/commit/f64b27cf833cbf84e21293f5891e69c970652698), #9005
- Fixed missing processing of UseUse and GroupUse (https://github.com/phpstan/phpstan-src/commit/b79751221e67794e62d7e7cfc89db5687c04c527)
v1.10.4
🔧
Improvements - Remove 3 leading spaces in PHAR (#2254), #8952, thanks @ruudk!
- Add missing newline at the end of the file (#2254), thanks @ruudk!
- RuleError interfaces are part of BC promise (https://github.com/phpstan/phpstan-src/commit/aed93193ae90d353661e10b0eabcf0528422231f)
- Update nikic/php-parser (https://github.com/phpstan/phpstan-src/commit/dda95b4fa735585369cb74429ab5ea8d37f82179)
- Update BetterReflection (#2274), #8889
🐛
Bugfixes - Fix bug with
array_column
(#2244), #8917, thanks @VincentLanglet! - Improve
filter_var()
handling of a couple of simple scalars and null (#2262), thanks @herndlm! - Fix
value-of
for multiple enums (https://github.com/phpstan/phpstan-src/commit/3adc91d78b8108afc883dc5097656b6de0f38769), #8983 - Fix
->value
on unions of enums (https://github.com/phpstan/phpstan-src/commit/05b85bad07a2c6628799fcb4a2939be7beab80cd), #9000
🤖
Function signature fixes - Fix return type of
Ds\Sequence::copy()
(#1954), thanks @MidnightDesign! - Fix
password_hash()
return type (#2260), #5978, thanks @VincentLanglet!
v1.10.3
🔧
Improvements - Add support for
@not-deprecated
annotation (#2255), https://github.com/phpstan/phpstan/discussions/7422, thanks @stof!
🐛
Bugfixes - Fix arithmetic operations with BenevolentUnionType (https://github.com/phpstan/phpstan-src/commit/f882eff78af3647b28a4663f467ae78346e89db3), #8938
- Fix native return type of
array_chunk()
(https://github.com/phpstan/phpstan-src/commit/e4a6d2026ef1218d2629e55991972058b80fef73), #8956 - Support for property fetch in initializers (https://github.com/phpstan/phpstan-src/commit/53c643de1366f185c9f21ff12908a7b1458b9ed0), #8957
- ObjectType - fix enum property with subtracted type (https://github.com/phpstan/phpstan-src/commit/eb00fd21ccc834c13624c32b6db0c1700ab32a8a), #8828, #8486
v1.10.2
🔧
Improvements - Allow generating baseline in .php format (https://github.com/phpstan/phpstan-src/commit/8260032bc6b3641ec80a4b11526869b53d250ac6), #8870
- See documentation: https://phpstan.org/user-guide/baseline#php-baseline-format-instead-of-neon
🤖
Function signature fixes - Instances of
object
returned bydb2_*()
functions are always instances ofstdClass
(#2249), thanks @phansys!
v1.10.1
🐛
Bugfixes - Fix match expression and
treatPhpDocTypesAsCertain: false
(#2248), #8932, thanks @VincentLanglet! - Fix calling dynamic return type extensions on nullable types (https://github.com/phpstan/phpstan-src/commit/7331bc51411943dba14880434df6d7c85a744dcf)
- Fix edge case with
in_array
and enums (https://github.com/phpstan/phpstan-src/commit/7d6f0f6a4c8eac67cfb2d810681043f9863f04a7)
v1.10.0
Read the article about this release: PHPStan 1.10 Comes With a Lie Detector
🚀
Major new features - "Always true" conditions in the last
elseif
branch and last match expression arm are not reported by default (#2105), #8042, #8485, #7721, #4242, #8240, thanks @staabm!- Set
reportAlwaysTrueInLastCondition
totrue
to have them reported again - Note: "Always true" conditions in PHPStan 1.x are reported with Bleeding Edge enabled, or with phpstan-strict-rules installed, or with relevant options enabled separately. In PHPStan 2.0 they're going to be always reported, except for the last
elseif
branch and last match expression arm.
- Set
- Deprecate various
instanceof *Type
in favour of new methods onType
interface, (https://github.com/phpstan/phpstan-src/commit/436e6d3015cbeba4645d38bc7a6a865b9c6d7c74), learn more: Why Is instanceof *Type Wrong and Getting Deprecated?- Deprecations in your custom rules and extensions will be reported in Bleeding Edge, or with
phpstan-deprecation-rules
installed
- Deprecations in your custom rules and extensions will be reported in Bleeding Edge, or with
- Explain why type isn't accepted by another type in less intuitive scenarios, #3281, #6787
- Some examples: https://phpstan.org/r/61cfbb65-1a04-471a-a5c5-d61f0540ae1d, https://phpstan.org/r/839f1fd2-d66a-4356-af21-3fe171d83fd1, https://phpstan.org/r/2bea7ece-6b26-4dc9-a1cf-d2f0e7fbb9d6, https://phpstan.org/r/fed1c275-46d0-434f-b9c4-3212f4df6d1c, https://phpstan.org/r/24a23b74-af27-4443-986c-04af61427d50
🔪
Bleeding edge - Validate inline PHPDoc
@var
tag type against native type (https://github.com/phpstan/phpstan-src/commit/a69e3bc2f1e87f6da1e65d7935f1cc36bd5c42fe)- Set
reportWrongPhpDocTypeInVarTag
totrue
to have all types validated, not just native ones
- Set
- Always report always true conditions, except for last elseif and match arm (#2105), thanks @staabm!
- Disable "unreachable branches" rules: UnreachableIfBranchesRule, UnreachableTernaryElseBranchRule, unreachable arm error in MatchExpressionRule
- Because "always true" is always reported, these are no longer needed
- IncompatibleDefaultParameterTypeRule for closures (https://github.com/phpstan/phpstan-src/commit/0264f5bc48448c7e02a23b82eef4177d0617a82f)
- New
RuleLevelHelper::accepts()
behaviour (https://github.com/phpstan/phpstan-src/commit/941fc815db49315b8783dc466cf593e0d8a85d23) - Check template type variance in
@param-out
(https://github.com/phpstan/phpstan-src/commit/7ceb19d3b42cf4632d10c2babb0fc5a21b6c8352), https://github.com/phpstan/phpstan/issues/8880#issuecomment-1426971473
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 - Implement identical/equal comparisons on EnumCaseObjectType (#2105), thanks @staabm!
- MatchExpressionRule - use ConstantConditionRuleHelper to remove some duplicate errors (https://github.com/phpstan/phpstan-src/commit/7380ed0e48fea16eab205996ab911f765548e0ff)
- Improvements of
MutatingScope::getNativeType()
(#1943), #4689, #7578, #6260 - Allow default values for allow-private-mutation properties (#2178), #8701, thanks @zonuexe!
- Support
treatPhpDocTypesAsCertain
in NumberComparisonOperatorsConstantConditionRule (https://github.com/phpstan/phpstan-src/commit/649eb70ba3c5a2321c5305522b46b49ba3dacc77), #6776, #7075 - JsonErrorFormatter - strip console-specific characters from tip (https://github.com/phpstan/phpstan-src/commit/6419da745ae460b481e8172e2b5191c898eab43d)
-
InClassMethodNode
- addgetClassReflection()
(https://github.com/phpstan/phpstan-src/commit/c4ee0b8449df6bcd7e9c4500c7055657515253d8) - PhpFunctionFromParserNodeReflection and PhpMethodFromParserNodeReflection are part of BC promise (https://github.com/phpstan/phpstan-src/commit/810717968171bed5a7250ea09de03c5ef7f60ee9)
- AttributesCheck - detect deprecated attributes (https://github.com/phpstan/phpstan-src/commit/e46b0b4aaf34a199f50b8dd589832b52e74baf85)
- Introduce
Type::getTemplateType()
and deprecateGenericTypeVariableResolver
(https://github.com/phpstan/phpstan-src/commit/b73a8aacc1636e1f512ad3850a7126c280b67036, https://github.com/phpstan/phpstan-src/commit/01b4d4e9b89a7f454c77a6f4d4d525ae8bf4ee53) - Implement PHP version dependent loose const comparison (#2220, #2225), thanks @staabm!
🐛
Bugfixes - Fix LateResolvableTypeTrait (https://github.com/phpstan/phpstan-src/commit/bc2828669fbc93ca81a6b442c528fc56acbb79a1)
- StrCaseFunctionsReturnTypeExtension - do not throw ShouldNotHappenException, it might happen if mbstring is not enabled and the polyfill is not implemented (https://github.com/phpstan/phpstan-src/commit/c015e47f40bdc72c19ce92457dd00d194f365da3), #8925
🤖
Function signature fixes - Fix
PDO::sqliteCreateFunction
(#2208), #8802, thanks @VincentLanglet! - Use "numeric-string" type for some MySQLi functions (#2223, #2224), thanks @phansys!
- Update param and return type for
db2_autocommit()
(#2239), thanks @phansys!
🔍
Internals - Deprecate
TypeUtils::getDirectClassNames()
andinstanceof TypeWithClassName
, useType::getObjectClassNames()
instead (#1924), thanks @herndlm! - Remove dead code in UnionType (#2194), thanks @staabm!
- Use
isSuperTypeOf()
instead ofaccepts()
in the right places (https://github.com/phpstan/phpstan-src/commit/ddb9dc5adc7a09dbe2f60d5cab60e5fd51a928fd) - Modernized
IncompatibleDefaultParameterTypeRule
(https://github.com/phpstan/phpstan-src/commit/a79ad038367ebd4c2722daaeaafd9aab24a421df) - InClassMethodNode always contains PhpMethodFromParserNodeReflection (https://github.com/phpstan/phpstan-src/commit/01a789713cd43ffd96c695dbcf85545459523c7e)
- InFunctionNode always contains PhpFunctionFromParserNodeReflection (https://github.com/phpstan/phpstan-src/commit/e864b24a854ac053b10d9ec95d3c12802a4e326a)
- Modernized InClassMethodNode rules (https://github.com/phpstan/phpstan-src/commit/c3da6a911a411652c27e905ee969980119a37d5d)
- Modernized InFunctionNode rules (https://github.com/phpstan/phpstan-src/commit/b736ddcecdb6506e17ebf227654755a4ac5b82e5)
- Introduce
Type::acceptsWithReason()
(https://github.com/phpstan/phpstan-src/commit/b763bd9631f7adfdf3feb8a111511b86a87389aa), #3281 - Fix invalid phpdocs missing null (#2213), thanks @janedbal!
- NodeScopeResolver::earlyTerminatingMethodNames remove useless default (#2214), #8830, thanks @janedbal!
- Skip
testEditorUrlWithRelativePath()
test on PhpStorm console (#2229), thanks @staabm! - VarianceCheck - accept only ParametersAcceptorWithPhpDocs (https://github.com/phpstan/phpstan-src/commit/7da13f7de02c06922a3550e7f037627f8bbc6a55)
- Remove duplicate method definition from ConstantType interface (https://github.com/phpstan/phpstan-src/commit/61fa3a14e22355a013e9d240d55c0d9a5f6609a6)
-
Type::isEnum()
(https://github.com/phpstan/phpstan-src/commit/93113cbca608a0c03073e322d58cd3d82597163f) -
Type::getObjectClassReflections()
(https://github.com/phpstan/phpstan-src/commit/4c7046ef681d05e81f5ad866230582a0009272b9)
v1.9.18
🔧
Improvements - ErrorsConsoleStyle - do not wrap URLs (https://github.com/phpstan/phpstan-src/commit/f843feed8b0211713ec60bda1b08f9407e0fa0b7)
- List shapes (#2202), #8789, thanks @zonuexe!
🐛
Bugfixes - IterableType - fix getReferencedTemplateTypes (https://github.com/phpstan/phpstan-src/commit/07e32cdbe49f660891d558b243beed9121ef4679, https://github.com/phpstan/phpstan-src/commit/cf2107dd5cb03c38df9d3e16e96ec3e09ddfe2ec), #8880
- Revert "Fixed '$this instanceof X will always be false' in traits" (https://github.com/phpstan/phpstan-src/commit/1f608dc6a560f4a5accc854add8e005da0e7ceea), #8879, #8888
🔍
Internals
v1.9.17
🐛
Bugfixes - Fix one more false positive about unused private property (https://github.com/phpstan/phpstan-src/commit/6d61d3dd33342fe2b09a57ca17e9fc90b33f92d2), #8850
- Update phpdoc-parser to 1.16.1
- Fix
list{}
parsing (https://github.com/phpstan/phpdoc-parser/pull/177), thanks @zonuexe!
- Fix
- Fix intersection of two identical
ThisType
(https://github.com/phpstan/phpstan-src/commit/d3e3292d73ee32862b4b1321740c80d319a683ad), #8857
v1.9.16
- Fix false positive about unused class elements when the class uses a trait (https://github.com/phpstan/phpstan-src/commit/fbdf0da9b7075ce4d4933d6289dcfd89266556f0)
v1.9.15
🔧
Improvements -
ignoreErrors
entries for same message and path are summed together (https://github.com/phpstan/phpstan-src/commit/fa70062df084110dfc3fc9ce9be867dc143eb482) - Make PHP 8 deprecation "required params following optional ones" ignorable (#2218), thanks @Wirone!
🐛
Bugfixes - Templates in DatePeriod can be covariant (https://github.com/phpstan/phpstan-src/commit/ce65e053730ac70160b4a041e72496baa20c3c31), #8772
- Prevent crash for Attribute class polyfill without constructor (https://github.com/phpstan/phpstan-src/commit/9334ff395d56fb36d9c32092c67d602a2ac4b2df), #8769
- Fix big constant arrays not recognized as oversized (#2199), #8775, thanks @staabm!
- Fix
filter_var()
with float input and FILTER_VALIDATE_INT (#2206), #8797, thanks @herndlm! - Fixed
method_exists()
onclass-string&literal-string
(#2193), #8752, thanks @staabm! - Fix various
filter_var()
range edge cases (#2207), #8776, thanks @herndlm! - Fixed
$this instanceof X will always be false
in traits (#2045), #3632, thanks @staabm! - Update PhpStorm stubs (#2226), #8713
🤖
Function signature fixes - Adjust
forward_static_call_array
for named arguments on PHP 8 (https://github.com/phpstan/phpstan-src/commit/fb5c1119b779ab66ae841c9b110246a147c2ab69), https://github.com/phpstan/phpstan/discussions/8761
🔍
Internals
phpstan/phpstan-symfony
v1.3.1
- 7e78605 - Fix AbstractType stub
v1.3.0
- f45b9ce - Support specifying type of data_class in forms
v1.2.25
- 1da7bf4 - Add stubs for security factories
v1.2.24
- db81b18 - Use stubfile extension for PasswordUpgraderInterface
- e0823d3 - Update PHPCS
- d7425ae - Update metcalfc/changelog-generator action to v4.1.0
- 2f36323 - Fix build
- 58e64ff - Add PHPUnit compatibility for PHP 7.2
v1.2.23
v1.2.22
- cbf5b9c - Add @throws annotations in DenormalizerInterface::denormalize() and NormalizerInterface::normalize().
- 2107dee - Add ArrayObject to NormalizerInterface::normalize() return type.
- d0151d0 - Bump minimum PHPStan version
- 99ff19f - Fix build
v1.2.21
- 44aef78 - Introduce Voter stub
Configuration
-
If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.