Update dependency phpstan/phpstan to v1.11.5 #8

Merged
trizz merged 1 commits from renovate/phpstan-packages into main 2024-06-27 13:25:36 +02:00
Collaborator

This PR contains the following updates:

Package Type Update Change
phpstan/phpstan require-dev minor 1.10.46 -> 1.11.5

Release Notes

phpstan/phpstan (phpstan/phpstan)

v1.11.5

Compare Source

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 🔧

Bugfixes 🐛

Function signature fixes 🤖

Internals 🔍

  • Regression test (#​3136), thanks @​staabm!
  • Relax test version restriction (#​3140), thanks @​thg2k!
  • Fix PrepareCommand::fixComposerJson() (4537ef1445)
  • Internal errors as structured objects (7cd03f02a5)
  • WorkerCommand - do not return exit code 1 in case of internal errors, they are handled anyway (f76d836d13)
  • NodeScopeResolverTest - remove requires (f6b989881e)
  • Fix discrepancy between lint >= and PHP_VERSION_ID in NodeScopeResolverTest (b530b0d53d)
  • TypeInferenceTestCase::gatherAssertTypesFromDirectory() (595de78d35)
  • Take advantage of gatherAssertTypesFromDirectory in NodeScopeResolverTest (#​3159)
  • Turn TraitsCachingIssueIntegrationTest into a e2e test (#​3151), thanks @​staabm!

v1.11.4

Compare Source

Improvements 🔧

Bugfixes 🐛

Function signature fixes 🤖

Internals 🔍

v1.11.3

Compare Source

Improvements 🔧

Bugfixes 🐛

Function signature fixes 🤖

Internals 🔍

v1.11.2

Compare Source

Improvements 🔧

  • Stricter @phpstan-ignore identifiers parser (#​3079, #​3090, #​3091), thanks @​janedbal!
    • The parser now rejects some syntax that was possible but undocumented in 1.11.0 and 1.11.1
    • The parser now allows to attach comment to each single identifier in a list: @phpstan-ignore identifier (comment), identifier2 (comment2)
  • Resolving type of closure - get $passedToType from inFunctionCallsStack (ca41b7d8c2, da4fd7a412), #​5508, #​10254, #​10732
  • Do not lose generic type when the closure has native return type (7e9cd45701), #​9086

Function signature fixes 🤖

Internals 🔍

v1.11.1

Compare Source

Improvements 🔧

  • Support integer ranges in sprintf() constant result inference (#​3075), thanks @​staabm!

Bugfixes 🐛

Function signature fixes 🤖

v1.11.0

Compare Source

Read the article about PHPStan 1.11 on phpstan.org »

Major new features 🚀

  • Error identifiers
  • PHPStan Pro Reboot
    • A new migration wizard will effortlessly migrate all your @phpstan-ignore-line and @phpstan-ignore-next-line to the new @phpstan-ignore comment style with error identifiers. The old comment style is dangerous because it ignores all errors, current and future, on that line.
    • Revamped UI for much more comfortable viewing and browsing of reported errors
    • The new UI also lets you browse ignored errors, from ignoreErrors, from your baseline and also ignored locally in source code using comments
    • Streaming errors during launch: You don't have to wait for the analysis to complete, you can see errors as they come in during the analysis
    • Support for mapping file paths to the host filesystem when running in Docker or remotely
    • Try it out by running PHPStan with --pro CLI option
  • PHPDoc tags describing callable lifecycle: @param-immediately-invoked-callable, @param-later-invoked-callable
  • PHPDoc tag @param-closure-this to describe what $this is bound to in a passed closure
  • Two new config options around stricter offset checks in arrays (#​3028), #​7553, thanks @​ttomdewit!

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 🔧

  • Generic RuleErrorBuilder (9a3ed85178)
  • Deprecate checkMissingIterableValueType: false and checkGenericClassInNonGenericObjectType: false in favour of ignoring via identifiers (a64998108b)
  • Deprecate old NoopRule - replaced by BetterNoopRule in bleeding edge (109083571d)
  • Allow ignoring errors from CollectedDataNode with local comments (dc3b75ab4a)
  • Introduce new type (#​3050), #​9704, thanks @​ruudk!
  • RuleTestCase - fail on PHP warnings, notices etc. (#​3030), thanks @​janedbal!
  • Check duplicate assignment of redeclared promoted readonly properties (#​3049), #​8101, #​9863, #​9864, thanks @​schlndh!
  • Remove line from "nikic/php-parser" error message (#​2845), thanks @​mvorisek!
  • Stub validator - PHPStan classes are known without extra stubs (d004c23967)
  • Stub validator - PhpParser classes are known without extra stubs (3e498e1592)
  • CheckstyleErrorFormatter - include error identifier in source attribute (f66cf5badd), #​1205
  • BaselinePhpErrorFormatter - error identifiers in comments (4b32cac2d1)
  • RuleErrorBuilder::file() - file path needs to exist (c453f29f60)
  • AbstractMethodInNonAbstractClassRule - better error message for enums (b5dd34e492)
  • Fixed Xdebug spelling (#​2746), thanks @​derickr!
  • Track invalidated $this and used variables after invoking closure (#​2980)
  • Support @phan- prefixes on recognized PHPDoc tags (#​3000), thanks @​anomiex!
  • pure-callable and pure-Closure PHPDoc types (cdaff5f00d)
  • highlight_string() flips side-effects depending on $return (#​3021), thanks @​staabm!
  • Improve types for predefined constants (#​3054), thanks @​zonuexe!

Bugfixes 🐛

Function signature fixes 🤖

Internals 🔍

v1.10.67

Compare Source

This is the last release, or one of the last releases, in 1.10.x series. The next one is going to be PHPStan 1.11, and it's going to be released at some point in May 2024.

Improvements 🔧

Bugfixes 🐛

Function signature fixes 🤖

Internals 🔍

  • composer-dependency-analyser: update to 1.5.0 (support functions) (#​3011), thanks @​janedbal!

v1.10.66

Compare Source

Improvements 🔧

Bugfixes 🐛

Function signature fixes 🤖

Internals 🔍

  • Prevent unnecessary calls into reflection from JSON extensions (#​2994), thanks @​staabm!

v1.10.65

Compare Source

Improvements 🔧

Bugfixes 🐛

Function signature fixes 🤖

Internals 🔍

v1.10.64

Compare Source

Bleeding edge 🔪

  • 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

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 🔧

Bugfixes 🐛

Function signature fixes 🤖

v1.10.63

Compare Source

Improvements 🔧

Bugfixes 🐛

Function signature fixes 🤖

Internals 🔍

v1.10.62

Compare Source

Improvements 🔧

  • Too wide return type - report for conditional return types (de1c07ea68)

Bugfixes 🐛

  • Constants deprecation depends on PHP version in comment (#​2967), #​10700, thanks @​staabm!
  • Make @param-out work even if it is the only conditional type in a function signature (787c1e2b46)
  • ParameterOutAssignedTypeRule - fix for conditional types (19497ba031)
  • ParameterOutExecutionEndTypeRule - fix for conditional types (27c73f7f67)
  • Too wide @param-out - fix for conditional types (5a4789339e)

v1.10.61

Compare Source

Improvements 🔧

Bugfixes 🐛

Internals 🔍

  • MethodReturnStatementsNode - use ExtendedMethodReflection (3cc1a54564)

v1.10.60

Compare Source

Learn more about this release in an article on phpstan.org!

Major new features 🚀

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 🔧

Bugfixes 🐛

Function signature fixes 🤖

Internals 🔍

v1.10.59

Compare Source

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 🔧

  • ArrayFilterRule - tip message about treatPhpDocTypesAsCertain (f5b198c980)
  • ArgumentsNormalizer - skip unused arguments in non-variadic signatures, still return a normalized call (17e5bac093)
  • Methods in fluent interfaces are considered impure (b0261263e2)
  • Add type-specifying extension for settype() (#​2920), thanks @​ChrisBrenton!

Bugfixes 🐛

  • MethodAssertRule - do not report implicitly inherited assert tags (299df5130a), #​10573
    • Gets rid of the annoying error "Asserted type ... with type ... does not narrow down the type."
  • ConstantArrayType - string offset might exist as integer offset (2fb66328fd), #​10577

Internals 🔍

v1.10.58

Compare Source

Improvements 🔧

Bugfixes 🐛

Internals 🔍

v1.10.57

Compare Source

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 ClassReflection::getConstant() return type (8d4ea60a57)
  • Cover ClassConstantReflection with BC promise (8f82b799c5)

Bugfixes 🐛

Function signature fixes 🤖

v1.10.56

Compare Source

Major new feature 🚀

Improvements 🔧

Bugfixes 🐛

Function signature fixes 🤖

Internals 🔍

v1.10.55

Compare Source

Improvements 🔧

Bugfixes 🐛

Internals 🔍

v1.10.54

Compare Source

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 🔧

Bugfixes 🐛

v1.10.53

Compare Source

Improvements 🔧

Bugfixes 🐛

Internals 🔍

v1.10.52

Compare Source

Improvements 🔧

  • Do not allow to generate baseline when reflection error occurs (78ea9a6210)
  • Show internal errors that occured when generating a baseline (c997ea9eef)

Bugfixes 🐛

v1.10.51

Compare Source

Bleeding edge 🔪

  • ParamAttributesRule - promoted property attribute needs to target both parameters and properties (25d15526db), #​10298
  • More precise RecursiveIteratorIterator::__construct() parameter types (#​2835), thanks @​staabm!
  • PhpDocParser: add config for lines in its AST & enable ignoring errors within PHPDocs (#​2807), 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 🔧

  • Missing ThrowExprTypeRule - level 3 (0359ebc78f)
  • Analyse stubs only when not only files are analysed (402024091b)
  • Nicer error message in case of memory limit exhaustion in child process (816be99361)

Bugfixes 🐛

Internals 🔍

v1.10.50

Compare Source

Improvements 🔧

Bugfixes 🐛

Internals 🔍

v1.10.49

Compare Source

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 🔧

Bugfixes 🐛

Function signature fixes 🤖

  • Make SimpleXMLElement method return types benevolent (when they return static|null) (fb76c9f7d3)

v1.10.48

Compare Source

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 🔧

Bugfixes 🐛

Function signature fixes 🤖

v1.10.47

Compare Source

Improvements 🔧

Bugfixes 🐛

Function signature fixes 🤖


Configuration

📅 Schedule: Branch creation - "before 7am" (UTC), Automerge - "before 7am" (UTC).

🚦 Automerge: Enabled.

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 has been generated by Renovate Bot.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [phpstan/phpstan](https://github.com/phpstan/phpstan) | require-dev | minor | `1.10.46` -> `1.11.5` | --- ### Release Notes <details> <summary>phpstan/phpstan (phpstan/phpstan)</summary> ### [`v1.11.5`](https://github.com/phpstan/phpstan/releases/tag/1.11.5) [Compare Source](https://github.com/phpstan/phpstan/compare/1.11.4...1.11.5) # Bleeding edge 🔪 - Check array functions which require stringish values ([#&#8203;3132](https://github.com/phpstan/phpstan-src/pull/3132)), [#&#8203;11141](https://github.com/phpstan/phpstan/issues/11141), [#&#8203;5848](https://github.com/phpstan/phpstan/issues/5848), [#&#8203;3694](https://github.com/phpstan/phpstan/issues/3694), [#&#8203;11111](https://github.com/phpstan/phpstan/issues/11111), thanks [@&#8203;schlndh](https://github.com/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](https://phpstan.org/blog/what-is-bleeding-edge)* # Improvements 🔧 - When internal errors occur, do not show other reported errors (https://github.com/phpstan/phpstan-src/commit/aa921137be5b510408bc8df9b8b6fe632ed09db5) - It's important to first solve internal errors before seeing other reported errors - Inspired by https://github.com/phpstan/phpstan/discussions/11107 (ReviewDog was eating up important errors) - Show internal errors nicely in PHPStan Pro # Bugfixes 🐛 - Fix bug in `get_debug_type()` DynamicFunctionReturnTypeExtension ([#&#8203;3128](https://github.com/phpstan/phpstan-src/pull/3128)), thanks [@&#8203;patrickkusebauch](https://github.com/patrickkusebauch)! - Include path when counting errors ignored by identifier ([#&#8203;3154](https://github.com/phpstan/phpstan-src/pull/3154)), [#&#8203;11177](https://github.com/phpstan/phpstan/issues/11177), thanks [@&#8203;pilif](https://github.com/pilif)! - Implement bit shift operation on integers and unions ([#&#8203;3145](https://github.com/phpstan/phpstan-src/pull/3145)), thanks [@&#8203;thg2k](https://github.com/thg2k)! - Fix division type result with even integer range ([#&#8203;3152](https://github.com/phpstan/phpstan-src/pull/3152)), thanks [@&#8203;thg2k](https://github.com/thg2k)! - Solve identical comparison bug in call-site variance ([#&#8203;3153](https://github.com/phpstan/phpstan-src/pull/3153)), [#&#8203;11161](https://github.com/phpstan/phpstan/issues/11161), [#&#8203;10697](https://github.com/phpstan/phpstan/issues/10697), thanks [@&#8203;VincentLanglet](https://github.com/VincentLanglet)! # Function signature fixes 🤖 - `gnupg_init()` `options` parameter is optional ([#&#8203;3129](https://github.com/phpstan/phpstan-src/pull/3129)), thanks [@&#8203;yphoenix](https://github.com/yphoenix)! - Update outdated `RedisCluster::__construct` signature ([#&#8203;3130](https://github.com/phpstan/phpstan-src/pull/3130)), [#&#8203;11158](https://github.com/phpstan/phpstan/issues/11158), thanks [@&#8203;wolfgangzwiauer](https://github.com/wolfgangzwiauer)! - Improve image related functions signature ([#&#8203;3127](https://github.com/phpstan/phpstan-src/pull/3127)), thanks [@&#8203;thg2k](https://github.com/thg2k)! - Update/fix ext-amqp signatures ([#&#8203;3139](https://github.com/phpstan/phpstan-src/pull/3139)), thanks [@&#8203;ben-challis](https://github.com/ben-challis)! - fix `AMQPQueue::unbind()` routingKey type ([#&#8203;3143](https://github.com/phpstan/phpstan-src/pull/3143)), thanks [@&#8203;ben-challis](https://github.com/ben-challis)! - Add parameter definitions to `AMQPQueue::consume()` callback ([#&#8203;3144](https://github.com/phpstan/phpstan-src/pull/3144)), [#&#8203;9445](https://github.com/phpstan/phpstan/issues/9445), thanks [@&#8203;ben-challis](https://github.com/ben-challis)! - Add int ranges to AMQP typings ([#&#8203;3146](https://github.com/phpstan/phpstan-src/pull/3146)), thanks [@&#8203;ben-challis](https://github.com/ben-challis)! - Various fixes to the return signature of `IntlDateFormatter` methods ([#&#8203;3149](https://github.com/phpstan/phpstan-src/pull/3149)), thanks [@&#8203;chosten](https://github.com/chosten)! - Fix `Exception::getTrace()` return type (https://github.com/phpstan/phpstan-src/commit/492cd89932d873147cdf7acf49c88d432cbce69f) - fix posix_getpwuid ([#&#8203;3157](https://github.com/phpstan/phpstan-src/pull/3157)), thanks [@&#8203;pistej](https://github.com/pistej)! # Internals 🔍 - Regression test ([#&#8203;3136](https://github.com/phpstan/phpstan-src/pull/3136)), thanks [@&#8203;staabm](https://github.com/staabm)! - Relax test version restriction ([#&#8203;3140](https://github.com/phpstan/phpstan-src/pull/3140)), thanks [@&#8203;thg2k](https://github.com/thg2k)! - Fix `PrepareCommand::fixComposerJson()` (https://github.com/phpstan/phpstan-src/commit/4537ef1445b910930afa32d7fd8f22b044fdc726) - Internal errors as structured objects (https://github.com/phpstan/phpstan-src/commit/7cd03f02a5c32ca4e51006dc21d6184f73835a14) - WorkerCommand - do not return exit code 1 in case of internal errors, they are handled anyway (https://github.com/phpstan/phpstan-src/commit/f76d836d13fb94e9887260ae18229ad2ca2ce2ce) - NodeScopeResolverTest - remove requires (https://github.com/phpstan/phpstan-src/commit/f6b989881e66445197f6526bfcde868a60472098) - Fix discrepancy between `lint >=` and `PHP_VERSION_ID` in NodeScopeResolverTest (https://github.com/phpstan/phpstan-src/commit/b530b0d53d3fc990dcb0225e0d997af06ee15180) - `TypeInferenceTestCase::gatherAssertTypesFromDirectory()` (https://github.com/phpstan/phpstan-src/commit/595de78d35124d00eed90c09f5fd73cb40351e02) - Take advantage of gatherAssertTypesFromDirectory in NodeScopeResolverTest ([#&#8203;3159](https://github.com/phpstan/phpstan-src/pull/3159)) - Turn TraitsCachingIssueIntegrationTest into a e2e test ([#&#8203;3151](https://github.com/phpstan/phpstan-src/pull/3151)), thanks [@&#8203;staabm](https://github.com/staabm)! ### [`v1.11.4`](https://github.com/phpstan/phpstan/releases/tag/1.11.4) [Compare Source](https://github.com/phpstan/phpstan/compare/1.11.3...1.11.4) # Improvements 🔧 - Detect `--generate-baseline` combined with `--pro` (https://github.com/phpstan/phpstan-src/commit/dd028cb4ccc44c6aa12b51f443e8761d5d4efc1d), [#&#8203;11093](https://github.com/phpstan/phpstan/issues/11093) - Add error identifier to RawErrorFormatter ([#&#8203;3112](https://github.com/phpstan/phpstan-src/pull/3112)), [#&#8203;11125](https://github.com/phpstan/phpstan/issues/11125), thanks [@&#8203;zonuexe](https://github.com/zonuexe)! - Pass current rule level to PHPStan Pro (https://github.com/phpstan/phpstan-src/commit/7af14fbfc027b15e3342ac95be783bd3fa1df413) - Read and enforce PHPStan version constraints from `phpstan/extension-installer` v1.4 (https://github.com/phpstan/phpstan-src/commit/1d005ef1e72f77afada37bad491f2b6602f4cc92) # Bugfixes 🐛 - Consider `numeric-string` types after string concat ([#&#8203;3117](https://github.com/phpstan/phpstan-src/pull/3117)), thanks [@&#8203;staabm](https://github.com/staabm)! - Fix type loss with recursive `count()` ([#&#8203;2812](https://github.com/phpstan/phpstan-src/pull/2812)), thanks [@&#8203;staabm](https://github.com/staabm)! - `array_slice()` returns `non-empty-array` for existing offsets and positive limit ([#&#8203;3124](https://github.com/phpstan/phpstan-src/pull/3124)), [#&#8203;10721](https://github.com/phpstan/phpstan/issues/10721), thanks [@&#8203;staabm](https://github.com/staabm)! - Consider a `ClosureType()` as maybe impure by default when no `$impurePoints` array provided ([#&#8203;3125](https://github.com/phpstan/phpstan-src/pull/3125)), [#&#8203;11135](https://github.com/phpstan/phpstan/issues/11135), thanks [@&#8203;jf-m](https://github.com/jf-m)! # Function signature fixes 🤖 - Make the return type of `tempnam()` and `tmpfile()` to benevolent union ([#&#8203;3111](https://github.com/phpstan/phpstan-src/pull/3111)), thanks [@&#8203;zonuexe](https://github.com/zonuexe)! - Fix `gnupg_init` function ([#&#8203;3118](https://github.com/phpstan/phpstan-src/pull/3118)), thanks [@&#8203;pistej](https://github.com/pistej)! # Internals 🔍 - Update `react/promise` (https://github.com/phpstan/phpstan-src/commit/da754e2294a619bacc95cd42426e94c17a57365b) ### [`v1.11.3`](https://github.com/phpstan/phpstan/releases/tag/1.11.3) [Compare Source](https://github.com/phpstan/phpstan/compare/1.11.2...1.11.3) # Improvements 🔧 - Add new `*ParameterClosureTypeExtension` ([#&#8203;3089](https://github.com/phpstan/phpstan-src/pull/3089)), thanks [@&#8203;canvural](https://github.com/canvural)! - DynamicFunctionReturnTypeExtension for the `get_debug_type` function ([#&#8203;2910](https://github.com/phpstan/phpstan-src/pull/2910)), [#&#8203;10558](https://github.com/phpstan/phpstan/issues/10558), [#&#8203;10585](https://github.com/phpstan/phpstan/issues/10585), thanks [@&#8203;patrickkusebauch](https://github.com/patrickkusebauch)! - Infer more duplicated array keys ([#&#8203;3058](https://github.com/phpstan/phpstan-src/pull/3058)), [#&#8203;6976](https://github.com/phpstan/phpstan/issues/6976), thanks [@&#8203;VincentLanglet](https://github.com/VincentLanglet)! - Improve `explode` return type precision ([#&#8203;3096](https://github.com/phpstan/phpstan-src/pull/3096)), thanks [@&#8203;staabm](https://github.com/staabm)! - Make assigning property via reference impure ([#&#8203;3082](https://github.com/phpstan/phpstan-src/pull/3082)), thanks [@&#8203;schlndh](https://github.com/schlndh)! - Support new PHP 8.4 mb_lcfirst, mb_ucfirst function variants ([#&#8203;3095](https://github.com/phpstan/phpstan-src/pull/3095)), thanks [@&#8203;staabm](https://github.com/staabm)! # Bugfixes 🐛 - Make `array_map` argument take into account unpack ([#&#8203;2901](https://github.com/phpstan/phpstan-src/pull/2901)), [#&#8203;10527](https://github.com/phpstan/phpstan/issues/10527), thanks [@&#8203;ryium](https://github.com/ryium)! - Fixes incorrect types reported by `parse_url` ([#&#8203;2918](https://github.com/phpstan/phpstan-src/pull/2918)), [#&#8203;4754](https://github.com/phpstan/phpstan/issues/4754), thanks [@&#8203;ChrisBrenton](https://github.com/ChrisBrenton)! - Ensure `$http_response_header` is a `list<string>` ([#&#8203;2959](https://github.com/phpstan/phpstan-src/pull/2959)), thanks [@&#8203;Seldaek](https://github.com/Seldaek)! - Keep numeric-strings in `str_repeat()` ([#&#8203;2914](https://github.com/phpstan/phpstan-src/pull/2914)), [#&#8203;10572](https://github.com/phpstan/phpstan/issues/10572), thanks [@&#8203;staabm](https://github.com/staabm)! - Array is non-empty even when `in_array` is not strict ([#&#8203;2539](https://github.com/phpstan/phpstan-src/pull/2539)), [#&#8203;9662](https://github.com/phpstan/phpstan/issues/9662), [#&#8203;10228](https://github.com/phpstan/phpstan/issues/10228), thanks [@&#8203;staabm](https://github.com/staabm)! - Fix `substr()` type narrowing for possibly single char result ([#&#8203;3081](https://github.com/phpstan/phpstan-src/pull/3081)), [#&#8203;11035](https://github.com/phpstan/phpstan/issues/11035), [#&#8203;9804](https://github.com/phpstan/phpstan/issues/9804), thanks [@&#8203;staabm](https://github.com/staabm)! - Fix escaping of the error message in various output formatters ([#&#8203;3087](https://github.com/phpstan/phpstan-src/pull/3087)), thanks [@&#8203;mousetail](https://github.com/mousetail)! - `$this` cannot be reassigned when passed by reference ([#&#8203;3097](https://github.com/phpstan/phpstan-src/pull/3097)), [#&#8203;10477](https://github.com/phpstan/phpstan/issues/10477), thanks [@&#8203;takaram](https://github.com/takaram)! - Subtract zero-float when comparing against zero-int ([#&#8203;3102](https://github.com/phpstan/phpstan-src/pull/3102)), [#&#8203;5309](https://github.com/phpstan/phpstan/issues/5309), thanks [@&#8203;staabm](https://github.com/staabm)! - Fix fatal error on `constant('')` ([#&#8203;3013](https://github.com/phpstan/phpstan-src/pull/3013)), [#&#8203;10867](https://github.com/phpstan/phpstan/issues/10867), thanks [@&#8203;staabm](https://github.com/staabm)! # Function signature fixes 🤖 - Add new header functions for PHP 8.4 ([#&#8203;3093](https://github.com/phpstan/phpstan-src/pull/3093)), thanks [@&#8203;Seldaek](https://github.com/Seldaek)! - Fix wrong return type for `SplFileObject::fgets()` ([#&#8203;3103](https://github.com/phpstan/phpstan-src/pull/3103)), thanks [@&#8203;DanielSiepmann](https://github.com/DanielSiepmann)! - Update `Locale` signatures ([#&#8203;2880](https://github.com/phpstan/phpstan-src/pull/2880)), [#&#8203;7855](https://github.com/phpstan/phpstan/issues/7855), [#&#8203;8149](https://github.com/phpstan/phpstan/issues/8149), thanks [@&#8203;devnix](https://github.com/devnix)! - Fix wrong `fread()` length parameter type and return type ([#&#8203;3105](https://github.com/phpstan/phpstan-src/pull/3105)), thanks [@&#8203;thg2k](https://github.com/thg2k)! - ReflectionFunction and ReflectionMethod::getClosure cannot return null (https://github.com/phpstan/phpstan-src/commit/dae9335075964f197aa5d965b3d38c12788a6405), [#&#8203;10839](https://github.com/phpstan/phpstan/issues/10839) - Make method names `non-falsy-string` ([#&#8203;3108](https://github.com/phpstan/phpstan-src/pull/3108)), thanks [@&#8203;schlndh](https://github.com/schlndh)! # Internals 🔍 - Add regression test ([#&#8203;3066](https://github.com/phpstan/phpstan-src/pull/3066)), [#&#8203;3300](https://github.com/phpstan/phpstan/issues/3300), thanks [@&#8203;herndlm](https://github.com/herndlm)! - Update phpdoc-parser ([#&#8203;3107](https://github.com/phpstan/phpstan-src/pull/3107)) - `TemplateTagValueNode::$name` cannot be empty string (https://github.com/phpstan/phpdoc-parser/commit/fcaefacf2d5c417e928405b71b400d4ce10daaf4), thanks [@&#8203;staabm](https://github.com/staabm)! - Fix property descriptions in ReflectionProviderGoldenTest ([#&#8203;3109](https://github.com/phpstan/phpstan-src/pull/3109)), thanks [@&#8203;schlndh](https://github.com/schlndh)! ### [`v1.11.2`](https://github.com/phpstan/phpstan/releases/tag/1.11.2) [Compare Source](https://github.com/phpstan/phpstan/compare/1.11.1...1.11.2) # Improvements 🔧 - Stricter `@phpstan-ignore` identifiers parser ([#&#8203;3079](https://github.com/phpstan/phpstan-src/pull/3079), [#&#8203;3090](https://github.com/phpstan/phpstan-src/pull/3090), [#&#8203;3091](https://github.com/phpstan/phpstan-src/pull/3091)), thanks [@&#8203;janedbal](https://github.com/janedbal)! - The parser now rejects some syntax that was possible but undocumented in 1.11.0 and 1.11.1 - The parser now allows to attach comment to each single identifier in a list: `@phpstan-ignore identifier (comment), identifier2 (comment2)` - Resolving type of closure - get `$passedToType` from `inFunctionCallsStack` (https://github.com/phpstan/phpstan-src/commit/ca41b7d8c2d54407156d07dab5375a3a5ebbeb29, https://github.com/phpstan/phpstan-src/commit/da4fd7a4122615d9dbae55083bdfd290026fa08e), [#&#8203;5508](https://github.com/phpstan/phpstan/issues/5508), [#&#8203;10254](https://github.com/phpstan/phpstan/issues/10254), [#&#8203;10732](https://github.com/phpstan/phpstan/issues/10732) - Do not lose generic type when the closure has native return type (https://github.com/phpstan/phpstan-src/commit/7e9cd45701562fb02f1aa9cab1f89b58a58f6526), [#&#8203;9086](https://github.com/phpstan/phpstan/issues/9086) # Function signature fixes 🤖 - More concrete return types for some database functions ([#&#8203;3078](https://github.com/phpstan/phpstan-src/pull/3078)), thanks [@&#8203;devnix](https://github.com/devnix)! # Internals 🔍 - Fix Composer by referencing deleted tag of `nette/di` (https://github.com/phpstan/phpstan-src/commit/2ab647e12fe46d970fa630b78f9ca962354b3d16) - Specify `array_filter` callbacks (https://github.com/phpstan/phpstan-src/commit/754b7b8e170cd36ed7bc8633b90651eff16cc893) - Add `@api` annotation to `AcceptsResult::__construct` ([#&#8203;3092](https://github.com/phpstan/phpstan-src/pull/3092)), thanks [@&#8203;canvural](https://github.com/canvural)! ### [`v1.11.1`](https://github.com/phpstan/phpstan/releases/tag/1.11.1) [Compare Source](https://github.com/phpstan/phpstan/compare/1.11.0...1.11.1) # Improvements 🔧 - Support integer ranges in `sprintf()` constant result inference ([#&#8203;3075](https://github.com/phpstan/phpstan-src/pull/3075)), thanks [@&#8203;staabm](https://github.com/staabm)! # Bugfixes 🐛 - Do not complain about `impure(Function|Method).pure` if it has `@phpstan-assert` tags (https://github.com/phpstan/phpstan-src/commit/9544f8a6b52dbd6068800bbfc5bdaf67fe04a8c2) - Remove tip about deprecated config option (https://github.com/phpstan/phpstan-src/commit/d603c7b676e3b91f4b7ba81d46aee3e9a593f883), [#&#8203;11000](https://github.com/phpstan/phpstan/issues/11000) - Fix false positive with `reportPossiblyNonexistentConstantArrayOffset: true` (https://github.com/phpstan/phpstan-src/commit/5277630459518024b16272bf6b6fd216eb3d10ed), [#&#8203;10997](https://github.com/phpstan/phpstan/issues/10997) - Fix parent keyword case sensitivity ([#&#8203;3064](https://github.com/phpstan/phpstan-src/pull/3064)), thanks [@&#8203;staabm](https://github.com/staabm)! - InlineHTML is an impure point ([#&#8203;3072](https://github.com/phpstan/phpstan-src/pull/3072)), thanks [@&#8203;staabm](https://github.com/staabm)! - UnionTypeHelper - prevent infinite recursion (https://github.com/phpstan/phpstan-src/commit/bb3da26d562727c3122a344622059ded2239d6ab), [#&#8203;11027](https://github.com/phpstan/phpstan/issues/11027) - Fix more potential for infinite recursion (https://github.com/phpstan/phpstan-src/commit/1d02c4f27684644e8361cf2a2bc5713adef9b95e) - RangeFunctionReturnTypeExtension - fix internal ValueError (https://github.com/phpstan/phpstan-src/commit/fe3895ada98940d1a71c2eb115d61afda9fd7a2c), [#&#8203;11026](https://github.com/phpstan/phpstan/issues/11026) - Property unset is an impure point (https://github.com/phpstan/phpstan-src/commit/702ddcd7805ba08c0765bdf0930beaef0e6b4fc1), [#&#8203;11001](https://github.com/phpstan/phpstan/issues/11001) - Fix property assign not being an impure point in arrow function (https://github.com/phpstan/phpstan-src/commit/35ff6895f48b74e8bc0dda7ec94c40e73c84099b), [#&#8203;11001](https://github.com/phpstan/phpstan/issues/11001) - Fix internal error when accessing enum case by class-string (https://github.com/phpstan/phpstan-src/commit/1116e03389f0f47297c2638b5b67c84f4d339478), [#&#8203;10985](https://github.com/phpstan/phpstan/issues/10985) - Fix resolving `self` and `static` in `@phpstan-closure-this` from trait stub file (https://github.com/phpstan/phpstan-src/commit/93402494ee92dd2e7264f112105151586203e0ec), [#&#8203;11009](https://github.com/phpstan/phpstan/issues/11009) - CallToMethodStatementWithoutImpurePointsRule - fix for methods called on unions (https://github.com/phpstan/phpstan-src/commit/ee33f1e48b5ae9d6e99500814c186cd31e7a764f), [#&#8203;11011](https://github.com/phpstan/phpstan/issues/11011) # Function signature fixes 🤖 - Offset `uri` in `stream_get_meta_data` calls is always present on PHP 8.3+ (https://github.com/phpstan/phpstan-src/commit/885d46bc8d7555a8b762914821ad2f0f5871e517), [#&#8203;11024](https://github.com/phpstan/phpstan/issues/11024), [#&#8203;10999](https://github.com/phpstan/phpstan/issues/10999) ### [`v1.11.0`](https://github.com/phpstan/phpstan/releases/tag/1.11.0) [Compare Source](https://github.com/phpstan/phpstan/compare/1.10.67...1.11.0) [**Read the article about PHPStan 1.11 on phpstan.org »**](https://phpstan.org/blog/phpstan-1-11-errors-identifiers-phpstan-pro-reboot) # Major new features 🚀 - **Error identifiers** - A way to categorize reported errors by a stable identifier. Up until now you had to use specific and ever-changing error messages - Can be used for [ignoring specific errors locally](https://phpstan.org/user-guide/ignoring-errors#ignoring-in-code-using-phpdocs) with new `@phpstan-ignore` comment (uses current or next line automatically) - Can be used for [ignoring specific errors in `ignoreErrors`](https://phpstan.org/user-guide/ignoring-errors#ignoring-in-configuration-file) section of your configuration file (phpstan.neon) - Can be used in [output formatters](https://phpstan.org/user-guide/output-format) - Can be seen in PHPStan Pro GUI or in TableErrorFormatter with `-v` - Catalogue with source code links: https://phpstan.org/error-identifiers - **PHPStan Pro Reboot** - A new migration wizard will effortlessly migrate all your `@phpstan-ignore-line` and `@phpstan-ignore-next-line` to the new `@phpstan-ignore` comment style with error identifiers. The old comment style is dangerous because it ignores all errors, current and future, on that line. - Revamped UI for much more comfortable viewing and browsing of reported errors - The new UI also lets you **browse ignored errors**, from `ignoreErrors`, from your baseline and also ignored locally in source code using comments - Streaming errors during launch: You don't have to wait for the analysis to complete, you can see errors as they come in during the analysis - Support for mapping file paths to the host filesystem when running in Docker or remotely - Try it out by running PHPStan with `--pro` CLI option - PHPDoc tags describing callable lifecycle: `@param-immediately-invoked-callable`, `@param-later-invoked-callable` - Useful for exception analysis (https://phpstan.org/blog/bring-your-exceptions-under-control) and `@phpstan-pure` - PHPDoc tag `@param-closure-this` to describe what `$this` is bound to in a passed closure - Two new config options around stricter offset checks in arrays ([#&#8203;3028](https://github.com/phpstan/phpstan-src/pull/3028)), [#&#8203;7553](https://github.com/phpstan/phpstan/issues/7553), thanks [@&#8203;ttomdewit](https://github.com/ttomdewit)! - `reportPossiblyNonexistentGeneralArrayOffset` - `reportPossiblyNonexistentConstantArrayOffset` - [Learn more in the documentation](https://phpstan.org/config-reference#reportpossiblynonexistentgeneralarrayoffset) # Bleeding edge 🔪 - Checking truthiness of `@phpstan-pure` above functions and methods - Check `new`/function call/method call/static method call on a separate line without any side effects even without `@phpstan-pure` PHPDoc tag on the declaration side - https://github.com/phpstan/phpstan-src/commit/281a87d1ab61809076ecfa6dfc2cc86e3babe235 - [#&#8203;3020](https://github.com/phpstan/phpstan-src/pull/3020), thanks [@&#8203;staabm](https://github.com/staabm)! - [#&#8203;3022](https://github.com/phpstan/phpstan-src/pull/3022), thanks [@&#8203;staabm](https://github.com/staabm)! - [#&#8203;3023](https://github.com/phpstan/phpstan-src/pull/3023), thanks [@&#8203;staabm](https://github.com/staabm)! - BetterNoopRule - take advantage of impure points (https://github.com/phpstan/phpstan-src/commit/a6470521b65d7424f552633c1f3827704c6262c3), [#&#8203;10389](https://github.com/phpstan/phpstan/issues/10389) - Run missing type check on `@param-out` (https://github.com/phpstan/phpstan-src/commit/56b20024386d983927c64dfa895ff026bed2798c) - CallToConstructorStatementWithoutSideEffectsRule - report class with no constructor (https://github.com/phpstan/phpstan-src/commit/b116d25a6e4ba6c09f59af6569d9e6f6fd20aff4) - Deprecated: returning plain strings as errors, use RuleErrorBuilder - Learn more: [Using RuleErrorBuilder to enrich reported errors in custom rules](https://phpstan.org/blog/using-rule-error-builder) - Deprecated: returning RuleError without identifier (https://github.com/phpstan/phpstan-src/commit/969e6fa31d5484d42dab902703cfc6820a983cfd) *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](https://phpstan.org/blog/what-is-bleeding-edge)* # Improvements 🔧 - Generic RuleErrorBuilder (https://github.com/phpstan/phpstan-src/commit/9a3ed85178097e2d74f27623dd02bdd72c571e5b) - Deprecate `checkMissingIterableValueType: false` and `checkGenericClassInNonGenericObjectType: false` in favour of ignoring via identifiers (https://github.com/phpstan/phpstan-src/commit/a64998108b318581b0203e84582711c3e4d1e43c) - Deprecate old NoopRule - replaced by BetterNoopRule in bleeding edge (https://github.com/phpstan/phpstan-src/commit/109083571de6102cb854b9975c1463551ef678d0) - Allow ignoring errors from CollectedDataNode with local comments (https://github.com/phpstan/phpstan-src/commit/dc3b75ab4a2acd863405416620240302b284973a) - Introduce `new` type ([#&#8203;3050](https://github.com/phpstan/phpstan-src/pull/3050)), [#&#8203;9704](https://github.com/phpstan/phpstan/issues/9704), thanks [@&#8203;ruudk](https://github.com/ruudk)! - RuleTestCase - fail on PHP warnings, notices etc. ([#&#8203;3030](https://github.com/phpstan/phpstan-src/pull/3030)), thanks [@&#8203;janedbal](https://github.com/janedbal)! - Check duplicate assignment of redeclared promoted readonly properties ([#&#8203;3049](https://github.com/phpstan/phpstan-src/pull/3049)), [#&#8203;8101](https://github.com/phpstan/phpstan/issues/8101), [#&#8203;9863](https://github.com/phpstan/phpstan/issues/9863), [#&#8203;9864](https://github.com/phpstan/phpstan/issues/9864), thanks [@&#8203;schlndh](https://github.com/schlndh)! - Remove line from "nikic/php-parser" error message ([#&#8203;2845](https://github.com/phpstan/phpstan-src/pull/2845)), thanks [@&#8203;mvorisek](https://github.com/mvorisek)! - Stub validator - PHPStan classes are known without extra stubs (https://github.com/phpstan/phpstan-src/commit/d004c239677fb7abe41aa16e8e1b45bfac63f773) - Stub validator - PhpParser classes are known without extra stubs (https://github.com/phpstan/phpstan-src/commit/3e498e1592221f3a01527c10318424014d52f85d) - CheckstyleErrorFormatter - include error identifier in source attribute (https://github.com/phpstan/phpstan-src/commit/f66cf5badd2c98317d1d296ba24c3be77efcda18), [#&#8203;1205](https://github.com/phpstan/phpstan/issues/1205) - BaselinePhpErrorFormatter - error identifiers in comments (https://github.com/phpstan/phpstan-src/commit/4b32cac2d1b98c6af65c07041fdbc64e5d3f3baf) - `RuleErrorBuilder::file()` - file path needs to exist (https://github.com/phpstan/phpstan-src/commit/c453f29f60992167a5aa46d4926c18a420ae7b26) - AbstractMethodInNonAbstractClassRule - better error message for enums (https://github.com/phpstan/phpstan-src/commit/b5dd34e492b03566458e98b314c6852cfd683916) - Fixed Xdebug spelling ([#&#8203;2746](https://github.com/phpstan/phpstan-src/pull/2746)), thanks [@&#8203;derickr](https://github.com/derickr)! - Track invalidated `$this` and used variables after invoking closure ([#&#8203;2980](https://github.com/phpstan/phpstan-src/pull/2980)) - Support `@phan-` prefixes on recognized PHPDoc tags ([#&#8203;3000](https://github.com/phpstan/phpstan-src/pull/3000)), thanks [@&#8203;anomiex](https://github.com/anomiex)! - `pure-callable` and `pure-Closure` PHPDoc types (https://github.com/phpstan/phpstan-src/commit/cdaff5f00d621c3a94e048b8bd9fa864d47b3228) - `highlight_string()` flips side-effects depending on $return ([#&#8203;3021](https://github.com/phpstan/phpstan-src/pull/3021)), thanks [@&#8203;staabm](https://github.com/staabm)! - Improve types for predefined constants ([#&#8203;3054](https://github.com/phpstan/phpstan-src/pull/3054)), thanks [@&#8203;zonuexe](https://github.com/zonuexe)! # Bugfixes 🐛 - Make `AccessoryNonFalsyStringType::toInteger()` return `IntegerType` instead of non-zero ([#&#8203;3018](https://github.com/phpstan/phpstan-src/pull/3018)), [#&#8203;10893](https://github.com/phpstan/phpstan/issues/10893), thanks [@&#8203;zonuexe](https://github.com/zonuexe)! - Filter scope by non-empty array after foreach regardless of `polluteScopeWithAlwaysIterableForeach` ([#&#8203;3029](https://github.com/phpstan/phpstan-src/pull/3029)), [#&#8203;10922](https://github.com/phpstan/phpstan/issues/10922), thanks [@&#8203;VincentLanglet](https://github.com/VincentLanglet)! - Preserve large arrays with same keys through union ([#&#8203;3032](https://github.com/phpstan/phpstan-src/pull/3032)), [#&#8203;9397](https://github.com/phpstan/phpstan/issues/9397), [#&#8203;10080](https://github.com/phpstan/phpstan/issues/10080), thanks [@&#8203;schlndh](https://github.com/schlndh)! - Fix `count($x) > $n === true` negation ([#&#8203;3037](https://github.com/phpstan/phpstan-src/pull/3037)), [#&#8203;10952](https://github.com/phpstan/phpstan/issues/10952), thanks [@&#8203;rvanvelzen](https://github.com/rvanvelzen)! - Fix NAN not accepting NAN ([#&#8203;3036](https://github.com/phpstan/phpstan-src/pull/3036)), [#&#8203;10956](https://github.com/phpstan/phpstan/issues/10956), [#&#8203;10297](https://github.com/phpstan/phpstan/issues/10297), thanks [@&#8203;rvanvelzen](https://github.com/rvanvelzen)! - DateTimeInstantiationRule - fix error message for `new` with wrong name case (https://github.com/phpstan/phpstan-src/commit/59ac31a554203a7ae3fb9449bbd5b61f3afe2e20) - Process ConstFetch (https://github.com/phpstan/phpstan-src/commit/b5c63c296783bd067b14bad410dab2b87a1b7b3c) - Fix `preg_match_all` behaviour with no flags (https://github.com/phpstan/phpstan-src/commit/a856ec7ab5540cb4a8d30e9e170958a32a7165b2) - `file_get_contents` is an impure function (https://github.com/phpstan/phpstan-src/commit/2b5b3174c7f00e56b7692b4c26552b2ad13c73d5) - Fix `ClosureType::equals()` (https://github.com/phpstan/phpstan-src/commit/29c35b584a948e9a3c90e2d56312069ce073e6e6) - Use statement result of analysed anonymous class to inform about throw points and impure points (https://github.com/phpstan/phpstan-src/commit/70a75f68896e5f7eaa988c0cb7f20dad32c3c172) - Filter out implicit throw points from callables when `exceptions.implicitThrows: false` ([#&#8203;3016](https://github.com/phpstan/phpstan-src/pull/3016)), thanks [@&#8203;janedbal](https://github.com/janedbal)! - Fix `ConstantArrayType::hasOffsetValueType()` for offset union type where all types are valid (https://github.com/phpstan/phpstan-src/commit/26e949b0d093751c98e9a106f680092abf3b28d9) - `non-empty-list` always has offset 0 (https://github.com/phpstan/phpstan-src/commit/f4d1d481472b45c56ba2cd49ae98065092217f36) - Narrow to `non-empty-string`/`non-falsey-string` after `mb_strlen()` ([#&#8203;3038](https://github.com/phpstan/phpstan-src/pull/3038)), thanks [@&#8203;staabm](https://github.com/staabm)! - Implement `Type::isOffsetAccessLegal()` to detect offset access that crashes even in `isset()` ([#&#8203;3045](https://github.com/phpstan/phpstan-src/pull/3045)), [#&#8203;8393](https://github.com/phpstan/phpstan/issues/8393), [#&#8203;10926](https://github.com/phpstan/phpstan/issues/10926), thanks [@&#8203;rajyan](https://github.com/rajyan)! - Specify types on `match()` condition correctly ([#&#8203;3053](https://github.com/phpstan/phpstan-src/pull/3053)), [#&#8203;10974](https://github.com/phpstan/phpstan/issues/10974), [#&#8203;9694](https://github.com/phpstan/phpstan/issues/9694), thanks [@&#8203;rvanvelzen](https://github.com/rvanvelzen)! - `json_decode` with force array flag: subtract all objects, not just stdClass ([#&#8203;3052](https://github.com/phpstan/phpstan-src/pull/3052)), thanks [@&#8203;rajyan](https://github.com/rajyan)! - Fix `strlen($x) > $n === true` negation ([#&#8203;3040](https://github.com/phpstan/phpstan-src/pull/3040)), thanks [@&#8203;staabm](https://github.com/staabm)! - Support multi-byte string function variants ([#&#8203;3039](https://github.com/phpstan/phpstan-src/pull/3039)), thanks [@&#8203;staabm](https://github.com/staabm)! - Final scope from `Continue_` points should not be used for `while (true)` ([#&#8203;3057](https://github.com/phpstan/phpstan-src/pull/3057)), [#&#8203;10980](https://github.com/phpstan/phpstan/issues/10980), thanks [@&#8203;greew](https://github.com/greew)! - Fix enum performance problem ([#&#8203;3062](https://github.com/phpstan/phpstan-src/pull/3062), [#&#8203;3060](https://github.com/phpstan/phpstan-src/pull/3060)), [#&#8203;10979](https://github.com/phpstan/phpstan/issues/10979), thanks [@&#8203;staabm](https://github.com/staabm)! - NULL and null as a property default value are treated differently when overriding a parent property ([#&#8203;3063](https://github.com/phpstan/phpstan-src/pull/3063)), [#&#8203;10987](https://github.com/phpstan/phpstan/issues/10987), thanks [@&#8203;staabm](https://github.com/staabm)! # Function signature fixes 🤖 - Make the url key of metadata returned by `stream_get_meta_data()` optional ([#&#8203;3024](https://github.com/phpstan/phpstan-src/pull/3024)), [#&#8203;10887](https://github.com/phpstan/phpstan/issues/10887), thanks [@&#8203;hirokinoue](https://github.com/hirokinoue)! - Narrow `Closure::bind` `$newScope` param ([#&#8203;2817](https://github.com/phpstan/phpstan-src/pull/2817)), thanks [@&#8203;mvorisek](https://github.com/mvorisek)! - Infer object type mysqli_fetch_object ([#&#8203;2675](https://github.com/phpstan/phpstan/issues/2675)) ([#&#8203;2675](https://github.com/phpstan/phpstan-src/pull/2675)), thanks [@&#8203;staabm](https://github.com/staabm)! - Fix `Imagick::identifyImage()` return type ([#&#8203;3017](https://github.com/phpstan/phpstan-src/pull/3017)), thanks [@&#8203;SVillette](https://github.com/SVillette)! # Internals 🔍 - Clean up old identifiers and metadata (https://github.com/phpstan/phpstan-src/commit/c476a8611d06ed5ce850ba74bd087ed0fa9304ad) - Delete StatementOrderVisitor that is no longer needed (https://github.com/phpstan/phpstan-src/commit/017d321f47b2a49c11b0337a920235b0770da164) - Introduce `ClassReflection::getClassTypeDescription()` (https://github.com/phpstan/phpstan-src/commit/dec9e435a7e0cea96079eb08c799df6b49b92e82) - Fix classname typo in tests ([#&#8203;2461](https://github.com/phpstan/phpstan-src/pull/2461)), thanks [@&#8203;szepeviktor](https://github.com/szepeviktor)! - Fix various typos ([#&#8203;2463](https://github.com/phpstan/phpstan-src/pull/2463)), thanks [@&#8203;szepeviktor](https://github.com/szepeviktor)! - Added text regarding patch issues during installation ([#&#8203;2670](https://github.com/phpstan/phpstan-src/pull/2670)), thanks [@&#8203;mt-satak](https://github.com/mt-satak)! - Fix typo in ArgumentsNormalizer ([#&#8203;2705](https://github.com/phpstan/phpstan-src/pull/2705)), thanks [@&#8203;mad-briller](https://github.com/mad-briller)! - Rich PHPDoc for ExceptionTypeResolver (https://github.com/phpstan/phpstan-src/commit/e7ab4f741c0ec22cf70457c7a542b7978202b10a) - Hide internal commands ([#&#8203;2833](https://github.com/phpstan/phpstan-src/pull/2833)), thanks [@&#8203;rvanvelzen](https://github.com/rvanvelzen)! - Test invalidated object in static closure ([#&#8203;2981](https://github.com/phpstan/phpstan-src/pull/2981)), thanks [@&#8203;staabm](https://github.com/staabm)! - PHPDoc: address multiple variables defined in one [@&#8203;param](https://github.com/param) ([#&#8203;3001](https://github.com/phpstan/phpstan-src/pull/3001)), thanks [@&#8203;Muqsit](https://github.com/Muqsit)! - Do not assume every contributor uses PhpStorm (https://github.com/phpstan/phpstan-src/commit/d1834e69d06e0f85a45db8f5fb7a2c5a6ce898b6) - TypeInferenceTestCase: ability to disable implicit throws ([#&#8203;3015](https://github.com/phpstan/phpstan-src/pull/3015)), thanks [@&#8203;janedbal](https://github.com/janedbal)! - Slightly reduce comparing and calling methods for trivial optimizations ([#&#8203;3004](https://github.com/phpstan/phpstan-src/pull/3004)), [#&#8203;10926](https://github.com/phpstan/phpstan/issues/10926), thanks [@&#8203;zonuexe](https://github.com/zonuexe)! - AnalyserResultFinalizer - DRY of running CollectedDataNode rules (https://github.com/phpstan/phpstan-src/commit/38e2c96ee45733c8d3b44d048ce27a9b5450718e) - Introduce LocalIgnoresProcessor (https://github.com/phpstan/phpstan-src/commit/d026655260727c7c6e4cd69d50d57569e9128c13) - Introduce `RuleErrorBuilder::treatPhpDocTypesAsCertainTip()` for a bit more DRYness ([#&#8203;3035](https://github.com/phpstan/phpstan-src/pull/3035)), thanks [@&#8203;axlon](https://github.com/axlon)! - Make ResultCacheEndToEndTest pass level 9 ([#&#8203;3055](https://github.com/phpstan/phpstan-src/pull/3055)), [#&#8203;10977](https://github.com/phpstan/phpstan/issues/10977), thanks [@&#8203;AJenbo](https://github.com/AJenbo)! - ClassReflection - cache enum cases (https://github.com/phpstan/phpstan-src/commit/39ce0425737cdbacfee5fbc08160d023cb5bc639), [#&#8203;10979](https://github.com/phpstan/phpstan/issues/10979) ### [`v1.10.67`](https://github.com/phpstan/phpstan/releases/tag/1.10.67) [Compare Source](https://github.com/phpstan/phpstan/compare/1.10.66...1.10.67) **This is the last release, or one of the last releases, in 1.10.x series. The next one is going to be PHPStan 1.11, and it's going to be released at some point in May 2024.** # Improvements 🔧 - Forbid PHPUnitPHAR prefixed classes ([#&#8203;3002](https://github.com/phpstan/phpstan-src/pull/3002)), thanks [@&#8203;staabm](https://github.com/staabm)! - Improve error messages on unnamed parameters ([#&#8203;3010](https://github.com/phpstan/phpstan-src/pull/3010)), [#&#8203;10814](https://github.com/phpstan/phpstan/issues/10814), thanks [@&#8203;takaram](https://github.com/takaram)! # Bugfixes 🐛 - Improve `date()` return types ([#&#8203;2888](https://github.com/phpstan/phpstan-src/pull/2888)), [#&#8203;10468](https://github.com/phpstan/phpstan/issues/10468), [#&#8203;6613](https://github.com/phpstan/phpstan/issues/6613), thanks [@&#8203;zonuexe](https://github.com/zonuexe)! - Default value null does not make promoted property type nullable (https://github.com/phpstan/phpstan-src/commit/b2177e350f79176a5d53eaf75e37e5dce0053f8a), [#&#8203;9839](https://github.com/phpstan/phpstan/issues/9839) - Fix socket_select array types after call (https://github.com/phpstan/phpstan-src/commit/24c52494be982429eb6782ad859fb6cbd6fb3dee), https://github.com/phpstan/phpstan/discussions/10285 - Fix conditional types in PHPDocs from stubs for native functions (https://github.com/phpstan/phpstan-src/commit/8ae0b28a5c1e6f4e2c692caff0cd99df07f2486e) - Fix env int key problem (https://github.com/phpstan/phpstan-src/commit/e606fbedaea7e887456a771ce0dbb9572d16accf), [#&#8203;10833](https://github.com/phpstan/phpstan/issues/10833) - Fix false positives about uninitialized properties ([#&#8203;2897](https://github.com/phpstan/phpstan-src/pull/2897)), [#&#8203;10523](https://github.com/phpstan/phpstan/issues/10523), [#&#8203;10822](https://github.com/phpstan/phpstan/issues/10822), thanks [@&#8203;staabm](https://github.com/staabm)! - Incremented numeric-string should change to int/float ([#&#8203;2797](https://github.com/phpstan/phpstan-src/pull/2797)), [#&#8203;10122](https://github.com/phpstan/phpstan/issues/10122), [#&#8203;10187](https://github.com/phpstan/phpstan/issues/10187), thanks [@&#8203;staabm](https://github.com/staabm)! - Do not generalize big array when combined with empty array ([#&#8203;3003](https://github.com/phpstan/phpstan-src/pull/3003)), [#&#8203;10834](https://github.com/phpstan/phpstan/issues/10834), thanks [@&#8203;RobertMe](https://github.com/RobertMe)! - Fix string concatenation with benevolent union type (https://github.com/phpstan/phpstan-src/commit/4a4c739f9ff85b6c73659c21f8f3b8b7af8c82c9), [#&#8203;10863](https://github.com/phpstan/phpstan/issues/10863) - Treat `get_defined_vars()` as using constructor arguments ([#&#8203;3012](https://github.com/phpstan/phpstan-src/pull/3012)), [#&#8203;10865](https://github.com/phpstan/phpstan/issues/10865), thanks [@&#8203;rvanvelzen](https://github.com/rvanvelzen)! - Allow undefined variables passed into by-ref parameters only if the type is nullable (https://github.com/phpstan/phpstan-src/commit/7f8f9cce7f3903e505916c7afe04b7912570b5e2, https://github.com/phpstan/phpstan-src/commit/7961f7ae1fe815b0796e4d73717f1b117d4a7163), [#&#8203;1916](https://github.com/phpstan/phpstan/issues/1916) # Function signature fixes 🤖 - More precise `gc_status()` signature for PHP8.3+ ([#&#8203;2996](https://github.com/phpstan/phpstan-src/pull/2996)), thanks [@&#8203;staabm](https://github.com/staabm)! - Add object shape for `mysqli_result::fetch_fields` ([#&#8203;3005](https://github.com/phpstan/phpstan-src/pull/3005)), thanks [@&#8203;schlndh](https://github.com/schlndh)! # Internals 🔍 - composer-dependency-analyser: update to 1.5.0 (support functions) ([#&#8203;3011](https://github.com/phpstan/phpstan-src/pull/3011)), thanks [@&#8203;janedbal](https://github.com/janedbal)! ### [`v1.10.66`](https://github.com/phpstan/phpstan/releases/tag/1.10.66) [Compare Source](https://github.com/phpstan/phpstan/compare/1.10.65...1.10.66) # Improvements 🔧 - Detect mismatch between readonly/non-readonly class parent (https://github.com/phpstan/phpstan-src/commit/986cbdfb2fd0c3de71b31ac3f212bd499d2131e1), [#&#8203;10789](https://github.com/phpstan/phpstan/issues/10789) - TypeInferenceTestCase - fix for performance problem with PHPUnit 11 (https://github.com/phpstan/phpstan-src/commit/da87a6541f97b01e35d309524f05c0d3d0bc0a00), [#&#8203;10757](https://github.com/phpstan/phpstan/issues/10757) # Bugfixes 🐛 - `array_push` preserves list (https://github.com/phpstan/phpstan-src/commit/5473b6701c1a9dd3ca1eb676b3b2c0dec43f2535) # Function signature fixes 🤖 - Fix `redis::get` signature ([#&#8203;2990](https://github.com/phpstan/phpstan-src/pull/2990)), thanks [@&#8203;VincentLanglet](https://github.com/VincentLanglet)! # Internals 🔍 - Prevent unnecessary calls into reflection from JSON extensions ([#&#8203;2994](https://github.com/phpstan/phpstan-src/pull/2994)), thanks [@&#8203;staabm](https://github.com/staabm)! ### [`v1.10.65`](https://github.com/phpstan/phpstan/releases/tag/1.10.65) [Compare Source](https://github.com/phpstan/phpstan/compare/1.10.64...1.10.65) # Improvements 🔧 - Fix slow enum cases union with lots of cases ([#&#8203;2985](https://github.com/phpstan/phpstan-src/pull/2985)), [#&#8203;10772](https://github.com/phpstan/phpstan/issues/10772), thanks [@&#8203;staabm](https://github.com/staabm)! # Bugfixes 🐛 - Update BetterReflection ([#&#8203;2988](https://github.com/phpstan/phpstan-src/pull/2988)) - Fix ReflectionSourceStubber compatibility before PHP 8.1 (https://github.com/ondrejmirtes/BetterReflection/commit/94ca1336c58332604a74012d20286a240db376ea), https://github.com/larastan/larastan/pull/1882 - Fix trait method visibility (https://github.com/ondrejmirtes/BetterReflection/commit/d6153d513eb9111f01740394c61ff72142030089?w=1) # Function signature fixes 🤖 - Add benevolent union return types ([#&#8203;2986](https://github.com/phpstan/phpstan-src/pull/2986)), thanks [@&#8203;zonuexe](https://github.com/zonuexe)! # Internals 🔍 - Add more tests for issue [#&#8203;10622](https://github.com/phpstan/phpstan/issues/10622) ([#&#8203;2961](https://github.com/phpstan/phpstan-src/pull/2961)), thanks [@&#8203;mvorisek](https://github.com/mvorisek)! - Remove unnecessary method calls in ClassReflection ([#&#8203;2984](https://github.com/phpstan/phpstan-src/pull/2984)), thanks [@&#8203;staabm](https://github.com/staabm)! - Use `TrinaryLogic::describe()` in test (https://github.com/phpstan/phpstan-src/commit/222a66cdbf67f2ae367b251ed56acda53a3d8286) ### [`v1.10.64`](https://github.com/phpstan/phpstan/releases/tag/1.10.64) [Compare Source](https://github.com/phpstan/phpstan/compare/1.10.63...1.10.64) # Bleeding edge 🔪 - 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 *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](https://phpstan.org/blog/what-is-bleeding-edge)* # Improvements 🔧 - Introduce `ForbiddenClassNameExtension` for append additional forbidden class prefixes ([#&#8203;2979](https://github.com/phpstan/phpstan-src/pull/2979)), thanks [@&#8203;kamil-zacek](https://github.com/kamil-zacek)! - Add `AlwaysUsedMethodExtension` ([#&#8203;2927](https://github.com/phpstan/phpstan-src/pull/2927)), thanks [@&#8203;axlon](https://github.com/axlon)! - Warn about possibly stale result cache with custom extensions (https://github.com/phpstan/phpstan-src/commit/9338fdfe1611f742c65c61e5035315e1d64c4972) - This is how it looks: https://twitter.com/OndrejMirtes/status/1770024563113390437 # Bugfixes 🐛 - Fix deprecated parameter order ([#&#8203;2971](https://github.com/phpstan/phpstan-src/pull/2971)), thanks [@&#8203;sayuprc](https://github.com/sayuprc)! # Function signature fixes 🤖 - Fix `DOMDocument::load` return type ([#&#8203;2975](https://github.com/phpstan/phpstan-src/pull/2975)), thanks [@&#8203;VincentLanglet](https://github.com/VincentLanglet)! - Fix `SplObjectStorage::removeAll/Except` ([#&#8203;2892](https://github.com/phpstan/phpstan-src/pull/2892)), thanks [@&#8203;schlndh](https://github.com/schlndh)! ### [`v1.10.63`](https://github.com/phpstan/phpstan/releases/tag/1.10.63) [Compare Source](https://github.com/phpstan/phpstan/compare/1.10.62...1.10.63) # Improvements 🔧 - Resolve PHPStan issue with deprecated parameter order in PHP 8.1 and 8.3 ([#&#8203;2963](https://github.com/phpstan/phpstan-src/pull/2963)), thanks [@&#8203;sayuprc](https://github.com/sayuprc)! - Update nikic/php-parser (https://github.com/phpstan/phpstan-src/commit/7ceeb2195031ca71e71f9f70b2570c8a73201048, https://github.com/phpstan/phpstan-src/commit/063f6a866c52cd054d37c5decbbbbc2743ae5f55) - Solve duplicates in UnionType description ([#&#8203;2973](https://github.com/phpstan/phpstan-src/pull/2973)), thanks [@&#8203;VincentLanglet](https://github.com/VincentLanglet)! # Bugfixes 🐛 - Revert "Update nette/di" (https://github.com/phpstan/phpstan-src/commit/969ff31ab29cd424aab2b2e32344a1825093bdea), [#&#8203;10727](https://github.com/phpstan/phpstan/issues/10727) - Fix password_hash algo constant passing on PHP <7.4 (https://github.com/phpstan/phpstan-src/commit/fc4e5891f786d0db1f509a11516eca58adb1eb67), [#&#8203;9246](https://github.com/phpstan/phpstan/issues/9246) - ArrayType - use `getIterableKeyType()`, it preserves array-key (https://github.com/phpstan/phpstan-src/commit/d5bf23b18f0c7484771c0298a6cd5359345eab94), [#&#8203;9307](https://github.com/phpstan/phpstan/issues/9307) # Function signature fixes 🤖 - Add false return type to `exec()` ([#&#8203;2974](https://github.com/phpstan/phpstan-src/pull/2974)), thanks [@&#8203;VincentLanglet](https://github.com/VincentLanglet)! # Internals 🔍 - Cleanup `AnalyserIntegrationTest->runAnalyse()` ([#&#8203;2960](https://github.com/phpstan/phpstan-src/pull/2960)), thanks [@&#8203;staabm](https://github.com/staabm)! - `ReflectionProvider::hasClass()` narrows `$className` arg ([#&#8203;2976](https://github.com/phpstan/phpstan-src/pull/2976)), thanks [@&#8203;staabm](https://github.com/staabm)! ### [`v1.10.62`](https://github.com/phpstan/phpstan/releases/tag/1.10.62) [Compare Source](https://github.com/phpstan/phpstan/compare/1.10.61...1.10.62) # Improvements 🔧 - Too wide return type - report for conditional return types (https://github.com/phpstan/phpstan-src/commit/de1c07ea68c36854b46c43ee575145ad4ae2386a) # Bugfixes 🐛 - Constants deprecation depends on PHP version in comment ([#&#8203;2967](https://github.com/phpstan/phpstan-src/pull/2967)), [#&#8203;10700](https://github.com/phpstan/phpstan/issues/10700), thanks [@&#8203;staabm](https://github.com/staabm)! - Make `@param-out` work even if it is the only conditional type in a function signature (https://github.com/phpstan/phpstan-src/commit/787c1e2b46a40ccac9bb254fd45204a310f6ff2f) - ParameterOutAssignedTypeRule - fix for conditional types (https://github.com/phpstan/phpstan-src/commit/19497ba0317be7e37f2c969118c93ce3be1e6fd2) - ParameterOutExecutionEndTypeRule - fix for conditional types (https://github.com/phpstan/phpstan-src/commit/27c73f7f67ba74688d4ed0b3b0f5c0c3a9c60012) - Too wide `@param-out` - fix for conditional types (https://github.com/phpstan/phpstan-src/commit/5a4789339e5768628bf9bb2abdf38eff135553cd) ### [`v1.10.61`](https://github.com/phpstan/phpstan/releases/tag/1.10.61) [Compare Source](https://github.com/phpstan/phpstan/compare/1.10.60...1.10.61) # Improvements 🔧 - Update BetterReflection to 6.25.0 - Implement PHP Version dependent deprecations for constants (https://github.com/Roave/BetterReflection/pull/1396), thanks [@&#8203;staabm](https://github.com/staabm)! - Support for `final` modifier in traits (https://github.com/Roave/BetterReflection/pull/1383), thanks [@&#8203;kukulich](https://github.com/kukulich)! - Support for conditional types in `@param-out` (https://github.com/phpstan/phpstan-src/commit/effad95da555c2b6c7b305178a221e84c831df61), [#&#8203;10699](https://github.com/phpstan/phpstan/issues/10699) - Check conditional types in `@param-out` (https://github.com/phpstan/phpstan-src/commit/67f9420cba9fa45501cdca87770d50c5c22bd508) # Bugfixes 🐛 - Too wide `@param-out` type - consider all execution ends at once (https://github.com/phpstan/phpstan-src/commit/d1bcf786eedbce9fee74f43f080678fa7788e4e3), [#&#8203;10687](https://github.com/phpstan/phpstan/issues/10687), [#&#8203;10684](https://github.com/phpstan/phpstan/issues/10684) # Internals 🔍 - MethodReturnStatementsNode - use ExtendedMethodReflection (https://github.com/phpstan/phpstan-src/commit/3cc1a545641b172b2cb1e89030cde9baa6b0c527) ### [`v1.10.60`](https://github.com/phpstan/phpstan/releases/tag/1.10.60) [Compare Source](https://github.com/phpstan/phpstan/compare/1.10.59...1.10.60) [**Learn more about this release**](https://phpstan.org/blog/enhancements-in-handling-parameters-passed-by-reference) in an article on phpstan.org! # Major new features 🚀 - Generic `@method` tags: `@method T doFoo<T>(T $p)`, [#&#8203;6371](https://github.com/phpstan/phpstan/issues/6371) - [Learn more](https://twitter.com/OndrejMirtes/status/1760994823073370509) - [#&#8203;2931](https://github.com/phpstan/phpstan-src/pull/2931), [#&#8203;2935](https://github.com/phpstan/phpstan-src/pull/2935), thanks [@&#8203;mad-briller](https://github.com/mad-briller)! - Generic callable types: `callable<T>(T): T`, [#&#8203;8964](https://github.com/phpstan/phpstan/issues/8964) - [#&#8203;2938](https://github.com/phpstan/phpstan-src/pull/2938), [#&#8203;2945](https://github.com/phpstan/phpstan-src/pull/2945), [#&#8203;2946](https://github.com/phpstan/phpstan-src/pull/2946), thanks [@&#8203;mad-briller](https://github.com/mad-briller)! - Error on references of prefixed internal class names from PHAR files ([#&#8203;2932](https://github.com/phpstan/phpstan-src/pull/2932)), thanks [@&#8203;staabm](https://github.com/staabm)! # Bleeding edge 🔪 - **Enhancements in Handling Parameters Passed by Reference** - [Learn more on phpstan.org](https://phpstan.org/blog/enhancements-in-handling-parameters-passed-by-reference) - [#&#8203;2941](https://github.com/phpstan/phpstan-src/pull/2941), thanks [@&#8203;ljmaskey](https://github.com/ljmaskey)! - Add option `reportAnyTypeWideningInVarTag` ([#&#8203;2840](https://github.com/phpstan/phpstan-src/pull/2840)), thanks [@&#8203;janedbal](https://github.com/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](https://phpstan.org/blog/what-is-bleeding-edge)* # Improvements 🔧 - Add support for constructor assertions ([#&#8203;2950](https://github.com/phpstan/phpstan-src/pull/2950)), [#&#8203;10645](https://github.com/phpstan/phpstan/issues/10645), thanks [@&#8203;axlon](https://github.com/axlon)! - Report uses of deprecated constants ([#&#8203;2953](https://github.com/phpstan/phpstan-src/pull/2953)), thanks [@&#8203;staabm](https://github.com/staabm)! # Bugfixes 🐛 - Fix how union of callables is understood ([#&#8203;2902](https://github.com/phpstan/phpstan-src/pull/2902)), [#&#8203;10442](https://github.com/phpstan/phpstan/issues/10442), thanks [@&#8203;mad-briller](https://github.com/mad-briller)! - Fix for inferring closure parameter type from callable union (https://github.com/phpstan/phpstan-src/commit/c10476d268bedc5e7bc66b44d160a453edb1cacb) - ArrayType - string offset might exist as integer offset ([#&#8203;2928](https://github.com/phpstan/phpstan-src/pull/2928)), [#&#8203;10610](https://github.com/phpstan/phpstan/issues/10610), thanks [@&#8203;michalbundyra](https://github.com/michalbundyra)! - Truncate description of huge UnionType (https://github.com/phpstan/phpstan-src/commit/039a3dc135bf9f23971437ebd4718291a1404d2d), [#&#8203;10614](https://github.com/phpstan/phpstan/issues/10614) - fix type of `$a?->b::c()` and `$a?->b::$c` ([#&#8203;2933](https://github.com/phpstan/phpstan-src/pull/2933)), thanks [@&#8203;schlndh](https://github.com/schlndh)! - fix `fn() => __FUNCTION__` and `__METHOD__` ([#&#8203;2934](https://github.com/phpstan/phpstan-src/pull/2934)), thanks [@&#8203;schlndh](https://github.com/schlndh)! - Some sort functions do not preserve a list (https://github.com/phpstan/phpstan-src/commit/034f7313064b207883a13f1e25a76975560215b9, https://github.com/phpstan/phpstan-src/commit/0977a7b0259cbe4055c6fb0200708b2ec137d770), [#&#8203;10627](https://github.com/phpstan/phpstan/issues/10627) - ArgumentsNormalizer - keep named arguments for unknown parameters (https://github.com/phpstan/phpstan-src/commit/ad34452cb12cdebd19c80a3f34ef2819c2e37bbb), [#&#8203;10628](https://github.com/phpstan/phpstan/issues/10628) - Check `T of mixed&Foo` and `T of mixed|Foo` ([#&#8203;2940](https://github.com/phpstan/phpstan-src/pull/2940)), thanks [@&#8203;schlndh](https://github.com/schlndh)! - Use narrowed conditional type if/else types for subtype checks ([#&#8203;2948](https://github.com/phpstan/phpstan-src/pull/2948)), [#&#8203;10622](https://github.com/phpstan/phpstan/issues/10622), thanks [@&#8203;rvanvelzen](https://github.com/rvanvelzen)! - Fix `isSuperTypeOf` of callable/Closure when parameter count differ ([#&#8203;2949](https://github.com/phpstan/phpstan-src/pull/2949)), [#&#8203;10594](https://github.com/phpstan/phpstan/issues/10594), thanks [@&#8203;takaram](https://github.com/takaram)! # Function signature fixes 🤖 - Fix `ReflectionFunctionAbstract::getExtension` return type (https://github.com/phpstan/phpstan-src/commit/2ece1f82b0e95541908f052d74a1cb29f2a4b4b7) - Correct return type of `date_sun_info()` function ([#&#8203;2947](https://github.com/phpstan/phpstan-src/pull/2947)), thanks [@&#8203;zonuexe](https://github.com/zonuexe)! - Fix return values of `mysqli get_warnings` ([#&#8203;2929](https://github.com/phpstan/phpstan-src/pull/2929)), thanks [@&#8203;janedbal](https://github.com/janedbal)! # Internals 🔍 - Replace composer-require-checker with composer-dependency-analyser ([#&#8203;2875](https://github.com/phpstan/phpstan-src/pull/2875)), thanks [@&#8203;janedbal](https://github.com/janedbal)! - Use `Type::isNull()` in `Nullsafe(MethodCall|PropertyFetch)Rule` ([#&#8203;2942](https://github.com/phpstan/phpstan-src/pull/2942)), thanks [@&#8203;takaram](https://github.com/takaram)! ### [`v1.10.59`](https://github.com/phpstan/phpstan/releases/tag/1.10.59) [Compare Source](https://github.com/phpstan/phpstan/compare/1.10.58...1.10.59) # Bleeding edge 🔪 - `array_values` rule (report when a `list` type is always passed in) ([#&#8203;2917](https://github.com/phpstan/phpstan-src/pull/2917)), thanks [@&#8203;kamil-zacek](https://github.com/kamil-zacek)! *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](https://phpstan.org/blog/what-is-bleeding-edge)* # Improvements 🔧 - ArrayFilterRule - tip message about `treatPhpDocTypesAsCertain` (https://github.com/phpstan/phpstan-src/commit/f5b198c9801282d7002f5310d5ff5318eec54465) - ArgumentsNormalizer - skip unused arguments in non-variadic signatures, still return a normalized call (https://github.com/phpstan/phpstan-src/commit/17e5bac093c3695a449cf54a2193e74677c0223f) - Methods in fluent interfaces are considered impure (https://github.com/phpstan/phpstan-src/commit/b0261263e2e3a3643a9a89eb0931c07d8e71dc18) - Add type-specifying extension for `settype()` ([#&#8203;2920](https://github.com/phpstan/phpstan-src/pull/2920)), thanks [@&#8203;ChrisBrenton](https://github.com/ChrisBrenton)! # Bugfixes 🐛 - MethodAssertRule - do not report implicitly inherited assert tags (https://github.com/phpstan/phpstan-src/commit/299df5130a14d5a23073edb044b46209ee7b5426), [#&#8203;10573](https://github.com/phpstan/phpstan/issues/10573) - Gets rid of the annoying error "Asserted type ... with type ... does not narrow down the type." - ConstantArrayType - string offset might exist as integer offset (https://github.com/phpstan/phpstan-src/commit/2fb66328fdd7119922ce4579f8951ee776320ef6), [#&#8203;10577](https://github.com/phpstan/phpstan/issues/10577) # Internals 🔍 - Parallelize levels tests ([#&#8203;2916](https://github.com/phpstan/phpstan-src/pull/2916)), thanks [@&#8203;staabm](https://github.com/staabm)! - `FunctionReflection::isPure()` and `ExtendedMethodReflection::isPure()` (https://github.com/phpstan/phpstan-src/commit/03d01eae4a59592f7388bc46b14e5db8eff57df8) ### [`v1.10.58`](https://github.com/phpstan/phpstan/releases/tag/1.10.58) [Compare Source](https://github.com/phpstan/phpstan/compare/1.10.57...1.10.58) # Improvements 🔧 - Verify property type after `unset` (https://github.com/phpstan/phpstan-src/commit/aeadbe28e0b0a05a3a48723ac310cf6c0d852711), [#&#8203;10506](https://github.com/phpstan/phpstan/issues/10506), [#&#8203;6773](https://github.com/phpstan/phpstan/issues/6773) # Bugfixes 🐛 - InvalidThrowsPhpDocValueRule: support `@phpstan-require-extends` ([#&#8203;2890](https://github.com/phpstan/phpstan-src/pull/2890)), [#&#8203;10475](https://github.com/phpstan/phpstan/issues/10475), thanks [@&#8203;RobertMe](https://github.com/RobertMe)! - `sort()`, `rsort()` and `usort()` convert an array to list ([#&#8203;2891](https://github.com/phpstan/phpstan-src/pull/2891)), [#&#8203;6467](https://github.com/phpstan/phpstan/issues/6467), [#&#8203;10423](https://github.com/phpstan/phpstan/issues/10423), [#&#8203;3312](https://github.com/phpstan/phpstan/issues/3312), thanks [@&#8203;takaram](https://github.com/takaram)! - Fix stale result cache with imported type aliases ([#&#8203;2894](https://github.com/phpstan/phpstan-src/pull/2894)), [#&#8203;10449](https://github.com/phpstan/phpstan/issues/10449), thanks [@&#8203;staabm](https://github.com/staabm)! - Avoid internal error with `T<X>` where `T` bound consist of intersection type (https://github.com/phpstan/phpstan-src/commit/778b56999967ed2fb6630462fe26fdb1e022bba7), [#&#8203;10509](https://github.com/phpstan/phpstan/issues/10509) - Recognize `[1 => 'method', 0 => $obj]` as callable ([#&#8203;2896](https://github.com/phpstan/phpstan-src/pull/2896)), [#&#8203;10502](https://github.com/phpstan/phpstan/issues/10502), thanks [@&#8203;staabm](https://github.com/staabm)! - SprintfFunctionDynamicReturnTypeExtension - limit combinatorial explosion (https://github.com/phpstan/phpstan-src/commit/51cffd49dcf08e17f201f3fb70c29a589d94a234), [#&#8203;10538](https://github.com/phpstan/phpstan/issues/10538) - Fix implicit `@phpstan-assert` PHPDoc inheritance with generics ([#&#8203;2909](https://github.com/phpstan/phpstan-src/pull/2909)), [#&#8203;10037](https://github.com/phpstan/phpstan/issues/10037), [#&#8203;9123](https://github.com/phpstan/phpstan/issues/9123), thanks [@&#8203;RobertMe](https://github.com/RobertMe)! # Internals 🔍 - Prevent unnecessary `isSuperTypeOf()` calls ([#&#8203;2895](https://github.com/phpstan/phpstan-src/pull/2895)), thanks [@&#8203;staabm](https://github.com/staabm)! - Simplify `ClassPropertiesNode->getUninitializedProperties()` ([#&#8203;2899](https://github.com/phpstan/phpstan-src/pull/2899)), thanks [@&#8203;staabm](https://github.com/staabm)! ### [`v1.10.57`](https://github.com/phpstan/phpstan/releases/tag/1.10.57) [Compare Source](https://github.com/phpstan/phpstan/compare/1.10.56...1.10.57) # Bleeding edge 🔪 - Fix checking generic `mixed` type based on config ([#&#8203;2885](https://github.com/phpstan/phpstan-src/pull/2885)), thanks [@&#8203;schlndh](https://github.com/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](https://phpstan.org/blog/what-is-bleeding-edge)* # Improvements 🔧 - Update `ClassReflection::getConstant()` return type (https://github.com/phpstan/phpstan-src/commit/8d4ea60a5710bff1b95c918c2a3ee948fc35bae7) - Cover `ClassConstantReflection` with BC promise (https://github.com/phpstan/phpstan-src/commit/8f82b799c5e65424d85a79ffdc60b3ea14d95731) # Bugfixes 🐛 - Preserve TemplateTypeArray when merging array types (https://github.com/phpstan/phpstan-src/commit/8342785e39da26631f5f2d972de1fe39f3aeafeb), [#&#8203;10445](https://github.com/phpstan/phpstan/issues/10445) - Fix `array_filter` callback return type (https://github.com/phpstan/phpstan-src/commit/59ae706f1333da5de88224a04bfec71a1a8d6acd) - Fix undefined XMLReader properties with local phpstorm-stubs patch (https://github.com/phpstan/phpstan-src/commit/2d364d781c551002ed2a648447b04401744b4b6f), [#&#8203;8629](https://github.com/phpstan/phpstan/issues/8629) - Fix spaceship operator for large constant unions ([#&#8203;2886](https://github.com/phpstan/phpstan-src/pull/2886)), thanks [@&#8203;schlndh](https://github.com/schlndh)! - MissingClassConstantTypehintRule should not apply to native types (https://github.com/phpstan/phpstan-src/commit/6363932c56678f5d49a960f65b09fb2c11cd7dd3) - Do not generalize class-level `@template` type in method call (https://github.com/phpstan/phpstan-src/commit/11268e5eebb2b147007fdc4902d91a3418175594), [#&#8203;10473](https://github.com/phpstan/phpstan/issues/10473) # Function signature fixes 🤖 - `curl_multi_init()` cannot return false ([#&#8203;2882](https://github.com/phpstan/phpstan-src/pull/2882)), thanks [@&#8203;staabm](https://github.com/staabm)! - `error_log()` is impure ([#&#8203;2884](https://github.com/phpstan/phpstan-src/pull/2884)), thanks [@&#8203;staabm](https://github.com/staabm)! ### [`v1.10.56`](https://github.com/phpstan/phpstan/releases/tag/1.10.56) [Compare Source](https://github.com/phpstan/phpstan/compare/1.10.55...1.10.56) # Major new feature 🚀 - New PHPDoc tags: `@phpstan-require-extends`, `@phpstan-require-implements`, [#&#8203;10302](https://github.com/phpstan/phpstan/issues/10302), [#&#8203;9899](https://github.com/phpstan/phpstan/issues/9899), [#&#8203;8550](https://github.com/phpstan/phpstan/issues/8550), thanks [@&#8203;staabm](https://github.com/staabm)! - Learn more: [Making `@property` PHPDoc above interfaces work on PHP 8.2+](https://phpstan.org/blog/solving-phpstan-access-to-undefined-property#making-%40property-phpdoc-above-interfaces-work-on-php-8.2%2B) - [Enforcing class inheritance for interfaces and traits](https://phpstan.org/writing-php-code/phpdocs-basics#enforcing-class-inheritance-for-interfaces-and-traits) - [Enforcing implementing an interface for traits](https://phpstan.org/writing-php-code/phpdocs-basics#enforcing-implementing-an-interface-for-traits) - Development of this feature was kindly sponsored by [Pixel & Tonic](https://pixelandtonic.com/), the team behind [Craft CMS](https://craftcms.com/) # Improvements 🔧 - Scope - function call stack includes parameters too (https://github.com/phpstan/phpstan-src/commit/b87e5c4c7e33a91c61341f0335a221c32df603b2), https://github.com/phpstan/phpstan-deprecation-rules/issues/107 # Bugfixes 🐛 - Process `match` arm condition before analysing the body (https://github.com/phpstan/phpstan-src/commit/2b74aa85b87e85bbc2398b96b1bff07234b1f791), [#&#8203;10418](https://github.com/phpstan/phpstan/issues/10418) # Function signature fixes 🤖 - Fix transliterator function maps ([#&#8203;2862](https://github.com/phpstan/phpstan-src/pull/2862)), thanks [@&#8203;PrinsFrank](https://github.com/PrinsFrank)! - Fix duplicate array key `Yaf_Response_Http::__clone` ([#&#8203;2863](https://github.com/phpstan/phpstan-src/pull/2863)), thanks [@&#8203;PrinsFrank](https://github.com/PrinsFrank)! - Add array shape for `transliterator::listIDs` return type ([#&#8203;2865](https://github.com/phpstan/phpstan-src/pull/2865)), thanks [@&#8203;PrinsFrank](https://github.com/PrinsFrank)! - `strtok()` always returns a `non-empty-string` when it does not return false ([#&#8203;2869](https://github.com/phpstan/phpstan-src/pull/2869)), thanks [@&#8203;staabm](https://github.com/staabm)! # Internals 🔍 - Prevent repetative calls to `Type::getConstantArrays()` ([#&#8203;2864](https://github.com/phpstan/phpstan-src/pull/2864)), thanks [@&#8203;staabm](https://github.com/staabm)! - Remove redundant condition in ParametersAcceptorSelector ([#&#8203;2867](https://github.com/phpstan/phpstan-src/pull/2867)), thanks [@&#8203;mad-briller](https://github.com/mad-briller)! - Simplify default return path in extensions ([#&#8203;2868](https://github.com/phpstan/phpstan-src/pull/2868)), thanks [@&#8203;staabm](https://github.com/staabm)! - Reduce unnecessary calls to `Scope::getFunctionType()` ([#&#8203;2872](https://github.com/phpstan/phpstan-src/pull/2872)), thanks [@&#8203;staabm](https://github.com/staabm)! ### [`v1.10.55`](https://github.com/phpstan/phpstan/releases/tag/1.10.55) [Compare Source](https://github.com/phpstan/phpstan/compare/1.10.54...1.10.55) # Improvements 🔧 - PHPDoc tag `@phpstan-ignore-next-line` works for first line below the PHPDoc even in bleeding edge (https://github.com/phpstan/phpstan-src/commit/8b6260c21bacbfd653d26b9a8abef7996fd3fe46), [#&#8203;10383](https://github.com/phpstan/phpstan/issues/10383), https://github.com/phpstan/phpstan/discussions/10374 - Add `open-resource` type (https://github.com/phpstan/phpstan-src/commit/bbd9a68478abbc500b6398968cc85d0d1ae8d3eb), [#&#8203;10399](https://github.com/phpstan/phpstan/issues/10399) - Optimize repeated container creation in tests ([#&#8203;2860](https://github.com/phpstan/phpstan-src/pull/2860)), thanks [@&#8203;schlndh](https://github.com/schlndh)! - Try to prevent error with PHP-Parser 5 when running PHPUnit tests (https://github.com/phpstan/phpstan-src/commit/9dac90dfd5fc809dd84fdac0532ecd51c6ae66bf), [#&#8203;10401](https://github.com/phpstan/phpstan/issues/10401), thanks [@&#8203;zonuexe](https://github.com/zonuexe)! # Bugfixes 🐛 - Fix mixing property and param attributes on promoted property ([#&#8203;2825](https://github.com/phpstan/phpstan-src/pull/2825)), [#&#8203;10385](https://github.com/phpstan/phpstan/issues/10385) - Fix detection of shadowed trait methods (https://github.com/phpstan/phpstan-src/commit/22700511d91b748240da0ac8b697f2ab409aad21), [#&#8203;10377](https://github.com/phpstan/phpstan/issues/10377) - Fix int-range return type for range() ([#&#8203;2792](https://github.com/phpstan/phpstan-src/pull/2792)), [#&#8203;10213](https://github.com/phpstan/phpstan/issues/10213), [#&#8203;9573](https://github.com/phpstan/phpstan/issues/9573), thanks [@&#8203;dantleech](https://github.com/dantleech)! # Internals 🔍 - Remove unused DirectClassReflectionExtensionRegistryProvider ([#&#8203;2857](https://github.com/phpstan/phpstan-src/pull/2857)), thanks [@&#8203;staabm](https://github.com/staabm)! - Plumbing for `@phpstan-require-extends` and `@phpstan-require-implements` ([#&#8203;2856](https://github.com/phpstan/phpstan-src/pull/2856)), thanks [@&#8203;staabm](https://github.com/staabm)! - `Scope::getFunctionCallStack()` (https://github.com/phpstan/phpstan-src/commit/9be137675ebc41be5c9c7c230f96cab4dbf1f08e), https://github.com/phpstan/phpstan-deprecation-rules/issues/106 ### [`v1.10.54`](https://github.com/phpstan/phpstan/releases/tag/1.10.54) [Compare Source](https://github.com/phpstan/phpstan/compare/1.10.53...1.10.54) # Bleeding edge 🔪 - Revert "ParamAttributesRule - promoted property attribute needs to target both parameters and properties" (https://github.com/phpstan/phpstan-src/commit/02f66df2a2997ad39ee25c92b6a7f7102f09514f), [#&#8203;10385](https://github.com/phpstan/phpstan/issues/10385) - See PHP internals discussion: https://externals.io/message/111942#112021 *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](https://phpstan.org/blog/what-is-bleeding-edge)* # Improvements 🔧 - UsedNamesRule - level 0 ([#&#8203;2849](https://github.com/phpstan/phpstan-src/pull/2849)), thanks [@&#8203;lulco](https://github.com/lulco)! # Bugfixes 🐛 - Simplify TooWideClosureReturnTypehintRule (https://github.com/phpstan/phpstan-src/commit/a81df66485ea7c94655d70f322775e84bef871f9) - Fix falsy isset for all expressions (https://github.com/phpstan/phpstan-src/commit/af14d50e2b5d1b2cf91813059cdc827be63fdb20), [#&#8203;10373](https://github.com/phpstan/phpstan/issues/10373) ### [`v1.10.53`](https://github.com/phpstan/phpstan/releases/tag/1.10.53) [Compare Source](https://github.com/phpstan/phpstan/compare/1.10.52...1.10.53) # Improvements 🔧 - Impl `str_increment` / `str_decrement` return type extension ([#&#8203;2776](https://github.com/phpstan/phpstan-src/pull/2776)), thanks [@&#8203;zonuexe](https://github.com/zonuexe)! # Bugfixes 🐛 - Fix loading polyfills twice (https://github.com/phpstan/phpstan/commit/3e7c7c7c6306157e6967ef436e952aeba1097edb?w=1), [#&#8203;10387](https://github.com/phpstan/phpstan/issues/10387) - `array_udiff()` comparator return type is too strict ([#&#8203;2822](https://github.com/phpstan/phpstan-src/pull/2822)), [#&#8203;9697](https://github.com/phpstan/phpstan/issues/9697), thanks [@&#8203;staabm](https://github.com/staabm)! # Internals 🔍 - Simplify default return path in extensions ([#&#8203;2816](https://github.com/phpstan/phpstan-src/pull/2816)), thanks [@&#8203;staabm](https://github.com/staabm)! ### [`v1.10.52`](https://github.com/phpstan/phpstan/releases/tag/1.10.52) [Compare Source](https://github.com/phpstan/phpstan/compare/1.10.51...1.10.52) # Improvements 🔧 - Do not allow to generate baseline when reflection error occurs (https://github.com/phpstan/phpstan-src/commit/78ea9a621093cde38dd382cc67557c8b211589d8) - Show internal errors that occured when generating a baseline (https://github.com/phpstan/phpstan-src/commit/c997ea9eefb8a57f5e273cff3b3338f423e755b6) # Bugfixes 🐛 - Load PHP polyfills in bootstrap.php (https://github.com/phpstan/phpstan/commit/21df2d347a49a51b3377e4b6553aa110e7072eb6), [#&#8203;10375](https://github.com/phpstan/phpstan/issues/10375) ### [`v1.10.51`](https://github.com/phpstan/phpstan/releases/tag/1.10.51) [Compare Source](https://github.com/phpstan/phpstan/compare/1.10.50...1.10.51) # Bleeding edge 🔪 - ParamAttributesRule - promoted property attribute needs to target both parameters and properties (https://github.com/phpstan/phpstan-src/commit/25d15526dbe59216f2b42aaa88a2be23bf9cbf44), [#&#8203;10298](https://github.com/phpstan/phpstan/issues/10298) - More precise `RecursiveIteratorIterator::__construct()` parameter types ([#&#8203;2835](https://github.com/phpstan/phpstan-src/pull/2835)), thanks [@&#8203;staabm](https://github.com/staabm)! - PhpDocParser: add config for lines in its AST & enable ignoring errors within PHPDocs ([#&#8203;2807](https://github.com/phpstan/phpstan-src/pull/2807)), thanks [@&#8203;janedbal](https://github.com/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](https://phpstan.org/blog/what-is-bleeding-edge)* # Improvements 🔧 - Missing ThrowExprTypeRule - level 3 (https://github.com/phpstan/phpstan-src/commit/0359ebc78fa7bc5ed1b3b4032c68363ce70ab673) - Analyse stubs only when not only files are analysed (https://github.com/phpstan/phpstan-src/commit/402024091b215dca7d91b74c415293323d2dbadc) - Nicer error message in case of memory limit exhaustion in child process (https://github.com/phpstan/phpstan-src/commit/816be99361d263df24bf1e7fa078df62fb63d1d7) # Bugfixes 🐛 - Narrow `ReflectionEnum::getBackingType()` after `ReflectionEnum::isBacked()` ([#&#8203;2830](https://github.com/phpstan/phpstan-src/pull/2830)), [#&#8203;10167](https://github.com/phpstan/phpstan/issues/10167), thanks [@&#8203;staabm](https://github.com/staabm)! - Fix coalescing on an optional array offset ([#&#8203;2834](https://github.com/phpstan/phpstan-src/pull/2834)), [#&#8203;10317](https://github.com/phpstan/phpstan/issues/10317), thanks [@&#8203;rvanvelzen](https://github.com/rvanvelzen)! - More precise `??` type inference (https://github.com/phpstan/phpstan-src/commit/d801919e356a8cecc33b06046311aa036d2492ff), [#&#8203;10327](https://github.com/phpstan/phpstan/issues/10327) # Internals 🔍 - phpstan-src is now downgraded for PHP 7.2+ with [`ondrejmirtes/simple-downgrader`](https://github.com/ondrejmirtes/simple-downgrader) - Forward-compatible changes with PHP-Parser 5 (https://github.com/phpstan/phpstan-src/commit/436bd791bf256ca59334f2746e70a58d581d8574, https://github.com/phpstan/phpstan-src/commit/7eb66f6bd643fc95f8353b3b273c29514ddd8619, https://github.com/phpstan/phpstan-src/commit/bf0b138fbed6fb0960ca696869cc9f5f787d4261), [#&#8203;5086](https://github.com/phpstan/phpstan/issues/5086) - Use `str_starts_with()` and `str_contains()` instead of `strpos()` ([#&#8203;2841](https://github.com/phpstan/phpstan-src/pull/2841)), thanks [@&#8203;zonuexe](https://github.com/zonuexe)! - Building preload script - sort by name for reproducible builds (https://github.com/phpstan/phpstan-src/commit/995de26a4b8009c4e89159683c4e602290dbc508) - Lazier creation of ParameterAcceptor ([#&#8203;2843](https://github.com/phpstan/phpstan-src/pull/2843)), thanks [@&#8203;staabm](https://github.com/staabm)! - Use const instead of properties ([#&#8203;2815](https://github.com/phpstan/phpstan-src/pull/2815)), thanks [@&#8203;zonuexe](https://github.com/zonuexe)! - PhpDocValueRule: cheapest check first ([#&#8203;2824](https://github.com/phpstan/phpstan-src/pull/2824)), thanks [@&#8203;staabm](https://github.com/staabm)! - Faster `ParametersAcceptorSelector::combine()` ([#&#8203;2851](https://github.com/phpstan/phpstan-src/pull/2851)), thanks [@&#8203;staabm](https://github.com/staabm)! ### [`v1.10.50`](https://github.com/phpstan/phpstan/releases/tag/1.10.50) [Compare Source](https://github.com/phpstan/phpstan/compare/1.10.49...1.10.50) # Improvements 🔧 - Update `nikic/php-parser` to 4.18.0 (https://github.com/phpstan/phpstan-src/commit/24f92cc2a69cbeecefb8e2093c6db41138cc9398) # Bugfixes 🐛 - `VoidType` - accept `null` (https://github.com/phpstan/phpstan-src/commit/40c8fb2266f040158fb811ac13b21a3e179c022a), [#&#8203;10291](https://github.com/phpstan/phpstan/issues/10291) # Internals 🔍 - `InvalidPromotedPropertiesRule` - use `FunctionLike` as node type ([#&#8203;2823](https://github.com/phpstan/phpstan-src/pull/2823)), thanks [@&#8203;paulbalandan](https://github.com/paulbalandan)! - Deduplicate inferred template type generalization logic (https://github.com/phpstan/phpstan-src/commit/39fe102d23c8aec32b8c21225152e2d835d224b2) ### [`v1.10.49`](https://github.com/phpstan/phpstan/releases/tag/1.10.49) [Compare Source](https://github.com/phpstan/phpstan/compare/1.10.48...1.10.49) # Bleeding edge 🔪 - Do not generalize template types, except when in `GenericObjectType` ([#&#8203;2818](https://github.com/phpstan/phpstan-src/pull/2818), [#&#8203;2821](https://github.com/phpstan/phpstan-src/pull/2821)) - This fixes following **17 issues**: [#&#8203;8166](https://github.com/phpstan/phpstan/issues/8166), [#&#8203;8127](https://github.com/phpstan/phpstan/issues/8127), [#&#8203;7944](https://github.com/phpstan/phpstan/issues/7944), [#&#8203;7283](https://github.com/phpstan/phpstan/issues/7283), [#&#8203;6653](https://github.com/phpstan/phpstan/issues/6653), [#&#8203;6196](https://github.com/phpstan/phpstan/issues/6196), [#&#8203;9084](https://github.com/phpstan/phpstan/issues/9084), [#&#8203;8683](https://github.com/phpstan/phpstan/issues/8683), [#&#8203;8074](https://github.com/phpstan/phpstan/issues/8074), [#&#8203;7984](https://github.com/phpstan/phpstan/issues/7984), [#&#8203;7301](https://github.com/phpstan/phpstan/issues/7301), [#&#8203;7087](https://github.com/phpstan/phpstan/issues/7087), [#&#8203;5594](https://github.com/phpstan/phpstan/issues/5594), [#&#8203;5592](https://github.com/phpstan/phpstan/issues/5592), [#&#8203;9472](https://github.com/phpstan/phpstan/issues/9472), [#&#8203;9764](https://github.com/phpstan/phpstan/issues/9764), [#&#8203;10092](https://github.com/phpstan/phpstan/issues/10092) *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](https://phpstan.org/blog/what-is-bleeding-edge)* # Improvements 🔧 - Transform `void` return to `null` after call ([#&#8203;2778](https://github.com/phpstan/phpstan-src/pull/2778)), [#&#8203;6720](https://github.com/phpstan/phpstan/issues/6720), thanks [@&#8203;herndlm](https://github.com/herndlm)! # Bugfixes 🐛 - Fix `count(list)` regression ([#&#8203;2813](https://github.com/phpstan/phpstan-src/pull/2813)), thanks [@&#8203;staabm](https://github.com/staabm)! - Make AcceptsResult reasons unique (https://github.com/phpstan/phpstan-src/commit/01aabcff33c9f8cb0f6a04469a75cb3c47a014a2) # Function signature fixes 🤖 - Make `SimpleXMLElement` method return types benevolent (when they return `static|null`) (https://github.com/phpstan/phpstan-src/commit/fb76c9f7d324c854bd2da8bd542b2de6337410e4) ### [`v1.10.48`](https://github.com/phpstan/phpstan/releases/tag/1.10.48) [Compare Source](https://github.com/phpstan/phpstan/compare/1.10.47...1.10.48) # Bleeding edge 🔪 - TooWideMethodReturnTypehintRule - always report for final methods (https://github.com/phpstan/phpstan-src/commit/c30e9a484c8245b8126cd63444607ca74d2af761) - LogicalXorConstantConditionRule (https://github.com/phpstan/phpstan-src/commit/3a12724fd636b1bcf36c22b36e8f765d97150895, https://github.com/phpstan/phpstan-src/commit/3b011f6524254dad0f16840fdcfdbe7421548617), [#&#8203;7539](https://github.com/phpstan/phpstan/issues/7539) - NoopRule - report top-level `xor` because that's probably not what the user intended to do (https://github.com/phpstan/phpstan-src/commit/a1fffb3346e09f1e8e8d987d4282263295a55142), [#&#8203;10267](https://github.com/phpstan/phpstan/issues/10267) - Report unused results of `and` and `or` (https://github.com/phpstan/phpstan-src/commit/1d8fff637d70a9e9ed3f11dee5d61b9f796cbf1a) - Report unused result of ternary (https://github.com/phpstan/phpstan-src/commit/9664f7a9d2223c07e750f0dfc949c3accfa6b65e) - Report unused results of `&&` and `||` (https://github.com/phpstan/phpstan-src/commit/cf2c8bbd9ebd2ebe300dbd310e136ad603d7def3) *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](https://phpstan.org/blog/what-is-bleeding-edge)* # Improvements 🔧 - Narrow `ReflectionEnum::getName()` after `ReflectionEnum::isBacked()` ([#&#8203;2806](https://github.com/phpstan/phpstan-src/pull/2806)), [#&#8203;10192](https://github.com/phpstan/phpstan/issues/10192), thanks [@&#8203;franmomu](https://github.com/franmomu)! - Any variable can exist after include/require (https://github.com/phpstan/phpstan-src/commit/0a3a968b86773a54e102baee4f63d39a556c97fc), https://github.com/phpstan/phpstan/discussions/10252 # Bugfixes 🐛 - ResolvedPhpDocBlock: fix parent return tag merging ([#&#8203;2803](https://github.com/phpstan/phpstan-src/pull/2803)), [#&#8203;6462](https://github.com/phpstan/phpstan/issues/6462), [#&#8203;10208](https://github.com/phpstan/phpstan/issues/10208), [#&#8203;3580](https://github.com/phpstan/phpstan/issues/3580), [#&#8203;4396](https://github.com/phpstan/phpstan/issues/4396), thanks [@&#8203;janedbal](https://github.com/janedbal)! - Merge in-foreach scope even for non-iterable expr (https://github.com/phpstan/phpstan-src/commit/942afbf060419bae5977651bff3102b63ea42206) - TooWideMethodReturnTypehintRule - never report in a trait (https://github.com/phpstan/phpstan-src/commit/e0eb85028d55ebab32be614631639c142b37daa6) - Narrowing list type with `count()` results in type loss ([#&#8203;2811](https://github.com/phpstan/phpstan-src/pull/2811)), [#&#8203;10264](https://github.com/phpstan/phpstan/issues/10264), thanks [@&#8203;staabm](https://github.com/staabm)! - Fix LevelsTestCase for PHPUnit 10 (https://github.com/phpstan/phpstan-src/commit/fa5d5f958b051b088fb0824d377a091273d6436c) # Function signature fixes 🤖 - Update return type information for `SimpleXMLElement::addChild` ([#&#8203;2808](https://github.com/phpstan/phpstan-src/pull/2808)), [#&#8203;10269](https://github.com/phpstan/phpstan/issues/10269), thanks [@&#8203;DaveLiddament](https://github.com/DaveLiddament)! ### [`v1.10.47`](https://github.com/phpstan/phpstan/releases/tag/1.10.47) [Compare Source](https://github.com/phpstan/phpstan/compare/1.10.46...1.10.47) # Improvements 🔧 - `ExpressionTypeResolverExtension` ([#&#8203;2789](https://github.com/phpstan/phpstan-src/pull/2789)), thanks [@&#8203;janedbal](https://github.com/janedbal)! - See: [`ExpressionTypeResolverExtension` in API Reference](https://apiref.phpstan.org/1.11.x/PHPStan.Type.ExpressionTypeResolverExtension.html) - This can be used to override inferred types by Scope if existing extension points like DynamicMethodReturnTypeExtension are not sufficient # Bugfixes 🐛 - `array_filter` - handle error types ([#&#8203;2794](https://github.com/phpstan/phpstan-src/pull/2794)), [#&#8203;10189](https://github.com/phpstan/phpstan/issues/10189), thanks [@&#8203;mglaman](https://github.com/mglaman)! - Fix variable certainty after `if ($var ?? null)` (https://github.com/phpstan/phpstan-src/commit/c2ba3415a8876310289ea0c4aa2976f20b5912f3), [#&#8203;10224](https://github.com/phpstan/phpstan/issues/10224) - Fix trait PHPDocs when checking overriden methods (https://github.com/phpstan/phpstan-src/commit/4c4f22f131561795c5f2c6e7627fff2a9aa64b92), [#&#8203;10184](https://github.com/phpstan/phpstan/issues/10184) # Function signature fixes 🤖 - Fix parameter type for `Redis::hMset` ([#&#8203;2793](https://github.com/phpstan/phpstan-src/pull/2793)), thanks [@&#8203;Vaalyn](https://github.com/Vaalyn)! </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 7am" (UTC), Automerge - "before 7am" (UTC). 🚦 **Automerge**: Enabled. ♻ **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. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MTguMyIsInVwZGF0ZWRJblZlciI6IjM3LjQxOC4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
renovate added 1 commit 2024-06-27 05:01:00 +02:00
renovate scheduled this pull request to auto merge when all checks succeed 2024-06-27 05:01:00 +02:00
trizz merged commit 1e59db9845 into main 2024-06-27 13:25:36 +02:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: trizz/adventofcode#8
No description provided.