chore(deps): update dependency phpstan/phpstan to v0.12.100 #2

Merged
kumi merged 2 commits from renovate/phpstan-packages into main 2025-03-12 12:10:27 +00:00
Collaborator

This PR contains the following updates:

Package Type Update Change
phpstan/phpstan require-dev patch 0.12.29 -> 0.12.100

Release Notes

phpstan/phpstan (phpstan/phpstan)

v0.12.100

Compare Source

Message from the future

⚠️ You're running a really old version of PHPStan.️

The last release in the 0.12.x series with new features
and bugfixes was released on September 12th 2021,
that's 415 days ago.

Since then more than 67 new PHPStan versions were released
with hundreds of new features, bugfixes, and other
quality of life improvements.

To learn about what you're missing out on, check out
this blog with articles about the latest major releases:
https://phpstan.org/blog

Upgrade today to PHPStan 1.8 or newer by using
"phpstan/phpstan": "^1.8" in your composer.json.

v0.12.99

Compare Source

Improvements 🔧

Bleeding edge 🔪

  • empty() rule (601460ccec)
  • MissingReturnRule - make the error non-ignorable for native typehints (9ecefd56d8)
  • Check callable parameter types for array_map() and array_filter() calls, #​5609, #​5356, #​1954
  • Teach IssetRule everything what VariableCertaintyInIssetRule does (9689fbd0ed), #​970
  • Teach CatchWithUnthrownExceptionRule everything what DeadCatchRule does (165504cf9c)
  • Check that function with @throws void does not have an explicit throw point (8b3382acea)

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

Bugfixes 🐛

Function signature fixes 🤖

v0.12.98

Compare Source

Allow dynamic list of stub files thanks to StubFilesExtension (2ba9332d29), https://github.com/phpstan/phpstan-symfony/issues/195

v0.12.97

Compare Source

Improvements 🔧

Bugfixes 🐛

Function signature fixes 🤖

v0.12.96

Compare Source

  • OverridingPropertyRule - relax checking PHPDoc types (24f6264bac), #​5494
  • Add PHP_WINDOWS_* constants to dynamicConstantNames (9762d371eb)

v0.12.95

Compare Source

Improvements 🔧

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

Bugfixes 🐛

Function signature fixes 🤖

v0.12.94

Compare Source

Improvements 🔧

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

Bugfixes 🐛

Function signature fixes 🤖

v0.12.93

Compare Source

Improvements 🔧

Bugfixes 🐛

Function signature fixes 🤖

v0.12.92

Compare Source

Improvements 🔧

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

Bugfixes 🐛

Function signature fixes 🤖

v0.12.91

Compare Source

Improvements 🔧

Bugfixes 🐛

v0.12.90

Compare Source

Improvements 🔧

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

Bugfixes 🐛

Function signature fixes 🤖

v0.12.89

Compare Source

Improvements 🔧

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

Bugfixes 🐛

Function signature fixes 🤖

v0.12.88

Compare Source

Improvements 🔧

Bugfixes 🐛

Function signature fixes 🤖

v0.12.87

Compare Source

Major new feature 🚀

New exceptions-related rules

  • Differentiate between checked and unchecked exceptions
  • Enforce declaring thrown checked exceptions in @throws
  • Report extra exceptions in @throws that aren't actually thrown

Read this article for more details »

Improvements 🔧

Bugfixes 🐛

Function signature fixes 🤖

v0.12.86

Compare Source

Improvements 🔧

Bugfixes 🐛

  • new ReflectionClass() can throw ReflectionException (00d3ef418f)
  • Fix PHPStan Pro reanalyse results (179b2131de)
  • DateTime and DateTimeImmutable constructor does not always throw Exception (181f75ce89)
  • Do not attempt to autoload invalid classnames (56566eb9a9), #​4953

Function signature fixes 🤖

v0.12.85

Compare Source

Improvements 🔧

Bugfixes 🐛

Function signature fixes 🤖

  • Dynamic return type extension for date_create_from_format and date_create_immutable_from_format (#​502), thanks @​pascalheidmann!

v0.12.84

Compare Source

Major new feature 🚀

Local type aliases

Thanks to @​jiripudil and his PR https://github.com/phpstan/phpstan-src/pull/460, you can now enjoy @phpstan-type and @phpstan-import-type in class-level PHPDoc. See the documentation for more details.

Improvements 🔧

Bugfixes 🐛

Function signature fixes 🤖

v0.12.83

Compare Source

Improvements 🔧

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

Bugfixes 🐛

Function signature fixes 🤖

v0.12.82

Compare Source

Improvements 🔧

Bugfixes 🐛

Function signature fixes 🤖

v0.12.81

Compare Source

Improvements 🔧

  • Support for running PHPStan without any arguments (469a8c3dc3)
    • You can run PHPStan just by executing vendor/bin/phpstan, if you satisfy two conditions:
      • You have phpstan.neon (or phpstan.neon.dist) in your current working directory
      • This configuration file contains rule level parameter, and paths to analyse
  • Fix support for classes named after pseudotypes in PHPDocs (#​365), thanks @​stof!
    • This means that existing classes with names like Resource or Never are now correctly recognized in PHPDocs and have priority over PHP's resource type and PHPStan's never pseudotype
  • Understand noreturn in PHPDoc as NeverType (bce31f014d)
  • Docker - support ARM architecture (https://github.com/phpstan/phpstan/pull/4663)

Bugfixes 🐛

Function signature fixes 🤖

v0.12.80

Compare Source

Improvements 🔧

Bugfixes 🐛

Function signature fixes 🤖

v0.12.79

Compare Source

Improvements 🔧

Bleeding edge 🔪

  • Type inference of new $string leads to object, not mixed (78a9f057d7)

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.

Bugfixes 🐛

  • Fix GenericObjectType::isSuperTypeOf() for covariant template types (3f6de01ead)
  • Fix method_exists() after new $class (70756b0939), #​4579
  • Fix --debug message (#​455), thanks @​alamirault!
  • Keep iterable key type and value type when subtracting from iterable (c1f7aafc47), #​4498
  • Type description verbosity - be more verbose when invariant template type is involved (d97ddee4d5)
  • Fixed inferring return type coming from array_map (ea7e0ac0cb), #​4587
  • TemplateTypeCheck - look for nested unsupported types (756af18c18)

v0.12.78

Compare Source

Improvements 🔧

  • Remember assigned offset value on general arrays (0f64ca749f), #​2112
  • Result cache optimization (67b2d1cfa5)
  • Result cache - invalidate when scanned file changed (7d279fcfe8), #​3952
  • Result cache - hash autoload file and bootstrap files (3457e58115), #​3416
  • Parameter of closure passed into array_map/array_filter can resolve to a subtype of native type (bf320b0b25)

Bugfixes 🐛

Function signature fixes 🤖

v0.12.77

Compare Source

Improvements 🔧

Bugfixes 🐛

Function signature fixes 🤖

v0.12.76

Compare Source

Bugfixes 🐛

v0.12.75

Compare Source

Improvements 🔧

  • StubValidator - do not check missing callable signatures (b7d60809dd)

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.

Bugfixes 🐛

Function signature fixes 🤖

v0.12.74

Compare Source

Improvements 🔧

  • Resolve StaticType coming from dynamic return type extensions (76b65b4a76)

Bugfixes 🐛

v0.12.73

Compare Source

Improvements 🔧

v0.12.72

Compare Source

Improvements 🔧

Bleeding edge 🔪

  • Check that function-scoped template type is in a parameter (18bdd34a80)

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.

Bugfixes 🐛

v0.12.71

Compare Source

Improvements 🔧

Bugfixes 🐛

  • Do not report calls to pure methods/functions with @return never on a separate line (136db047e3), #​4455
  • Infer never return type in closure only with missing or void native return typehint (809807af5a), #​4442
  • Fix CachedParser returning stale cache when asked for richer AST through parseFile (bef5a261f3)
  • Do not complain about interface and abstract class when instantiating from object (5ad91d26e2), #​4471
  • Fixed CallableType::getReferencedClasses() (09da0a3af0)

Function signature fixes 🤖

v0.12.70

Compare Source

Improvements 🔧

Bugfixes 🐛

Function signature fixes 🤖

v0.12.69

Compare Source

Improvements 🔧

Bugfixes 🐛

Function signature fixes 🤖

v0.12.68

Compare Source

Improvements 🔧

Bugfixes 🐛

  • Fix ClosureReturnStatementsNode to not contain statements from nested closures and anonymous functions (a81a8c3870)
  • Fix FunctionReturnStatementsNode to not contain statements from nested closures and anonymous functions (c70325b4a4)
  • Fix MethodReturnStatementsNode to not contain statements from nested closures and anonymous functions (9a99aa5472)

v0.12.67

Compare Source

Improvements 🔧

Bugfixes 🐛

v0.12.66

Compare Source

Improvements 🔧

Bleeding edge 🔪

  • Detect stub file added multiple times (4a82eec404)
  • BooleanAndConstantConditionRule - check LogicalAnd (40a76e88d0)
  • BooleanOrConstantConditionRule - check LogicalOr (ae9a558484)

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.

Bugfixes 🐛

Function signature fixes 🤖

v0.12.65

Compare Source

Improvements 🔧

Bugfixes 🐛

Function signature fixes 🤖

  • Fix function signatures for preg_replace_callback* for PHP 7.4+ (#​411), thanks @​jabrandes!
  • Sync array_unique parameter names with PHP 8 (9e7bdf7c50)

v0.12.64

Compare Source

Major new feature 🚀

Dependent variables

PHPStan can now understand relationships between different variables. Cases like these are now understood correctly:

if ($debug) {
    $foo = 'bar';
}

if ($debug) {
    // previously: Variable $foo might not be defined.
    // now: no error
    echo $foo;
}

Additionally, this feature fixes all these issues: #​801, #​806, #​1209, #​1306, #​1722, #​1865, #​2980, #​3371, #​3986

Bugfixes 🐛

Function signature fixes 🤖

v0.12.63

Compare Source

Bugfixes 🐛

  • Methods and functions marked as #[Pure] but having @throws are considered to have side effects (7537f81d6c), #​4232
  • Do not infer property types from constructor if the property already has a native type (d245daba79), #​4234
  • Fix false positive with nullsafe operator (75d00c9a0f), #​4199
  • Php8SignatureMapProvider - prefer functionMap return type if PHP 8 stub file has only PHPDoc (893813ce0f), #​4205

Function signature fixes 🤖

  • Update functionMap with functions that return false on both PHP 7 and PHP 8 (43e5399070)

v0.12.62

Compare Source

Support relative paths in extension-installer (0e306c66ca), https://github.com/phpstan/extension-installer/issues/17

Starting with phpstan/phpstan 0.12.62 and phpstan/extension-installer 1.1.0, relative paths to extension configs are used. This allows the generated config to be moved across filesystems, for example from a host system to a Docker container.

v0.12.61

Compare Source

Bugfixes 🐛

  • Inferred property type for missing assigned property should not be set to implicit mixed (5b89088469), #​4227

Function signature fixes 🤖

  • Fix wrong function signature of posix_getpwuid and posix_getgrgid (#​408), thanks @​aragon999!

v0.12.60

Compare Source

Improvements 🔧

Bugfixes 🐛

Function signature fixes 🤖

v0.12.59

Compare Source

Bugfixes 🐛

Function signature fixes 🤖

v0.12.58

Compare Source

Improvements 🔧

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.

Bugfixes 🐛

Function signature fixes 🤖

v0.12.57

Compare Source

Improvements 🔧

  • New Docker image hosted in GitHub Container Registry and based on PHP 8. See the homepage and the documentation.
  • Support for attributes (PHP 8)
  • Result cache does not get invalidated when only ignoreErrors changes (ef84d9444f) - this makes working with the baseline instantaneous!
  • Result cache - do not restore and save when only files (not directories) are passed as analysed paths (dd11e25000)
  • FunctionCallParametersCheck - more precise lines (ba119bcc7b)

Bugfixes 🐛

Function signature fixes 🤖

v0.12.56

Compare Source

Improvements 🔧

  • Support for named arguments (PHP 8)
  • FunctionCallParametersCheck - argument errors reported on more precise lines (c507ae2ed6)

Bugfixes 🐛

v0.12.55

Compare Source

Improvements 🔧

Bugfixes 🐛

Function signature fixes 🤖

v0.12.54

Compare Source

Improvements 🔧

Bugfixes 🐛

v0.12.53

Compare Source

Improvements 🔧

  • Support for Stringable (PHP 8) (3143833c4f)
  • Updated jetbrains/phpstorm-stubs (3714a73578)
  • Add support for no-return and never-returns types as aliases of never (#​361), thanks @​b1rdex!
  • Read #[Pure] from methods in phpstorm-stubs (500b160520)
  • Detect unused constructor calls (21c50e3c87)

Bugfixes 🐛

Function signature fixes 🤖

v0.12.52

Compare Source

Improvements 🔧

  • Detect more unused function calls (generate functionMetadata.php from PhpStorm stubs' #[Pure] attribute) (2817690757)

Bugfixes 🐛

  • Scope - any variable after extract() call might exist (d3e7b9cd30), #​3990
  • Fix false positive with isset() and empty() (05942ca9da), #​3991
  • Fixed assert() bug (ca044c40c3), #​3994
  • array_shift() should invalidate remembered count() call (26d29ec602), #​3993
  • Do not complain about non-covariant return type in count() method in implementations of Countable interface (MethodSignatureRule - read PHPDoc types instead of combined types) (fb8d3ef823), #​3997
  • Fix literal array with empty item outside of left-side assign (a97477bfb7), #​4000

v0.12.51

Compare Source

Improvements 🔧

Bugfixes 🐛

Function signature fixes 🤖

v0.12.50

Compare Source

Improvements 🔧

  • Support for throw expression (PHP 8.0) (5f2d42cec0)
  • Support ::class on expression (PHP 8.0) (cec1be72aa)
  • Support non-empty-array and non-empty-list (a4038b2712)

Bugfixes 🐛

Function signature fixes 🤖

v0.12.49

Compare Source

Improvements 🔧

  • Try out PHP 8 analysis now! Set parameters.phpVersion in your phpstan.neon to 80000 and re-run PHPStan to see how well your code will fare once PHP 8 is released!
    • It will be improved in the coming weeks to cover more deprecations and new features.
  • Update phpstorm-stubs and understand @removed annotation (a39a46f5b8, 4eecc4f7b8)
  • Implemented falsey-filtered subtracted mixed type (#​339), #​1014, thanks @​jlherren!

Bugfixes 🐛

Function signature fixes 🤖

v0.12.48

Compare Source

v0.12.47

Compare Source

🚀 PHPStan Pro has been released 🚀

In few brief points:

  • Web UI for browsing found errors, you can click and open your editor of choice on the offending line.
  • Continuous analysis (watch mode): scans changed files in the background, refreshes the UI automatically.
  • Interactive fixer: lets you choose the right fix for found errors 😊

Try it by running PHPStan with the --pro option.

After 30-day free trial period it costs 7 EUR for individuals monthly, 70 EUR for teams (up to 25 members), you’ll support the development of open-source PHPStan 😊 If you’re using PHPStan at your job to prevent bugs reaching production, please consider paying for PHPStan Pro, 70 EUR monthly is less than a man-day 😊

You can read more about it on the blog: https://phpstan.org/blog/introducing-phpstan-pro

I’m looking forward to your feedback!

v0.12.46

Compare Source

v0.12.45

Compare Source

bindec returns float|int (#​326), thanks @​Synchro!

v0.12.44

Compare Source

preg_split sometimes returns array of arrays (#​324), thanks @​spaze!

v0.12.43

Compare Source

Improvements 🔧

Bugfixes 🐛

Function signature fixes 🤖

  • Fixed Redis::zScore() signature (#​319), thanks @​lyrixx!
  • Fix Redis::lPush(), Redis::lPushx(), Redis::rPush() and Redis::rPushx() signature (#​323), thanks @​araab!

v0.12.42

Compare Source

Fix error: Exception: Return value of PHPStan\PhpDoc\ResolvedPhpDocBlock::getNameScope() must be an instance of PHPStan\Analyser\NameScope, null returned (6e73d64d0c), #​3820

v0.12.41

Compare Source

Improvements 🔧

  • Faster result cache - analyse dependent files only if public-facing thing (like public or protected properties, methods, constants etc.) from changed file was changed (#​314)
  • Missing typehints: recurse into generic objects parameters (#​306), thanks @​dktapps!
  • Updated nikic/php-parser to 4.9.1 (abf2d0fcb7)
  • Add option to check internal class capitalization (#​313), thanks @​Riimu!

Bugfixes 🐛

v0.12.40

Compare Source

Improvements 🔧

  • New numeric-string type for PHPDocs
  • Understand that date function can sometimes return numeric string (1053ee754c), #​2899
  • Optimized memory consumption. It's now down 30 % to 40 % than in 0.12.39! (c9678cd71d, ba40208daa)

Bugfixes 🐛

v0.12.39

Compare Source

Improvements 🔧

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.

Bugfixes 🐛

v0.12.38

Compare Source

Improvements 🔧

  • PHP 8: Support for static return type (75ff7054b0)
  • Add support for the callable-string type (#​296), thanks @​ste93cry!
  • Updated nikic/php-parser to 4.9.0 (05b6a54115)
  • Doc comment above class doesn't have to exist if it has a stub file (17315cb32f)
  • min() and max() may return false if array size could be zero (#​300), thanks @​dktapps!

Bugfixes 🐛

Function signature fixes 🤖

v0.12.37

Compare Source

Improvements 🔧

  • Added TeamCity error formatter (#​295), thanks @​MaximilianKresse!
  • Updated nikic/php-parser to 4.8.0 (65a74c660d)
  • Updated LexerFactory to take advantage of the new Emulative lexer capabilities (71013bc41e) - some of the new syntax from PHP 7.3, 7.4, and 8.0 will now be marked as parse error on lower PHP versions

Bugfixes 🐛

v0.12.36

Compare Source

Improvements 🔧

  • Introduced NodeConnectingVisitor to be able to look around the current node in rules (e72ef39e15)
  • Add support for @phpstan-throws (#​292), thanks @​VincentLanglet!
  • Generics: disallow variance definition other than in class or interface (#​278), thanks @​hrach!

Bugfixes 🐛

v0.12.35

Compare Source

Bugfixes 🐛

Function signature fixes 🤖

v0.12.34

Compare Source

Improvements 🔧

Bugfixes 🐛

Function signature fixes 🤖

v0.12.33

Compare Source

Improvements 🔧

  • Initial PHP 8 support!
    • PHPStan can now analyse sources for PHP 7.x when running on PHP 8. Not all the new PHP 8 features are supported yet.
    • Support for native union types (39f8909dfa)
    • Support for native mixed type (a9043e0121)
  • Set different PHP version than your runtime
    • If you set different phpVersion parameter in your phpstan.neon, you can for example tell PHPStan to analyse source code like it's written for PHP 7.4 even if you're running PHP 8. The phpVersion config parameter is in PHP_VERSION_ID format - for PHP 7.4, use 70400.
    • You can also set a newer PHP version. So you can run PHPStan on 7.4, but already test compatibility with PHP 8 by setting phpVersion to 80000.
  • Check uninitialized typed properties that aren't set in the constructor (a1eb1f5b65), #​2984
    • Off by default, needs checkUninitializedProperties: true.
  • Show error on unescaped () in ignoreErrors (8479d405a4), #​3602

Bleeding edge 🔪

  • Detect unused and write-only/read-only private properties, methods, and constants (level 4)
  • config.platform.php in project's composer.json is respected and overrides the current runtime PHP version (d235195220).

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.

Bugfixes 🐛

Function signature fixes 🤖

v0.12.32

Compare Source

Improvements 🔧

  • Make GithubErrorFormatter the default when running in GitHub Actions (6fd85e3b7d)
    • If you're currently running PHPStan with --error-format checkstyle | cs2pr, you can omit this part from your build script!
    • You can override this behaviour by running with --error-format table.
  • Error formatter github for GitHub Actions (#​261), thanks @​Quetzacoalt91!

Bleeding edge 🔪

  • Check leading and trailing file whitespace and BOM (6905d66cf4)

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.

Bugfixes 🐛

v0.12.31

Compare Source

Bugfixes 🐛

  • Subclasses of PDO are analysed using static reflection (8390949321), #​3527
  • Fix problems related to conditional declarations of classes - #​3522
  • Dive into a trait that starts on the same line as the one in the reflection (e6dd87bd19), #​3460

Function signature fixes 🤖

v0.12.30

Compare Source

Improvements 🔧

  • Enhancements for analysis of view files implemented in plain PHP (#​351)
    • All variables including $this in the root scope are always "maybe-defined" which means they won't be reported on level 0 but on level 1 (0613451c60, 14b17a8f05), #​351
    • Variables in the root scope can be made always defined with inline @var PHPDoc (44f9d08dd0)
    • Support multiple doc comments above statement (428c8e594f)
  • Detect duplicate declarations of class constants, properties, and methods (#​250), #​3475, thanks @​dktapps!
  • Support for BitwiseNot (~) operator (#​249), thanks @​dktapps!

Bugfixes 🐛

Function signature fixes 🤖


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR 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 | patch | `0.12.29` -> `0.12.100` | --- ### Release Notes <details> <summary>phpstan/phpstan (phpstan/phpstan)</summary> ### [`v0.12.100`](https://github.com/phpstan/phpstan/releases/tag/0.12.100) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.99...0.12.100) ## Message from the future ⚠️ You're running a really old version of PHPStan.️ The last release in the 0.12.x series with new features and bugfixes was released on September 12th 2021, that's **415 days ago**. Since then more than **67 new PHPStan versions** were released with hundreds of new features, bugfixes, and other quality of life improvements. To learn about what you're missing out on, check out this blog with articles about the latest major releases: https://phpstan.org/blog Upgrade today to PHPStan 1.8 or newer by using `"phpstan/phpstan": "^1.8"` in your `composer.json`. ### [`v0.12.99`](https://github.com/phpstan/phpstan/releases/tag/0.12.99) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.98...0.12.99) # Improvements 🔧 - `CompoundTypeHelper` is deprecated (https://github.com/phpstan/phpstan-src/commit/fff85f3c08a38110bca6a13d341778bbd79a2108) - Update `phpstorm-stubs` (https://github.com/phpstan/phpstan-src/commit/6fa12857c88dccfcf58492fc20aaa1f8aaa60535) - Add support for multiple wildcards in const type annotations ([#&#8203;658](https://github.com/phpstan/phpstan-src/pull/658)), [#&#8203;5534](https://github.com/phpstan/phpstan/issues/5534),thanks [@&#8203;Seldaek](https://github.com/Seldaek)! # Bleeding edge 🔪 - `empty()` rule (https://github.com/phpstan/phpstan-src/commit/601460ccecfd72888d96e9c53d21cc3a8b66c719) - `MissingReturnRule` - make the error non-ignorable for native typehints (https://github.com/phpstan/phpstan-src/commit/9ecefd56d8b1d5cf0100c50d6e620285d5312291) - Check callable parameter types for `array_map()` and `array_filter()` calls, [#&#8203;5609](https://github.com/phpstan/phpstan/issues/5609), [#&#8203;5356](https://github.com/phpstan/phpstan/issues/5356), [#&#8203;1954](https://github.com/phpstan/phpstan/issues/1954) - Teach `IssetRule` everything what `VariableCertaintyInIssetRule` does (https://github.com/phpstan/phpstan-src/commit/9689fbd0ed9f8438afc8679c90df61ee48a638fe), [#&#8203;970](https://github.com/phpstan/phpstan/issues/970) - Teach `CatchWithUnthrownExceptionRule` everything what `DeadCatchRule` does (https://github.com/phpstan/phpstan-src/commit/165504cf9c4ae6e2dcfc2c3570a631441a411615) - Check that function with `@throws void` does not have an explicit throw point (https://github.com/phpstan/phpstan-src/commit/8b3382aceac801b9801fccda253033d8e8e5f655) *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)* # Bugfixes 🐛 - Fix false-positive when merging unions with plus operator ([#&#8203;657](https://github.com/phpstan/phpstan-src/pull/657)), [#&#8203;5584](https://github.com/phpstan/phpstan/issues/5584), thanks [@&#8203;staabm](https://github.com/staabm)! - `checkExplicitMixed` - replace mixed type recursively (https://github.com/phpstan/phpstan-src/commit/b4f81dbd777f071d78ccfc453c12e82b6f950f11), [#&#8203;5218](https://github.com/phpstan/phpstan/issues/5218) - Fixed `checkExplicitMixed` with `TemplateMixedType` (https://github.com/phpstan/phpstan-src/commit/6ba9ef29cb5ccd5b540815e899c95e6a1602ccad), [#&#8203;3566](https://github.com/phpstan/phpstan/issues/3566) - `BaselineNeonErrorFormatter`: Sort errors by normalized relative path ([#&#8203;536](https://github.com/phpstan/phpstan-src/pull/536)), [#&#8203;5085](https://github.com/phpstan/phpstan/issues/5085), thanks [@&#8203;dktapps](https://github.com/dktapps)! - Enter assignment of property fetch's var when in null coalesce operator (https://github.com/phpstan/phpstan-src/commit/7ddfa174a60a15e584c7e6f4fec82237ccd70da8), [#&#8203;3283](https://github.com/phpstan/phpstan/issues/3283) - Pass-by-ref argument type passed to callable should be mixed after calling the callable (https://github.com/phpstan/phpstan-src/commit/109bf999b8791f512f2fe82b026ccd67d1f152a2), [#&#8203;5615](https://github.com/phpstan/phpstan/issues/5615), [#&#8203;5428](https://github.com/phpstan/phpstan/issues/5428), [#&#8203;2191](https://github.com/phpstan/phpstan/issues/2191) - `StubSourceLocatorFactory` - always use PHP 8 parser for PhpStorm stubs (https://github.com/phpstan/phpstan-src/commit/731ce1dd8d65537a61dddac417d5f5169f4bfce6) - support unary-minus on `IntegerRangeType` ([#&#8203;669](https://github.com/phpstan/phpstan-src/pull/669)), thanks [@&#8203;staabm](https://github.com/staabm)! - `array_map` - understand call with multiple arrays (https://github.com/phpstan/phpstan-src/commit/3e0ecec8fc2482e412f67f6a62bdb6542be0fe5d), [#&#8203;5039](https://github.com/phpstan/phpstan/issues/5039) - `range()` of `numeric-string`s can produce array of float|int (https://github.com/phpstan/phpstan-src/commit/3b6f0bf739c77e1fb8fb5116ae89cd70a2ac96c2) # Function signature fixes 🤖 - Fix parameter definition for `Grpc\ChannelCredentials::createSsl` ([#&#8203;665](https://github.com/phpstan/phpstan-src/pull/665)), thanks [@&#8203;howyi](https://github.com/howyi)! - Make `SimpleXMLElement` stub more specific ([#&#8203;666](https://github.com/phpstan/phpstan-src/pull/666)), thanks [@&#8203;devbanana](https://github.com/devbanana)! ### [`v0.12.98`](https://github.com/phpstan/phpstan/releases/tag/0.12.98) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.97...0.12.98) Allow dynamic list of stub files thanks to StubFilesExtension (https://github.com/phpstan/phpstan-src/commit/2ba9332d29c1acdde0f85a2781308d2e8972f00e), https://github.com/phpstan/phpstan-symfony/issues/195 ### [`v0.12.97`](https://github.com/phpstan/phpstan/releases/tag/0.12.97) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.96...0.12.97) # Improvements 🔧 - Support for `literal-string` PHPDoc type inspired by `is_literal()` RFC (https://wiki.php.net/rfc/is_literal), [#&#8203;5507](https://github.com/phpstan/phpstan/issues/5507) - Support `bool` as template type bound (https://github.com/phpstan/phpstan-src/commit/9d191f9abb00b3c293a26934ba1b92bb413569b4) - Support `float` as template type bound (https://github.com/phpstan/phpstan-src/commit/4e7d6c155c52e11f81bcabf75f84e14a2e0e1727), [#&#8203;5331](https://github.com/phpstan/phpstan/issues/5331) - Make `ReflectionAttribute` generic ([#&#8203;640](https://github.com/phpstan/phpstan-src/pull/640), [#&#8203;643](https://github.com/phpstan/phpstan-src/pull/643)), thanks [@&#8203;vhenzl](https://github.com/vhenzl)! - Implemented math on IntegerRangeType and ConstantIntegerType ([#&#8203;637](https://github.com/phpstan/phpstan-src/pull/637)), [#&#8203;4843](https://github.com/phpstan/phpstan/issues/4843), thanks [@&#8203;staabm](https://github.com/staabm)! - Support `non-empty-array` type in `[] != $arr` conditions ([#&#8203;649](https://github.com/phpstan/phpstan-src/pull/649)), thanks [@&#8203;staabm](https://github.com/staabm)! - Optimization - do not sort huge unions (https://github.com/phpstan/phpstan-src/commit/5a44c297adb6ded659c3206e9e9525f60a37d55b), [#&#8203;5500](https://github.com/phpstan/phpstan/issues/5500) - Optimize calculating scalar values from huge unions (https://github.com/phpstan/phpstan-src/commit/a6ca5f7a7ef60f20ca9c2f5ec5410d28224e2db8), [#&#8203;5527](https://github.com/phpstan/phpstan/issues/5527) - Update PHP 8 stubs (https://github.com/phpstan/phpstan-src/commit/a82605fbb80c5b09614ad6b82d872f2833eecce8) # Bugfixes 🐛 - Reflection: fixed context of invoking a trait method (https://github.com/phpstan/phpstan-src/commit/89ceb6a9790d534b1d101b76317e487f0ee5d0c8), [#&#8203;5497](https://github.com/phpstan/phpstan/issues/5497) - Union normalization - do not take template types apart (https://github.com/phpstan/phpstan-src/commit/3b17c0e1d5a712f75f85ab604cb84741bdf38c72) - `self::CONSTANT` can be precise even with PHPDoc type (https://github.com/phpstan/phpstan-src/commit/5010ef459465fa27a3b0fe3593bdd445b6dae8f3), [#&#8203;5517](https://github.com/phpstan/phpstan/issues/5517) - Fix CallableType's string type assumptions (https://github.com/phpstan/phpstan-src/commit/9a9f19380499a4836aa89d46a29477aed17b5da5) - OptimizedDirectorySourceLocator - fixed crash when parsing `Text.php` of `nl_BE` from Faker (https://github.com/phpstan/phpstan-src/commit/a09a98d251002a061c96e7a49132693d46a0dee9), [#&#8203;5525](https://github.com/phpstan/phpstan/issues/5525) - Fix `?parent` in return type (https://github.com/phpstan/phpstan-src/commit/30c9b01fd12bf2a1f655b369629c3a38acff978e), [#&#8203;5529](https://github.com/phpstan/phpstan/issues/5529) - Fixed missing return rule for native mixed type (https://github.com/phpstan/phpstan-src/commit/03d8312e3ea62bb2c6a3ed89a88a6d86101a5594) - Make mixin method static if there's `__callStatic()` in the class (https://github.com/phpstan/phpstan-src/commit/114a38f87a7ce2e7a53d55454a61cdfd832ea69f), [#&#8203;5536](https://github.com/phpstan/phpstan/issues/5536) - added `sizeof()` as alias of `count()` for Smaller/SmallerOrEqual ([#&#8203;647](https://github.com/phpstan/phpstan-src/pull/647), [#&#8203;648](https://github.com/phpstan/phpstan-src/pull/648)), [#&#8203;4843](https://github.com/phpstan/phpstan/issues/4843), thanks [@&#8203;staabm](https://github.com/staabm)! - Refactor PreInc and PreDec (https://github.com/phpstan/phpstan-src/commit/a6a23dcaf6254c182e39117cbeb9f8087c1ee22c), [#&#8203;1870](https://github.com/phpstan/phpstan/issues/1870) - Fix inferring `TemplateUnionType` ((https://github.com/phpstan/phpstan-src/commit/1b5710a3aa87a3d475d565c8ded12de170ee6cb6), [#&#8203;5562](https://github.com/phpstan/phpstan/issues/5562) # Function signature fixes 🤖 - substr_count returns non-negative integer (https://github.com/phpstan/phpstan-src/commit/8db058a52c763408f30cd914d743d930ff3e7e8e), [#&#8203;5513](https://github.com/phpstan/phpstan/issues/5513) - mb_str_split() / str_split() always returns `non-empty-array` ([#&#8203;633](https://github.com/phpstan/phpstan-src/pull/633)), thanks [@&#8203;staabm](https://github.com/staabm)! - Third parameter of `sodium_base642bin()` is optional. ([#&#8203;644](https://github.com/phpstan/phpstan-src/pull/644)), thanks [@&#8203;tehbeard](https://github.com/tehbeard)! - Make `filter_var()` return `non-empty-string` if input is non-empty ([#&#8203;642](https://github.com/phpstan/phpstan-src/pull/642)), thanks [@&#8203;devbanana](https://github.com/devbanana)! - use positive-int in `iterator_count()` / `iterator_apply()` ([#&#8203;646](https://github.com/phpstan/phpstan-src/pull/646)), thanks [@&#8203;staabm](https://github.com/staabm)! - use positive-int in `array_count_values()` ([#&#8203;645](https://github.com/phpstan/phpstan-src/pull/645)), thanks [@&#8203;staabm](https://github.com/staabm)! - `filter_var()` should return non empty string only when it will not be sanitized ([#&#8203;650](https://github.com/phpstan/phpstan-src/pull/650)), thanks [@&#8203;devbanana](https://github.com/devbanana)! - Sync `parse_url` signature with PHP 8 (https://github.com/phpstan/phpstan-src/commit/f7c6464067e04d5fc3f11b6f624a29fee067b1be) ### [`v0.12.96`](https://github.com/phpstan/phpstan/releases/tag/0.12.96) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.95...0.12.96) - OverridingPropertyRule - relax checking PHPDoc types (https://github.com/phpstan/phpstan-src/commit/24f6264bac7af157bb4efdd34a8536f6445c6ac3), [#&#8203;5494](https://github.com/phpstan/phpstan/issues/5494) - Add `PHP_WINDOWS_*` constants to `dynamicConstantNames` (https://github.com/phpstan/phpstan-src/commit/9762d371ebb2663ada1e6947d2edc685330011ee) ### [`v0.12.95`](https://github.com/phpstan/phpstan/releases/tag/0.12.95) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.94...0.12.95) # Improvements 🔧 - Support `@var` above class constants (https://github.com/phpstan/phpstan-src/commit/b932769213234a3ee78c39c7505ded5fade3568c), [#&#8203;4361](https://github.com/phpstan/phpstan/issues/4361), [#&#8203;3530](https://github.com/phpstan/phpstan/issues/3530) - Removed lossy type optimization: `TypeCombinator::CONSTANT_SCALAR_UNION_THRESHOLD` (https://github.com/phpstan/phpstan-src/commit/c56d866e63d6cd9eb80eecc9c7f1c989b2110cd3), [#&#8203;5447](https://github.com/phpstan/phpstan/issues/5447), [#&#8203;5454](https://github.com/phpstan/phpstan/issues/5454), [#&#8203;4925](https://github.com/phpstan/phpstan/issues/4925), [#&#8203;4793](https://github.com/phpstan/phpstan/issues/4793), [#&#8203;5062](https://github.com/phpstan/phpstan/issues/5062), [#&#8203;3366](https://github.com/phpstan/phpstan/issues/3366), [#&#8203;3555](https://github.com/phpstan/phpstan/issues/3555) - `TypeCombinator::union()` - new optimization for constant scalar types (https://github.com/phpstan/phpstan-src/commit/da9e0613b8c21f0263680715da6986c921a75840) - Final constant rule (PHP 8.1) (https://github.com/phpstan/phpstan-src/commit/6be077e92dfa11d2bddddd4a86669139bf3c716e) - Readonly property rule (PHP 8.1) (https://github.com/phpstan/phpstan-src/commit/502596f1a1ee3ec319bab13462bb74294ff4f770) - Deprecated wrongly-named `PhpPropertyReflection::hasPhpDoc()` (https://github.com/phpstan/phpstan-src/commit/d78d60a286fc094593586f596c05f5ff997fe2d7) - Use IntegerRangeType in modulo-operator ([#&#8203;614](https://github.com/phpstan/phpstan-src/pull/614)), thanks [@&#8203;staabm](https://github.com/staabm)! # Bleeding edge 🔪 - IncompatibleClassConstantPhpDocTypeRule (https://github.com/phpstan/phpstan-src/commit/780a54cd0149d8cb5a62bb1ef6fa2b0871114ee5) - OverridingConstantRule (https://github.com/phpstan/phpstan-src/commit/89acb0db4400c95b231ae74830e8607d72824cbc) - OverridingPropertyRule (https://github.com/phpstan/phpstan-src/commit/0f4885aa101e0cc49f906e72990e356bd281ec63), [#&#8203;4281](https://github.com/phpstan/phpstan/issues/4281) - Private method called through `static::` (https://github.com/phpstan/phpstan-src/commit/bad2607a032787d822a1a8f91d5176455eac8693) - Private property accessed through `static::` (https://github.com/phpstan/phpstan-src/commit/d8e89538ac84236cb3c40ea85b524e4f7cc30852) - Private constant accessed through `static::` (https://github.com/phpstan/phpstan-src/commit/270326a1ed22398a98b15880e12a3b8015a83c4a) *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)* # Bugfixes 🐛 - Scalar type in PHPDoc can mean an existing class (https://github.com/phpstan/phpstan-src/commit/cdf9cb50129502217aca5a3d9ee3ed0c3795a148), https://github.com/phpstan/phpstan/discussions/5392 - `DateTime|DateTimeInterface` union accepts `DateTimeInterface` ([#&#8203;586](https://github.com/phpstan/phpstan-src/pull/586)), thanks [@&#8203;VincentLanglet](https://github.com/VincentLanglet)! - Make default `parallel.processTimeout` 10x bigger (https://github.com/phpstan/phpstan-src/commit/abb4378d635d1b8caaa2b5bd50e0304eec396f5f), [#&#8203;5341](https://github.com/phpstan/phpstan/issues/5341) - ParallelAnalyser - do not allow to go below the default timeout (https://github.com/phpstan/phpstan-src/commit/2f1615bdfdd439bda946b52df46804dc56c2c289) - `ZEND_` dynamic constants ([#&#8203;613](https://github.com/phpstan/phpstan-src/pull/613)), thanks [@&#8203;dktapps](https://github.com/dktapps)! - `PDOStatement` implements `IteratorAggregate` on PHP 8 (https://github.com/phpstan/phpstan-src/commit/dec054d330550d4706870b3cdbbd5c51e2880876), [#&#8203;5436](https://github.com/phpstan/phpstan/issues/5436) - Assure GitLab error formatter have integer line properties ([#&#8203;616](https://github.com/phpstan/phpstan-src/pull/616)), thanks [@&#8203;simonhammes](https://github.com/simonhammes)! - Fix inferring template type from `non-empty-string` (https://github.com/phpstan/phpstan-src/commit/6a33de94e447fdfdb8a67ac374e971dc2673fc5a), [#&#8203;5372](https://github.com/phpstan/phpstan/issues/5372) - AppendedArrayKeyTypeRule - more precise type description (https://github.com/phpstan/phpstan-src/commit/aa9e2e8f4969ea89976e5781f0381b8201944b55) - Fix casting `non-empty-string` array key type (https://github.com/phpstan/phpstan-src/commit/7172e5fc42154dbc73e78068bf12dbe3e27f9af5), [#&#8203;5372](https://github.com/phpstan/phpstan/issues/5372) - Fix `TemplateTypeMap::isEmpty()` (https://github.com/phpstan/phpstan-src/commit/f7250dbe9b23415f02961edc5f34e3f084e2b659) - Fix fetching class constants on object instances (https://github.com/phpstan/phpstan-src/commit/4cb02d15c326be71c8d1eeb0227a4931398928bb), [#&#8203;2959](https://github.com/phpstan/phpstan/issues/2959) - Do not produce reflection error for unknown constants in class constants (https://github.com/phpstan/phpstan-src/commit/29fcf80e1676f1a13ee04e88db6dbeb8685b58e1) # Function signature fixes 🤖 - change return type for `chr()` ([#&#8203;599](https://github.com/phpstan/phpstan-src/pull/599)), thanks [@&#8203;AIlkiv](https://github.com/AIlkiv)! - Remove wrong return type of `imagejpeg` GD function ([#&#8203;619](https://github.com/phpstan/phpstan-src/pull/619)), thanks [@&#8203;mauriciofauth](https://github.com/mauriciofauth)! - fix return type for gzeof() ([#&#8203;620](https://github.com/phpstan/phpstan-src/pull/620)), thanks [@&#8203;forrest79](https://github.com/forrest79)! - Fix `openssl_seal()` `$iv` parameter ([#&#8203;624](https://github.com/phpstan/phpstan-src/pull/624)), thanks [@&#8203;jlherren](https://github.com/jlherren)! - fix `pg_field_name` prototype ([#&#8203;626](https://github.com/phpstan/phpstan-src/pull/626)), thanks [@&#8203;thierry-f-78](https://github.com/thierry-f-78)! - Fix `Phar`/`PharData::extractTo` type information ([#&#8203;628](https://github.com/phpstan/phpstan-src/pull/628)), thanks [@&#8203;Seldaek](https://github.com/Seldaek)! - More precise `abs()` return-type ([#&#8203;629](https://github.com/phpstan/phpstan-src/pull/629)), thanks [@&#8203;staabm](https://github.com/staabm)! - `str_split()` length parameter is always positive ([#&#8203;631](https://github.com/phpstan/phpstan-src/pull/631)), thanks [@&#8203;staabm](https://github.com/staabm)! - return `non-empty-array` from `mb_str_split`/`str_split` ([#&#8203;632](https://github.com/phpstan/phpstan-src/pull/632)), thanks [@&#8203;staabm](https://github.com/staabm)! - Cover `non-empty-string` in more string fuctions ([#&#8203;606](https://github.com/phpstan/phpstan-src/pull/606)), [#&#8203;5350](https://github.com/phpstan/phpstan/issues/5350), thanks [@&#8203;staabm](https://github.com/staabm)! - Added `rand()` dynamic return type extension ([#&#8203;606](https://github.com/phpstan/phpstan-src/pull/606)), thanks [@&#8203;staabm](https://github.com/staabm)! - Added stub for `WeakMap` ([#&#8203;623](https://github.com/phpstan/phpstan-src/pull/613)), thanks [@&#8203;dktapps](https://github.com/dktapps)! - Add `#[ReturnTypeWillChange]` stub ([#&#8203;618](https://github.com/phpstan/phpstan-src/pull/618)), thanks [@&#8203;zonuexe](https://github.com/zonuexe)! - Cover `non-empty-array` in `array_map()` ([#&#8203;601](https://github.com/phpstan/phpstan-src/pull/601)), thanks [@&#8203;Lctrs](https://github.com/Lctrs)! - Add dynamic return type extension for `mb_substitute_character` ([#&#8203;607](https://github.com/phpstan/phpstan-src/pull/607)), thanks [@&#8203;TRowbotham](https://github.com/TRowbotham)! - `strlen`: cover more scalar types ([#&#8203;630](https://github.com/phpstan/phpstan-src/pull/630)), thanks [@&#8203;staabm](https://github.com/staabm)! - support integer-range type in `min()`/`max()` for two arguments ([#&#8203;627](https://github.com/phpstan/phpstan-src/pull/627)), [#&#8203;5072](https://github.com/phpstan/phpstan/issues/5072), thanks [@&#8203;staabm](https://github.com/staabm)! - `array_fill()`: handle negative cases, support integer ranges and `non-empty-array` ([#&#8203;603](https://github.com/phpstan/phpstan-src/pull/603)), thanks [@&#8203;staabm](https://github.com/staabm)! ### [`v0.12.94`](https://github.com/phpstan/phpstan/releases/tag/0.12.94) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.93...0.12.94) # Improvements 🔧 - Added integer range PHPDoc support ([#&#8203;596](https://github.com/phpstan/phpstan-src/pull/596)), thanks [@&#8203;clxmstaab](https://github.com/clxmstaab)! - Cover `non-empty-array` in `array_flip` ([#&#8203;583](https://github.com/phpstan/phpstan-src/pull/583)), thanks [@&#8203;staabm](https://github.com/staabm)! - Update `nikic/php-parser` to 4.12.0 (https://github.com/phpstan/phpstan-src/commit/dca48f34bcec87971ceaa4643eef02ed9b2fd812) - Custom PHAR namespace prefix with Git commit (https://github.com/phpstan/phpstan-src/commit/1501229bb601298c9bc0914433cfa98e9dd050e6) - Simplify FileCacheStorage ([#&#8203;593](https://github.com/phpstan/phpstan-src/pull/593)), thanks [@&#8203;staabm](https://github.com/staabm)! - Result cache - notice change in class constant PHPDoc (https://github.com/phpstan/phpstan-src/commit/d88b568cae5759e56cdc1c21433f002db07aefaf) - Result cache - notice change in `readonly` property (PHP 8.1) (https://github.com/phpstan/phpstan-src/commit/c19506b58e334a8b8ccaaefdfe2beabfa3c064a1) - Result cache - notice change in `final` class constant (PHP 8.1) (https://github.com/phpstan/phpstan-src/commit/092d8e3bbf013fe52db81ec7f09385bed2db9f63) - Do not rely on registered exception handler when debugging (https://github.com/phpstan/phpstan-src/commit/48ec184015023796ec32234d918fbda305606c51) - ResultCacheManager: introduce flag `checkDependenciesOfProjectExtensionFiles` ([#&#8203;595](https://github.com/phpstan/phpstan-src/pull/595)), [#&#8203;5296](https://github.com/phpstan/phpstan/issues/5296), thanks [@&#8203;janedbal](https://github.com/janedbal)! - Update PHP 8 stubs (https://github.com/phpstan/phpstan-src/commit/91fde71dc649e07b5ee19a565eb021e6205a7cbe) # Bleeding edge 🔪 - Check classes extending `@final` classes (https://github.com/phpstan/phpstan-src/commit/dffd2c2351e5fc5d22b752bf3b8be84bf1708f71), https://github.com/phpstan/phpstan/discussions/5343 *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)* # Bugfixes 🐛 - Fix overriding `Memcache::get()` and `MemcachePool::get()` (https://github.com/phpstan/phpstan-src/commit/c5f9d2400ee430a4850a87186a751d1e1d9fc9be) - Fix overriding throw point with inline `@throws void` (https://github.com/phpstan/phpstan-src/commit/da3790efa9f5ee96c3b7905342904fe3651a29af), [#&#8203;5364](https://github.com/phpstan/phpstan/issues/5364) - ResultCacheManager: read also `rules` in config `.neon` file ([#&#8203;594](https://github.com/phpstan/phpstan-src/pull/594)), thanks [@&#8203;janedbal](https://github.com/janedbal)! # Function signature fixes 🤖 - Fixed stub types for `SplFixedArray` ([#&#8203;588](https://github.com/phpstan/phpstan-src/pull/587)), thanks [@&#8203;dktapps](https://github.com/dktapps)! - Updated socket_select() signature for PHP 8.0 ([#&#8203;591](https://github.com/phpstan/phpstan-src/pull/591)), thanks [@&#8203;dktapps](https://github.com/dktapps)! - `proc_open()` accepts `list<string>` for `$command` in 7.4+ ([#&#8203;590](https://github.com/phpstan/phpstan-src/pull/590)), thanks [@&#8203;dktapps](https://github.com/dktapps)! ### [`v0.12.93`](https://github.com/phpstan/phpstan/releases/tag/0.12.93) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.92...0.12.93) # Improvements 🔧 - Improvements and bugfixes related to `non-empty-string`: - Fix `implode()` for `non-empty-string` return type (https://github.com/phpstan/phpstan-src/commit/520ae229d592cd425e2ef1ea5eaa2816fe08f89c), [#&#8203;5291](https://github.com/phpstan/phpstan/issues/5291) - Fixed encapsed string and concat operator in regard to `non-empty-string` (https://github.com/phpstan/phpstan-src/commit/1283db7ae426142af99b41a480c964fb8a2c8c83), [#&#8203;5301](https://github.com/phpstan/phpstan/issues/5301) - Fix inferring `non-empty-string` in `array_map` closure (https://github.com/phpstan/phpstan-src/commit/b864a95b4616dd62a2df48908a103179946a4589), [#&#8203;5293](https://github.com/phpstan/phpstan/issues/5293) - Dynamic return type extension for functions that return `non-empty-string` when given one (https://github.com/phpstan/phpstan-src/commit/4a9e0695fcc57610804685722f136b5830b96c2d) - `str_pad()` function return type extension (https://github.com/phpstan/phpstan-src/commit/84503ce886e4e760de2211b1996c53c6aa63ba69), [#&#8203;5307](https://github.com/phpstan/phpstan/issues/5307) - `str_repeat()` function return type extension (https://github.com/phpstan/phpstan-src/commit/57d765f6729eee91a67e5f8b14d8601d10cde23e), [#&#8203;5307](https://github.com/phpstan/phpstan/issues/5307) - Cover non-empty-string in `htmlentities()` ([#&#8203;574](https://github.com/phpstan/phpstan/issues/574)) ([#&#8203;574](https://github.com/phpstan/phpstan-src/pull/574)), thanks [@&#8203;staabm](https://github.com/staabm)! - Cover non-empty-string in `substr` ([#&#8203;577](https://github.com/phpstan/phpstan-src/pull/577)), thanks [@&#8203;staabm](https://github.com/staabm)! - `DateTimeImmutable` removed from `DateTimeInterface` results in `DateTime` (https://github.com/phpstan/phpstan-src/commit/5eb96f55b75ae71acaa721ab831ac4a8c9647769), [#&#8203;5259](https://github.com/phpstan/phpstan/issues/5259) - Cover `non-empty-array` in `array_combine` ([#&#8203;578](https://github.com/phpstan/phpstan-src/pull/578)), thanks [@&#8203;staabm](https://github.com/staabm)! - Cover `non-empty-array` in `array_merge` ([#&#8203;581](https://github.com/phpstan/phpstan-src/pull/581)), thanks [@&#8203;staabm](https://github.com/staabm)! - Cover `FileHelper` methods with BC promise (https://github.com/phpstan/phpstan-src/commit/4f9488eb2e710f68a15632ee4115a4314f51a6f0), [#&#8203;5306](https://github.com/phpstan/phpstan/issues/5306) # Bugfixes 🐛 - `array_walk` also understands `object` ([#&#8203;573](https://github.com/phpstan/phpstan-src/pull/573)), thanks [@&#8203;niconoe-](https://github.com/niconoe-)! - Fix infinite recursion (https://github.com/phpstan/phpstan-src/commit/8fd9667c73710d586e90b5f5296575a3f6c9623a), [#&#8203;5231](https://github.com/phpstan/phpstan/issues/5231) - Final Exception methods can never throw an exception (https://github.com/phpstan/phpstan-src/commit/f5e88ae06ed144eacd3c042d77b0d4654e6bd84c), [#&#8203;5299](https://github.com/phpstan/phpstan/issues/5299) - Invalidating expressions without regexes (https://github.com/phpstan/phpstan-src/commit/4220e431da3e51c7a537b0ae26a825b0f3804fa1), [#&#8203;5129](https://github.com/phpstan/phpstan/issues/5129), [#&#8203;4970](https://github.com/phpstan/phpstan/issues/4970) - Filter by falsey condition after the while loop (https://github.com/phpstan/phpstan-src/commit/3166ba31a8768979a40e55f1bbfea9ba4449a3d8), [#&#8203;5328](https://github.com/phpstan/phpstan/issues/5328), [#&#8203;5322](https://github.com/phpstan/phpstan/issues/5322) # Function signature fixes 🤖 - `next()` dynamic return type extension also valid for `prev()` (https://github.com/phpstan/phpstan-src/commit/2fd7bfec455c20295ad1a3eee78fc399bb9fcfec - More array functions also accept `object` (https://github.com/phpstan/phpstan-src/commit/a056d3491645a0f7198b0396e9553cc0b9564972) - Fix return type of `Memcached::deleteMulti` ([#&#8203;582](https://github.com/phpstan/phpstan-src/pull/582)), thanks [@&#8203;paulbalandan](https://github.com/paulbalandan)! ### [`v0.12.92`](https://github.com/phpstan/phpstan/releases/tag/0.12.92) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.91...0.12.92) # Improvements 🔧 - New PHPDoc `non-empty-string` type (https://github.com/phpstan/phpstan-src/commit/6ef5e91effcbc5c5b3f49cd2cf423d67044b8941), [#&#8203;4711](https://github.com/phpstan/phpstan/issues/4711), [#&#8203;3981](https://github.com/phpstan/phpstan/issues/3981) - MissingReturnRule - make behavior with `checkPhpDocMissingReturn: false` more strict (https://github.com/phpstan/phpstan-src/commit/26560811765f0a93462180526b552834966c161b) - Update `nikic/php-parser` to work on PHP 8.1 again (https://github.com/phpstan/phpstan-src/commit/0f8ead706ba4b514e4a511c743645c065f52f195), [#&#8203;5263](https://github.com/phpstan/phpstan/issues/5263) # Bleeding edge 🔪 - Validate overriding methods in stubs (https://github.com/phpstan/phpstan-src/commit/c98d0a4946c373543c379427983e02ccef71f86c) - Cross-check generic interface implementations (https://github.com/phpstan/phpstan-src/commit/284af50d76210a449f210699732171ecacf3307f), [#&#8203;5222](https://github.com/phpstan/phpstan/issues/5222) *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)* # Bugfixes 🐛 - Don't try to create a directory that already exists ([#&#8203;572](https://github.com/phpstan/phpstan-src/pull/572)), thanks [@&#8203;PrinsFrank](https://github.com/PrinsFrank)! - ` !empty() `leads to `non-empty-string` (https://github.com/phpstan/phpstan-src/commit/790a83849468a0bc9eac43cb1b9594032653e342), [#&#8203;5258](https://github.com/phpstan/phpstan/issues/5258) - Fix mess in `ClassReflection::getInterfaces()` (https://github.com/phpstan/phpstan-src/commit/cd02bf86a65cfe87be22ad59c35bde25b82ab700), [#&#8203;4854](https://github.com/phpstan/phpstan/issues/4854) # Function signature fixes 🤖 - `explode()` always returns `non-empty-array` (https://github.com/phpstan/phpstan-src/commit/25260db5d6c9873f10e84ab6741bda56221ce21e) - Improve `sscanf()` signature ([#&#8203;567](https://github.com/phpstan/phpstan-src/pull/567)), thanks [@&#8203;fluffycondor](https://github.com/fluffycondor)! ### [`v0.12.91`](https://github.com/phpstan/phpstan/releases/tag/0.12.91) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.90...0.12.91) # Improvements 🔧 - Infer parameter types in arrow functions (https://github.com/phpstan/phpstan-src/commit/8fdc2d3fa83dce1fa6bc2d6fb37673b071ebca2a), [#&#8203;4902](https://github.com/phpstan/phpstan/issues/4902), [#&#8203;3660](https://github.com/phpstan/phpstan/issues/3660), [#&#8203;4083](https://github.com/phpstan/phpstan/issues/4083), [#&#8203;4681](https://github.com/phpstan/phpstan/issues/4681) - Use the same `php.ini` in child workers ([#&#8203;559](https://github.com/phpstan/phpstan-src/pull/559)), thanks [@&#8203;yangchaobj](https://github.com/yangchaobj)! - `strval()` dynamic return type extension ([#&#8203;568](https://github.com/phpstan/phpstan-src/pull/568)), thanks [@&#8203;jlherren](https://github.com/jlherren)! - Type cast fixes, add tests for `intval()`, `boolval()`, `floatval()` ([#&#8203;570](https://github.com/phpstan/phpstan-src/pull/570)), [#&#8203;4848](https://github.com/phpstan/phpstan/issues/4848), [#&#8203;5162](https://github.com/phpstan/phpstan/issues/5162), thanks [@&#8203;jlherren](https://github.com/jlherren)! - `next()` dynamic return type extension (https://github.com/phpstan/phpstan-src/commit/599f59bbc63ad95922367f1b3f86b75f2cda5021), [#&#8203;5253](https://github.com/phpstan/phpstan/issues/5253) - Update `nikic/php-parser` to 4.11.0 (https://github.com/phpstan/phpstan-src/commit/e42ae89604985a3861e4a62c1d932374e5f72956) # Bugfixes 🐛 - ConstantArrayTypeBuilder - preserve non-emptiness in generalized array (https://github.com/phpstan/phpstan-src/commit/427b73d310d1af11abd486eff6c13f6c298ceccf), [#&#8203;5219](https://github.com/phpstan/phpstan/issues/5219), [#&#8203;4829](https://github.com/phpstan/phpstan/issues/4829), [#&#8203;4844](https://github.com/phpstan/phpstan/issues/4844) - Support `object` for `ReflectionClass` and `ReflectionMethod` constructor throw types ([#&#8203;566](https://github.com/phpstan/phpstan-src/pull/566)), [#&#8203;5195](https://github.com/phpstan/phpstan/issues/5195), thanks [@&#8203;VincentLanglet](https://github.com/VincentLanglet)! - Fix for: Optional array key is not recognized with `!empty` ([#&#8203;569](https://github.com/phpstan/phpstan-src/pull/569)), [#&#8203;3784](https://github.com/phpstan/phpstan/issues/3784), [#&#8203;3700](https://github.com/phpstan/phpstan/issues/3700), [#&#8203;3297](https://github.com/phpstan/phpstan/issues/3297), thanks [@&#8203;ArtemGoutsoul](https://github.com/ArtemGoutsoul)! ### [`v0.12.90`](https://github.com/phpstan/phpstan/releases/tag/0.12.90) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.89...0.12.90) # Improvements 🔧 - Allow empty array shape (https://github.com/phpstan/phpstan-src/commit/d36852a25b531eb0f56e215d1a239ad1e01aa2cc), [#&#8203;5159](https://github.com/phpstan/phpstan/issues/5159) - ClassReflection: option to make `getTraits()` recursive ([#&#8203;557](https://github.com/phpstan/phpstan-src/pull/557)), thanks [@&#8203;IAmRGroot](https://github.com/IAmRGroot)! - Update BetterReflection with some performance optimizations (https://github.com/phpstan/phpstan-src/commit/dce3c85e5e6137809aee3ded3f519fe0d80482ea) # Bleeding edge 🔪 - Array functions stubs ([#&#8203;555](https://github.com/phpstan/phpstan-src/pull/555)), thanks [@&#8203;BackEndTea](https://github.com/BackEndTea)! *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)* # Bugfixes 🐛 - Revert "InstalledVersions.php no longer needs to be whitelisted" (https://github.com/phpstan/phpstan-src/commit/b902c38565dd1e7e4272b36a40c22f8c4cd1b0f2), [#&#8203;5157](https://github.com/phpstan/phpstan/issues/5157) - Fix evaluating match arm conditions (https://github.com/phpstan/phpstan-src/commit/7acf7ca6e4278690687720e471da133c2654e1c8), [#&#8203;5161](https://github.com/phpstan/phpstan/issues/5161) - `never` return type in PHPDoc wins over native type (https://github.com/phpstan/phpstan-src/commit/2c976fb167fd80af1d6be6b48407dd93639a7af2), [#&#8203;5089](https://github.com/phpstan/phpstan/issues/5089) - `ClosureType` typeOnly description is just `Closure` (https://github.com/phpstan/phpstan-src/commit/476520d6c325f9968c32de21464462df068d0565), [#&#8203;5164](https://github.com/phpstan/phpstan/issues/5164) - NonexistentOffsetInArrayDimFetchCheck - be less strict about `BenevolentUnionType` (https://github.com/phpstan/phpstan-src/commit/2abb92e2588808b3a8dd5cc3206041b7afa9891d), [#&#8203;5169](https://github.com/phpstan/phpstan/issues/5169) - ClosureType and CallableType - infer template types from callable parameters properly (https://github.com/phpstan/phpstan-src/commit/efa6aa60535eccc59e1e8e5816d339267eaf757a, https://github.com/phpstan/phpstan-src/commit/01f99c18c56f3909d7bfbf0a6c14303c8b1f1316), [#&#8203;3158](https://github.com/phpstan/phpstan/issues/3158) # Function signature fixes 🤖 - Allow `null` for `file_put_contents()` `$context` argument ([#&#8203;558](https://github.com/phpstan/phpstan-src/pull/558)), thanks [@&#8203;steevanb](https://github.com/steevanb)! ### [`v0.12.89`](https://github.com/phpstan/phpstan/releases/tag/0.12.89) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.88...0.12.89) # Improvements 🔧 - `ExceptionTypeResolver` as an interface allowing for custom implementations (https://github.com/phpstan/phpstan-src/commit/a125304a79a2e8871beb74b5abaf8576f18d5cf5, https://github.com/phpstan/phpstan-src/commit/dec03af364efc906947662478d38ff8ac63671e0), [#&#8203;5044](https://github.com/phpstan/phpstan/issues/5044) - Stub for `RecursiveArrayIterator` (https://github.com/phpstan/phpstan-src/commit/8c33955c1495f52913babd03d12e268ae6586e16) - RuleTestCase - throw internal errors (https://github.com/phpstan/phpstan-src/commit/93806cb5d624fc15af01d9c11bbfa2689e3a97f9) - Updated BetterReflection (https://github.com/phpstan/phpstan-src/commit/de00c86689b4cb8f865aa9e811a7712b69fff9d3) # Bleeding edge 🔪 - Backward Compatible PHPStan API rules (https://github.com/phpstan/phpstan-src/commit/8a05e0de75344d089a69a226b28a9067b98e5e88) - Learn more: https://phpstan.org/developing-extensions/backward-compatibility-promise - Inspect types for missing typehints recursively (https://github.com/phpstan/phpstan-src/commit/2f456b91bbbc8c376ad4e5866fc7a7b457710eab), [#&#8203;5148](https://github.com/phpstan/phpstan/issues/5148) - Inspect prefixed PHPDocs for invalid types recursively (https://github.com/phpstan/phpstan-src/commit/003d235cc59ed2a3b79d2960043d0d2b2d3b72e7), [#&#8203;3723](https://github.com/phpstan/phpstan/issues/3723) - Inspect unresolvable types in PHPDoc recursively (https://github.com/phpstan/phpstan-src/commit/1de5de80ecb02255251ee0324801c56ac30a1943), [#&#8203;3753](https://github.com/phpstan/phpstan/issues/3753) - Intersect array key type with `int|string` (https://github.com/phpstan/phpstan-src/commit/724c8bad2e458852f177df26cb863ad62aa0c41d), [#&#8203;3753](https://github.com/phpstan/phpstan/issues/3753) - Detect unresolvable return type after generic function call (https://github.com/phpstan/phpstan-src/commit/9070c5bce39105a186d03e3e5b6871c2b5d28550) *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)* # Bugfixes 🐛 - Editor URL - fix for traits (https://github.com/phpstan/phpstan-src/commit/bb841d20fe9ed0bb4cd6015645eccd5cb49c7ee4), [#&#8203;5030](https://github.com/phpstan/phpstan/issues/5030) - Allow `TARGET_PROPERTY` attributes on promoted properties ([#&#8203;528](https://github.com/phpstan/phpstan-src/pull/528)), [#&#8203;4418](https://github.com/phpstan/phpstan/issues/4418), thanks [@&#8203;dbrekelmans](https://github.com/dbrekelmans)! - More verbose messages for `IntegerRangeType` (https://github.com/phpstan/phpstan-src/commit/d23b4b75a6acf7b8734b4f6712d105334508bba8) - Throw type in result cache (https://github.com/phpstan/phpstan-src/commit/30ec3a0738c8d9b294f2524740e910311f3099ad), [#&#8203;5056](https://github.com/phpstan/phpstan/issues/5056) - Result cache - fix noticing changed extended interfaces (https://github.com/phpstan/phpstan-src/commit/d53a9a111b3c9984b0524ca0fb287fb4709df29c), [#&#8203;5056](https://github.com/phpstan/phpstan/issues/5056) - Correct VerbosityLevel in TooWide\*ReturnType rules (https://github.com/phpstan/phpstan-src/commit/838d1e45ea16dffa13aa8d2da08673f2d9ac5414), [#&#8203;5095](https://github.com/phpstan/phpstan/issues/5095), [#&#8203;4967](https://github.com/phpstan/phpstan/issues/4967), [#&#8203;3748](https://github.com/phpstan/phpstan/issues/3748) - CallToFunctionStamentWithoutSideEffectsRule - do not report PHPStan testing functions (https://github.com/phpstan/phpstan-src/commit/6eaf6c2d770589c42f6d6a405a2f203a66adcdb3) - Turns out static property can be accessed on trait too (https://github.com/phpstan/phpstan-src/commit/688a87f7036ad154b1e9d27be1e763872d30e7e1), [#&#8203;5143](https://github.com/phpstan/phpstan/issues/5143) - Reset ObjectType caches after stub validation (https://github.com/phpstan/phpstan-src/commit/33c9bdc712e18b6c7a3c35f0bddf8944aaa4b033), [#&#8203;5153](https://github.com/phpstan/phpstan/issues/5153) - TypeCombinator - fix intersecting BenevolentUnionType (https://github.com/phpstan/phpstan-src/commit/57e3cbf90e12b9c23633d7021dde659c5485079d) # Function signature fixes 🤖 - Fix `implode()` with named arguments (https://github.com/phpstan/phpstan-src/commit/18f8473fa5c8e957f5e24d25961160ac89afd506), [#&#8203;5018](https://github.com/phpstan/phpstan/issues/5018) - `intdiv()` throw extension ([#&#8203;527](https://github.com/phpstan/phpstan-src/pull/527)), thanks [@&#8203;VincentLanglet](https://github.com/VincentLanglet)! - Add `SimpleXMLElement` constructor throw type extension ([#&#8203;532](https://github.com/phpstan/phpstan-src/pull/532)), thanks [@&#8203;VincentLanglet](https://github.com/VincentLanglet)! - functionMap - remove duplicate keys (https://github.com/phpstan/phpstan-src/commit/e1efa03d7dc49475dcdeadd42df6ece82e53ce23), [#&#8203;5049](https://github.com/phpstan/phpstan/issues/5049) - `uopz_set_hook` fixes (https://github.com/phpstan/phpstan-src/commit/4effc89cbba8bc2954297fc7793c4a04d9d31b43) - Fix Date throw type extensions ([#&#8203;531](https://github.com/phpstan/phpstan-src/pull/531)), thanks [@&#8203;VincentLanglet](https://github.com/VincentLanglet)! - Fixed signatures of `gmp_div`, `odbc_exec` and `unregister_tick_function` ([#&#8203;533](https://github.com/phpstan/phpstan-src/pull/533)), thanks [@&#8203;danielmarschall](https://github.com/danielmarschall)! - Updated `phpstorm-stubs` (https://github.com/phpstan/phpstan-src/commit/bba66317f1516d1c2fc50397667b577574a988e6) - Updated PHP 8 stubs (https://github.com/phpstan/phpstan-src/commit/fcb5c12882baca8f93235ac1c5defee518c0c0fa, https://github.com/phpstan/phpstan-src/commit/1aa9af89b50ba94316202ad1605cff0652367d30, https://github.com/phpstan/phpstan-src/commit/63f40f14102d5c9c0b148006a703d2f5d23c9ced, https://github.com/phpstan/phpstan-src/commit/10a833fa90996f7c7e60e9acda33c9b66be81552), [#&#8203;5137](https://github.com/phpstan/phpstan/issues/5137) - Update return type hint for `stream_bucket_make_writeable` ([#&#8203;537](https://github.com/phpstan/phpstan-src/pull/537)), thanks [@&#8203;bytestream](https://github.com/bytestream)! - Make second parameter of `toPHP` optional ([#&#8203;543](https://github.com/phpstan/phpstan-src/pull/543)), thanks [@&#8203;franmomu](https://github.com/franmomu)! - Revert Incorrect return type for `SplFileObject::fgetcsv()` ([#&#8203;479](https://github.com/phpstan/phpstan-src/pull/479)), thanks [@&#8203;VincentLanglet](https://github.com/VincentLanglet)! - Correct the signature of `mysqli_get_client_version()` ([#&#8203;545](https://github.com/phpstan/phpstan-src/pull/545)), thanks [@&#8203;johnbillion](https://github.com/johnbillion)! - Dynamic return type for `number_format` ([#&#8203;553](https://github.com/phpstan/phpstan-src/pull/553)), thanks [@&#8203;BackEndTea](https://github.com/BackEndTea)! - Reflection throw type extensions ([#&#8203;552](https://github.com/phpstan/phpstan-src/pull/552)), thanks [@&#8203;VincentLanglet](https://github.com/VincentLanglet)! ### [`v0.12.88`](https://github.com/phpstan/phpstan/releases/tag/0.12.88) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.87...0.12.88) # Improvements 🔧 - ExceptionTypeResolver - support listing checked exception types (https://github.com/phpstan/phpstan-src/commit/349b3b301b5bc4c8625473dd4f9ca104b62edcf2), [#&#8203;4996](https://github.com/phpstan/phpstan/issues/4996) - Configuration parameter `editorUrl` to add clickable file URLs to output ([#&#8203;515](https://github.com/phpstan/phpstan-src/pull/515)), thanks [@&#8203;ThomasLandauer](https://github.com/ThomasLandauer)! # Bugfixes 🐛 - Use 1 CPU only when `proc_open` function is disabled ([#&#8203;514](https://github.com/phpstan/phpstan-src/pull/514)), thanks [@&#8203;mvorisek](https://github.com/mvorisek)! - Allow combining full and shortcut versions of `excludePaths` in the same config hierarchy (https://github.com/phpstan/phpstan-src/commit/e7ac788e0e5d0284f64334aaa4e2f0371f626b9a), [#&#8203;4561](https://github.com/phpstan/phpstan/issues/4561) - String starting with `\` is valid class name (https://github.com/phpstan/phpstan-src/commit/428baf5f91fa623a51c236a899f308408b3d85fd), [#&#8203;5002](https://github.com/phpstan/phpstan/issues/5002) - Fix `is_array()` false positive (https://github.com/phpstan/phpstan-src/commit/187921e352e1d891f33a5f1f932ceaba63fa74b7), [#&#8203;4999](https://github.com/phpstan/phpstan/issues/4999) - Fix `TemplateUnionType` as part of intersection (https://github.com/phpstan/phpstan-src/commit/4a45db594789fe1b9cafd0d013359eba8790bd3a), [#&#8203;5000](https://github.com/phpstan/phpstan/issues/5000) - Fix PHP warning for `*` ignore path when `open_basedir` is set ([#&#8203;519](https://github.com/phpstan/phpstan-src/pull/519)), thanks [@&#8203;mvorisek](https://github.com/mvorisek)! # Function signature fixes 🤖 - functionMap: Be strict about array_flip input type ([#&#8203;518](https://github.com/phpstan/phpstan-src/pull/518)), thanks [@&#8203;mind-bending-forks](https://github.com/mind-bending-forks)! - Fix `number_format()` with named arguments ([#&#8203;524](https://github.com/phpstan/phpstan-src/pull/524)), thanks [@&#8203;matyx](https://github.com/matyx)! - `DateInterval` extension ([#&#8203;520](https://github.com/phpstan/phpstan-src/pull/520)), thanks [@&#8203;VincentLanglet](https://github.com/VincentLanglet)! ### [`v0.12.87`](https://github.com/phpstan/phpstan/releases/tag/0.12.87) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.86...0.12.87) # Major new feature 🚀 **New exceptions-related rules** - Differentiate between checked and unchecked exceptions - Enforce declaring thrown checked exceptions in `@throws` - Report extra exceptions in `@throws` that aren't actually thrown [Read this article for more details »](https://phpstan.org/blog/bring-your-exceptions-under-control) # Improvements 🔧 - Update `composer/xdebug-handler` (https://github.com/phpstan/phpstan-src/commit/0b6b60260164e0099f1d21bd579f7a379404084d) # Bugfixes 🐛 - TypeSpecifier - fix assignments in type-narrowing functions (https://github.com/phpstan/phpstan-src/commit/b2bf7030d9c6aae898c2349f00570359f7c94998), [#&#8203;4982](https://github.com/phpstan/phpstan/issues/4982), [#&#8203;4761](https://github.com/phpstan/phpstan/issues/4761), [#&#8203;3331](https://github.com/phpstan/phpstan/issues/3331), [#&#8203;3446](https://github.com/phpstan/phpstan/issues/3446), [#&#8203;2640](https://github.com/phpstan/phpstan/issues/2640), [#&#8203;2413](https://github.com/phpstan/phpstan/issues/2413), [#&#8203;3106](https://github.com/phpstan/phpstan/issues/3106) - Fix `throw` expression throw point (https://github.com/phpstan/phpstan-src/commit/1e4f2e12e16857c3a0b69abdc339ad08f1b3027e) - Generics - fix handling optional parameter (https://github.com/phpstan/phpstan-src/commit/73064057360012748d2bbf81406775027d2e96f7) - BenevolentUnionType - be benevolent about TrinaryLogic methods (https://github.com/phpstan/phpstan-src/commit/eeb08ba01269e75686fd029657c9b33566a844f8) - FileTypeMapper - fix PHPDocs after anonymous class (https://github.com/phpstan/phpstan-src/commit/00ff86b2eab4f8e67170394ca105ad65ba4b1104), https://github.com/phpstan/phpstan/discussions/4985 # Function signature fixes 🤖 - Updated `getopt()` return type (https://github.com/phpstan/phpstan-src/commit/94b6c03ba3c05f725843e193d17f512f2c19de7a), [#&#8203;4987](https://github.com/phpstan/phpstan/issues/4987), thanks [@&#8203;dktapps](https://github.com/dktapps)! ### [`v0.12.86`](https://github.com/phpstan/phpstan/releases/tag/0.12.86) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.85...0.12.86) # Improvements 🔧 - Inline `@throws` support (https://github.com/phpstan/phpstan-src/commit/48bfa70312035102e3cc781d9ed23d02ec0e6bc9) - Updated PHP-Parser to 4.10.5 (https://github.com/phpstan/phpstan-src/commit/4ee1fa1df8821c84885576c31cbf92d0c663d80d) # Bugfixes 🐛 - `new ReflectionClass()` can throw `ReflectionException` (https://github.com/phpstan/phpstan-src/commit/00d3ef418f672f1aa012ed26ce6d09cf6a510cec) - Fix PHPStan Pro reanalyse results (https://github.com/phpstan/phpstan-src/commit/179b2131dec2e3b2f7147a707e278e45eadbe863) - `DateTime` and `DateTimeImmutable` constructor does not always throw Exception (https://github.com/phpstan/phpstan-src/commit/181f75ce89a521aebc0336a61352b821645c738a) - Do not attempt to autoload invalid classnames (https://github.com/phpstan/phpstan-src/commit/56566eb9a94698b6268cc11c25323cdff30d1758), [#&#8203;4953](https://github.com/phpstan/phpstan/issues/4953) # Function signature fixes 🤖 - Fixed `wincache_ucache_inc` and `wincache_ucache_dec` (https://github.com/phpstan/phpstan-src/commit/671f404140fd18e19f43368bcc78eb64aab9380e), [#&#8203;4952](https://github.com/phpstan/phpstan/issues/4952) - Fixed `Redis::scan()` signature (https://github.com/phpstan/phpstan-src/commit/8fe9e606b54366a5aa217bff0928cb8dda7a9378), [#&#8203;4929](https://github.com/phpstan/phpstan/issues/4929) - `IntlDateFormatter::parse` can define variable by reference ([#&#8203;509](https://github.com/phpstan/phpstan-src/pull/509)), thanks [@&#8203;francescolaffi](https://github.com/francescolaffi)! ### [`v0.12.85`](https://github.com/phpstan/phpstan/releases/tag/0.12.85) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.84...0.12.85) # Improvements 🔧 - TypeInferenceTestCase - allow 3rd parties same modern style of type inference testing as in NodeScopeResolverTest (https://github.com/phpstan/phpstan-src/commit/3af8630723f11a4683aae788903622c402ac3315), documentation: https://phpstan.org/developing-extensions/testing - Dynamic throw type extensions (https://github.com/phpstan/phpstan-src/commit/2bf30bff0b91e2c8144171ce6892fd9098183eff), [#&#8203;4814](https://github.com/phpstan/phpstan/issues/4814), [#&#8203;4819](https://github.com/phpstan/phpstan/issues/4819), documentation: https://phpstan.org/developing-extensions/dynamic-throw-type-extensions - Nicer error when StubValidator throws an internal exception (https://github.com/phpstan/phpstan-src/commit/008f32479b2107562a2bf35e6395dc8242c7ef57), https://github.com/phpstan/phpstan-symfony/pull/148 # Bugfixes 🐛 - Fixed `===` and `!==` type inference with `treatPhpDocTypesAsCertain: false` ([#&#8203;476](https://github.com/phpstan/phpstan-src/pull/476)), thanks [@&#8203;ruudk](https://github.com/ruudk)! - Address [#&#8203;4881](https://github.com/phpstan/phpstan/issues/4881) by implementing a more complete fake stream wrapper ([#&#8203;501](https://github.com/phpstan/phpstan-src/pull/501)), thanks [@&#8203;rrazor](https://github.com/rrazor)! - Disable OPCache for PHP < 7.4.x, [#&#8203;4881](https://github.com/phpstan/phpstan/issues/4881) ([#&#8203;501](https://github.com/phpstan/phpstan-src/pull/501)), thanks [@&#8203;rrazor](https://github.com/rrazor)! - Read PHPDocs for built-in method even if the method has multiple variants (https://github.com/phpstan/phpstan-src/commit/b48fd77987822a500fd9b304386d455d8cf3f1b9), [#&#8203;4821](https://github.com/phpstan/phpstan/issues/4821) - `yield` has implicit throw point (https://github.com/phpstan/phpstan-src/commit/033aeffa4b63428934f5000092c582c028cdc53d), [#&#8203;4863](https://github.com/phpstan/phpstan/issues/4863) - Built-in PHP functions without required parameters and no arguments passed do not have implicit throw point (https://github.com/phpstan/phpstan-src/commit/09d34887f805437a216a388aadce4bd83aaaab51), [#&#8203;4838](https://github.com/phpstan/phpstan/issues/4838) - Throwable catch block also uses implicit throw points even when there are explicit ones (https://github.com/phpstan/phpstan-src/commit/54a204ee29a1ef64d2288a6ed4084c0abe121cd0), [#&#8203;4820](https://github.com/phpstan/phpstan/issues/4820), [#&#8203;4879](https://github.com/phpstan/phpstan/issues/4879) - MethodsClassReflectionExtension for SoapClient magic methods (https://github.com/phpstan/phpstan-src/commit/f6107ad8ff07144d1f3c84a59e92303cbbf0ea04), [#&#8203;4822](https://github.com/phpstan/phpstan/issues/4822), [#&#8203;262](https://github.com/phpstan/phpstan/issues/262) - PHP does not cache `is_dir()` and similar function values for nonexistent files (https://github.com/phpstan/phpstan-src/commit/1eaef0463d2347bdbef3612da158853519867d82), [#&#8203;4816](https://github.com/phpstan/phpstan/issues/4816) - Severity field in GitLab error formatter, GitLab 13.x expects the field in code quality reports ([#&#8203;504](https://github.com/phpstan/phpstan-src/pull/504)), thanks [@&#8203;stockalexander](https://github.com/stockalexander)! - Type-specified nullsafe call also removes null from the chain (https://github.com/phpstan/phpstan-src/commit/662240117e38bdf3fa6628f767e8e3010e28dd9b), [#&#8203;4757](https://github.com/phpstan/phpstan/issues/4757), [#&#8203;4690](https://github.com/phpstan/phpstan/issues/4690) # Function signature fixes 🤖 - Dynamic return type extension for `date_create_from_format` and `date_create_immutable_from_format` ([#&#8203;502](https://github.com/phpstan/phpstan-src/pull/502)), thanks [@&#8203;pascalheidmann](https://github.com/pascalheidmann)! ### [`v0.12.84`](https://github.com/phpstan/phpstan/releases/tag/0.12.84) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.83...0.12.84) # Major new feature 🚀 **Local type aliases** Thanks to [@&#8203;jiripudil](https://github.com/jiripudil) and his PR https://github.com/phpstan/phpstan-src/pull/460, you can now enjoy `@phpstan-type` and `@phpstan-import-type` in class-level PHPDoc. [See the documentation for more details.](https://phpstan.org/writing-php-code/phpdoc-types#local-type-aliases) # Improvements 🔧 - Add `AlwaysUsedClassConstantsExtension` interface ([#&#8203;495](https://github.com/phpstan/phpstan-src/pull/495)), [#&#8203;4859](https://github.com/phpstan/phpstan/issues/4859), thanks [@&#8203;jdecool](https://github.com/jdecool)! - Remove unnecessary dependencies (https://github.com/phpstan/phpstan-src/commit/2cd7a03473a26867d6d64f5f295e4cb875f8da50) # Bugfixes 🐛 - `unlink()` also clears stat cache (https://github.com/phpstan/phpstan-src/commit/63d06709e42d2b0540641fb6d0351624aa73b871), [#&#8203;4797](https://github.com/phpstan/phpstan/issues/4797) - Named arguments - fix optional arguments and variadics (https://github.com/phpstan/phpstan-src/commit/3e5621ea5471da1c10c40652498957e60a71eeb6), [#&#8203;4800](https://github.com/phpstan/phpstan/issues/4800) - Fix `Closure::bind()` (https://github.com/phpstan/phpstan-src/commit/566b44b1c78346626156cf2e2939d6611db7cddd), [#&#8203;4808](https://github.com/phpstan/phpstan/issues/4808) - Fix CatchWithUnthrownExceptionRule for `new $expr()` (https://github.com/phpstan/phpstan-src/commit/8463afd91e2c3a3740f4ef7de07cf77d9986d48e), [#&#8203;4806](https://github.com/phpstan/phpstan/issues/4806) - Fix CatchWithUnthrownExceptionRule for `$expr::foo()` (https://github.com/phpstan/phpstan-src/commit/8c7cf85904337d3b2cfe795994fd1dcf6c670349), [#&#8203;4805](https://github.com/phpstan/phpstan/issues/4805) - Allow autoloaders to `require`/`require_once` for [#&#8203;4836](https://github.com/phpstan/phpstan/issues/4836) via a fake read ([#&#8203;491](https://github.com/phpstan/phpstan-src/pull/491)), thanks [@&#8203;rrazor](https://github.com/rrazor)! - Get closer to how type inference in TypeScript works (https://github.com/phpstan/phpstan-src/commit/3be90f0591fb7af732351e26d9e3e4af59372c1b), [#&#8203;4803](https://github.com/phpstan/phpstan/issues/4803) - Fix throwpoint in elseif condition (https://github.com/phpstan/phpstan-src/commit/fb62e5ec90de7cd41a66c44eab27645b9368680d) - Fix excessive memory usage (https://github.com/phpstan/phpstan-src/commit/7c0146cf804344d702cfcf62fb7c70690a5cdc07), [#&#8203;4815](https://github.com/phpstan/phpstan/issues/4815) # Function signature fixes 🤖 - Update XSLTProcessor::transformToXML signature ([#&#8203;492](https://github.com/phpstan/phpstan-src/pull/492)), thanks [@&#8203;jawira](https://github.com/jawira)! - Update `rediscluster` inspections ([#&#8203;493](https://github.com/phpstan/phpstan-src/pull/493)), thanks [@&#8203;sudo-plz](https://github.com/sudo-plz)! - Fix `array_sum` return type ([#&#8203;494](https://github.com/phpstan/phpstan-src/pull/494)), thanks [@&#8203;VincentLanglet](https://github.com/VincentLanglet)! - Fix wrong IntlDateFormatter format signature ([#&#8203;496](https://github.com/phpstan/phpstan-src/pull/496)), thanks [@&#8203;alfredbez](https://github.com/alfredbez)! ### [`v0.12.83`](https://github.com/phpstan/phpstan/releases/tag/0.12.83) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.82...0.12.83) # Improvements 🔧 - **Precise try-catch-finally analysis** ([#&#8203;481](https://github.com/phpstan/phpstan-src/pull/481)), thanks [@&#8203;rainbow-alex](https://github.com/rainbow-alex) for the kick-off of this feature! - [Learn more on PHPStan's blog](https://phpstan.org/blog/precise-try-catch-finally-analysis) - Fixes: [#&#8203;1597](https://github.com/phpstan/phpstan/issues/1597), [#&#8203;3617](https://github.com/phpstan/phpstan/issues/3617), [#&#8203;778](https://github.com/phpstan/phpstan/issues/778), [#&#8203;2969](https://github.com/phpstan/phpstan/issues/2969), [#&#8203;3004](https://github.com/phpstan/phpstan/issues/3004), [#&#8203;3710](https://github.com/phpstan/phpstan/issues/3710), [#&#8203;3822](https://github.com/phpstan/phpstan/issues/3822), [#&#8203;505](https://github.com/phpstan/phpstan/issues/505), [#&#8203;1670](https://github.com/phpstan/phpstan/issues/1670), [#&#8203;1219](https://github.com/phpstan/phpstan/issues/1219), [#&#8203;3302](https://github.com/phpstan/phpstan/issues/3302) - Dependent types - understand truthy BooleanOr and falsey BooleanAnd scope (https://github.com/phpstan/phpstan-src/commit/2c42ef18ae4c2da04e10ba9519b09d16abe147aa), [#&#8203;4733](https://github.com/phpstan/phpstan/issues/4733), [#&#8203;4326](https://github.com/phpstan/phpstan/issues/4326), [#&#8203;987](https://github.com/phpstan/phpstan/issues/987), [#&#8203;4215](https://github.com/phpstan/phpstan/issues/4215), [#&#8203;4695](https://github.com/phpstan/phpstan/issues/4695) - Dependent types - save conditional expression after variable assignment (https://github.com/phpstan/phpstan-src/commit/56ae015b578c3e38a74d70de807e4f42995936b7), [#&#8203;2977](https://github.com/phpstan/phpstan/issues/2977), [#&#8203;3190](https://github.com/phpstan/phpstan/issues/3190) # Bleeding edge 🔪 - **Consistent remembering and forgetting returned values** (https://github.com/phpstan/phpstan-src/commit/d4edc59b36927a2d70f2e8665e657f99dd9d6be2) - [Learn more on PHPStan's blog](https://phpstan.org/blog/remembering-and-forgetting-returned-values) - Fixes: [#&#8203;2420](https://github.com/phpstan/phpstan/issues/2420), [#&#8203;4588](https://github.com/phpstan/phpstan/issues/4588), [#&#8203;3553](https://github.com/phpstan/phpstan/issues/3553), [#&#8203;3382](https://github.com/phpstan/phpstan/issues/3382), [#&#8203;4177](https://github.com/phpstan/phpstan/issues/4177), [#&#8203;4091](https://github.com/phpstan/phpstan/issues/4091), [#&#8203;2288](https://github.com/phpstan/phpstan/issues/2288), [#&#8203;1157](https://github.com/phpstan/phpstan/issues/1157) - Report dead catch with exception that is not thrown in the try block - level 4 (https://github.com/phpstan/phpstan-src/commit/ce9299c0e9ab55fc63d7a2e0814c99cc221cb514) - Rule for detecting overwriting exit points in finally - level 4 (https://github.com/phpstan/phpstan-src/commit/3f712be7c4a840fcae3bb8d3ebfa888ead4e964e) *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)* # Bugfixes 🐛 - Fixed detecting method signature compatibility (https://github.com/phpstan/phpstan-src/commit/8f0150d6dc3252ae7ac3e951313923928d03a950), [#&#8203;4729](https://github.com/phpstan/phpstan/issues/4729) - Fixed inferring template types from ThisType (https://github.com/phpstan/phpstan-src/commit/a843d871672498f08486a40f5b5c2b35212b4965), [#&#8203;4725](https://github.com/phpstan/phpstan/issues/4725) - More robust PHPDoc parsing (https://github.com/phpstan/phpstan-src/commit/5d37113e5193da26b03c78c5eb64bc963556953f), [#&#8203;4731](https://github.com/phpstan/phpstan/issues/4731) - Support the `$foo ?? false` pattern when making sure variable exists (https://github.com/phpstan/phpstan-src/commit/c4cc66895946eaab81b54ff5b5f03dde607a0458), [#&#8203;560](https://github.com/phpstan/phpstan/issues/560) - `mt_rand` and `rand` are not pure (https://github.com/phpstan/phpstan-src/commit/edc84462e42d690c62d90b165b21fb98451434bc) - `random_int` and `random_bytes` are not deterministic (https://github.com/phpstan/phpstan-src/commit/f36fa71374e831228cefe29f59ab9762a87cb11d), [#&#8203;4190](https://github.com/phpstan/phpstan/issues/4190) - Invalidate `is_file()` calls and similar only after `clearstatcache()` (https://github.com/phpstan/phpstan-src/commit/bcc8d61a5ea435c277630d2f3ba9e709801eb3f0) - Invalidate object state after passing to impure function (https://github.com/phpstan/phpstan-src/commit/f92b95ed5d054c0fc0b2ad2e0a2460cf14a0c515), [#&#8203;3203](https://github.com/phpstan/phpstan/issues/3203) - BaselineNeonErrorFormatter: Sort output by file and pattern ([#&#8203;483](https://github.com/phpstan/phpstan-src/pull/483)), thanks [@&#8203;dktapps](https://github.com/dktapps)! - Match expression - do not complain about void in arm body (https://github.com/phpstan/phpstan-src/commit/90e49f7074c0492d7480faabcfd9eb0de19ccfc9, https://github.com/phpstan/phpstan-src/commit/2c0dda3212bdd63df57d146822aa07ff0d412840), [#&#8203;4292](https://github.com/phpstan/phpstan/issues/4292) - Fix merging scopes with narrowed constant types (https://github.com/phpstan/phpstan-src/commit/42d0b363727a8acc7251e41f7ca0ef395630c547), [#&#8203;4434](https://github.com/phpstan/phpstan/issues/4434) - Allow phpVersion up to 80099 (https://github.com/phpstan/phpstan-src/commit/4db2e1427e0e45fb3f19cc2a8adc2852fb1e1fcd), [#&#8203;4762](https://github.com/phpstan/phpstan/discussions/4762) - Fix Access to an undefined static property in `Closure::bind` ([#&#8203;489](https://github.com/phpstan/phpstan-src/pull/489)), thanks [@&#8203;VincentLanglet](https://github.com/VincentLanglet)! - Add `array_sum()` dynamic return type extension ([#&#8203;490](https://github.com/phpstan/phpstan-src/pull/490)), thanks [@&#8203;VincentLanglet](https://github.com/VincentLanglet)! - Fix `NativeMethodReflection::hasSideEffects()` (https://github.com/phpstan/phpstan-src/commit/98fb5404cba99a36494b2f9263ed429c283ce623), [#&#8203;4231](https://github.com/phpstan/phpstan/issues/4231), [#&#8203;4287](https://github.com/phpstan/phpstan/issues/4287) - TypeSpecifier - support IntegerRangeType with `count()` (https://github.com/phpstan/phpstan-src/commit/7b417c7f3e9d95ded5187cbb58f39ebe0cf45d38), [#&#8203;4700](https://github.com/phpstan/phpstan/issues/4700) - Improved performance (https://github.com/phpstan/phpstan-src/commit/dbe08a6feac7e98725fa8baec20c1309867e8f03, https://github.com/phpstan/phpstan-src/commit/626f72aaf408aa27422c74215599823999bed4dc, https://github.com/phpstan/phpstan-src/commit/1463c571cfe547cf7e17b42b81a8ec95ba7f0ff5, https://github.com/phpstan/phpstan-src/commit/91f477f040dad26f340214e43798910607f5d184), [#&#8203;4723](https://github.com/phpstan/phpstan/issues/4723) - Fix problem with generics and inheritance, [#&#8203;4008](https://github.com/phpstan/phpstan/issues/4008), [#&#8203;3546](https://github.com/phpstan/phpstan/issues/3546) - Fix native static return typehint when entering class method (https://github.com/phpstan/phpstan-src/commit/baa371e86541071fe6914c54efae8d3f2dbdd3f9), [#&#8203;4795](https://github.com/phpstan/phpstan/discussions/4795) # Function signature fixes 🤖 - Fix function-map for PDOStatement pass-by-reference functions ([#&#8203;480](https://github.com/phpstan/phpstan-src/pull/480)), thanks [@&#8203;jaylinski](https://github.com/jaylinski)! - Add uopz 6.x functions ([#&#8203;482](https://github.com/phpstan/phpstan-src/pull/482)), thanks [@&#8203;zonuexe](https://github.com/zonuexe)! ### [`v0.12.82`](https://github.com/phpstan/phpstan/releases/tag/0.12.82) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.81...0.12.82) # Improvements 🔧 - Support for generic traits and specifying template types with `@use` (https://github.com/phpstan/phpstan-src/commit/87669234363d89252583664ef71309d5d8d3c7c1), [#&#8203;4423](https://github.com/phpstan/phpstan/issues/4423) - Result cache - invalidate when project extensions are edited (https://github.com/phpstan/phpstan-src/commit/1e53ab65f0ff353e88862f13de8a05f262f8d8b6), https://github.com/phpstan/phpstan/discussions/4691 - Make `RecursiveIterator` generic (https://github.com/phpstan/phpstan-src/commit/82596f5d66adaf7cdab5f74ade2ea30e2a806d9b), [#&#8203;4718](https://github.com/phpstan/phpstan/issues/4718) - Update [phpstan/phpdoc-parser](https://github.com/phpstan/phpdoc-parser) to 0.5 (https://github.com/phpstan/phpstan-src/commit/3e1d2003e58f30126ef2c16016a0ec14beb6a5bf) # Bugfixes 🐛 - Eliminate non-generic types before inferring from unions (https://github.com/phpstan/phpstan-src/commit/a1b7b38fb538efb6be5d678a83979d5538755610), [#&#8203;2575](https://github.com/phpstan/phpstan/issues/2575), [#&#8203;4130](https://github.com/phpstan/phpstan/issues/4130), [#&#8203;3623](https://github.com/phpstan/phpstan/issues/3623) - Calling `static::` preserves generic types (https://github.com/phpstan/phpstan-src/commit/d4e0177a352646142d2faf7c406cfa7d683566b7), [#&#8203;3251](https://github.com/phpstan/phpstan/issues/3251), [#&#8203;2231](https://github.com/phpstan/phpstan/issues/2231) - Resolve `static` type in the typesystem, not in scope ([#&#8203;474](https://github.com/phpstan/phpstan-src/pull/474)), [#&#8203;4213](https://github.com/phpstan/phpstan/issues/4213), [#&#8203;4648](https://github.com/phpstan/phpstan/issues/4648), [#&#8203;3523](https://github.com/phpstan/phpstan/issues/3523), [#&#8203;3120](https://github.com/phpstan/phpstan/issues/3120), [#&#8203;1652](https://github.com/phpstan/phpstan/issues/1652), [#&#8203;4267](https://github.com/phpstan/phpstan/issues/4267) - Fixed handling of `static` in parameter type in implemented interfaces (https://github.com/phpstan/phpstan-src/commit/d225a68cb3a06ff04ce254a14664ff11aef2589c), [#&#8203;4707](https://github.com/phpstan/phpstan/issues/4707), [#&#8203;3118](https://github.com/phpstan/phpstan/issues/3118) - Calling `parent::` preserves generic types (https://github.com/phpstan/phpstan-src/commit/4acbc6c4f70bcaf1d8eb2b18b8af9018f2732004), [#&#8203;2231](https://github.com/phpstan/phpstan/issues/2231), [#&#8203;2621](https://github.com/phpstan/phpstan/issues/2621), [#&#8203;3537](https://github.com/phpstan/phpstan/issues/3537), [#&#8203;3251](https://github.com/phpstan/phpstan/issues/3251) - Fix: phpdoc cache collision with identical aliases & variable names ([#&#8203;471](https://github.com/phpstan/phpstan-src/pull/471)), thanks [@&#8203;rainbow-alex](https://github.com/rainbow-alex)! - Fixed getting class constants PHPDoc from wrong file (https://github.com/phpstan/phpstan-src/commit/6d523028e399c15dc77aec3affd2ea97ff735925), https://github.com/phpstan/phpstan-deprecation-rules/pull/35 - Fix default method parameter value mentioning `::class` constant (https://github.com/phpstan/phpstan-src/commit/431905c1302f6aab67a479e38e2d8195d7fcde2a), [#&#8203;4713](https://github.com/phpstan/phpstan/issues/4713), [#&#8203;4066](https://github.com/phpstan/phpstan/issues/4066) - Fix default trait method parameter mentioning constant from the using class (https://github.com/phpstan/phpstan-src/commit/8babba3f116644bd15cf676f665cd724e83601a3), [#&#8203;4288](https://github.com/phpstan/phpstan/issues/4288) - Fixed native expression type for by-ref variable after closure ([#&#8203;477](https://github.com/phpstan/phpstan-src/pull/477)), [#&#8203;4657](https://github.com/phpstan/phpstan/issues/4657), thanks [@&#8203;ruudk](https://github.com/ruudk)! - Make functions present in functionMap but not in PhpStorm stubs known (https://github.com/phpstan/phpstan-src/commit/b51a26fd0951b95096a07c88f95cc602cfbc68d9), [#&#8203;4702](https://github.com/phpstan/phpstan/issues/4702) - PHP 8 supports `%h` and `%H` in printf/sprintf (https://github.com/phpstan/phpstan-src/commit/0cbbfba2a76119ea3a808f200f035006ee9e4622), [#&#8203;4717](https://github.com/phpstan/phpstan/issues/4717) - Fix DsMapDynamicReturnTypeExtension (https://github.com/phpstan/phpstan-src/commit/330eb221a92ac75d1bae557effd19ae028b1ace5), [#&#8203;4545](https://github.com/phpstan/phpstan/issues/4545) - Regression tests for already solved issues (https://github.com/phpstan/phpstan-src/commit/d01431c5c2c72a450335277cc443aee095d1df3a), [#&#8203;3558](https://github.com/phpstan/phpstan/issues/3558), [#&#8203;3351](https://github.com/phpstan/phpstan/issues/3351), [#&#8203;1843](https://github.com/phpstan/phpstan/issues/1843) # Function signature fixes 🤖 - Fix `XMLReader::open()` return type (https://github.com/phpstan/phpstan-src/pull/456), thanks [@&#8203;jeroennoten](https://github.com/jeroennoten)! ### [`v0.12.81`](https://github.com/phpstan/phpstan/releases/tag/0.12.81) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.80...0.12.81) # Improvements 🔧 - **Support for running PHPStan without any arguments** (https://github.com/phpstan/phpstan-src/commit/469a8c3dc32141c2783e61f4ac0fd4c7ac726d15) - You can run PHPStan just by executing `vendor/bin/phpstan`, if you satisfy two conditions: - You have `phpstan.neon` (or `phpstan.neon.dist`) in your current working directory - This configuration file contains [rule `level`](https://phpstan.org/config-reference#rule-level) parameter, and [`paths` to analyse](https://phpstan.org/config-reference#analysed-files) - Fix support for classes named after pseudotypes in PHPDocs ([#&#8203;365](https://github.com/phpstan/phpstan-src/pull/365)), thanks [@&#8203;stof](https://github.com/stof)! - This means that existing classes with names like `Resource` or `Never` are now correctly recognized in PHPDocs and have priority over PHP's `resource` type and PHPStan's `never` pseudotype - Understand `noreturn` in PHPDoc as NeverType (https://github.com/phpstan/phpstan-src/commit/bce31f014da8302be403e40c76158a83d96a967a) - Docker - support ARM architecture (https://github.com/phpstan/phpstan/pull/4663) # Bugfixes 🐛 - Updated PHP 8 stubs (https://github.com/phpstan/phpstan-src/commit/8382e35a2b60d4a121d5b20aeb8871b734a9c4dc) - Fix infinite recursion when asking `isSuperTypeOf()` between template union types (https://github.com/phpstan/phpstan-src/commit/9f51f8e6dde3ff01c335848e2f16c7bc56174a6d), [#&#8203;4670](https://github.com/phpstan/phpstan/issues/4670) - Fix generic variance with BenevolentUnionType (https://github.com/phpstan/phpstan-src/commit/49dcc504cfb97060953e9712b1c3cb18a53ffe6e), [#&#8203;4634](https://github.com/phpstan/phpstan/issues/4634) - Nested generic type - correctly infer template types (https://github.com/phpstan/phpstan-src/commit/48aea56c5ed8fda80caf3d1dbaa8b9dd2c8fd301), [#&#8203;4642](https://github.com/phpstan/phpstan/issues/4642) - Fixed false positive about unreferenced template type in a parameter with nested generics (https://github.com/phpstan/phpstan-src/commit/0725f5a71113e399e077bf9ae038467e69c1e0bc), [#&#8203;4641](https://github.com/phpstan/phpstan/issues/4641) - Fixed class-scoped template type used as a bound in method-scoped template type (https://github.com/phpstan/phpstan-src/commit/e68ca10bf5bf5fa72bc35de4800b0ea71f7f50b5), [#&#8203;4643](https://github.com/phpstan/phpstan/issues/4643) # Function signature fixes 🤖 - Fixed incorrect return type for `SplFileObject::fgetcsv()` ([#&#8203;464](https://github.com/phpstan/phpstan-src/pull/464)), thanks [@&#8203;TomAdam](https://github.com/TomAdam)! ### [`v0.12.80`](https://github.com/phpstan/phpstan/releases/tag/0.12.80) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.79...0.12.80) # Improvements 🔧 - **Nested generic type bounds** (https://github.com/phpstan/phpstan-src/commit/e671cc0a5d5c218d4c10aeea9773eb2189c74a34), [#&#8203;2928](https://github.com/phpstan/phpstan/issues/2928), [#&#8203;3922](https://github.com/phpstan/phpstan/issues/3922) - You can now use for example `@template T` + `@template U of Query<T>`. - Useful example: https://phpstan.org/r/29546058-556e-4e76-bccc-f053079e5711 - Narrow down type `T` of `RecursiveIteratorIterator` (https://github.com/phpstan/phpstan-src/commit/d28b61b986c47f721eab2fef0613ee57b872af4f), [#&#8203;3425](https://github.com/phpstan/phpstan/issues/3425) - Performance improvement: memoize expensive calls to PHPDocs ([#&#8203;458](https://github.com/phpstan/phpstan-src/pull/458)), thanks [@&#8203;pyguerder](https://github.com/pyguerder)! - More SPL iterator stubs (https://github.com/phpstan/phpstan-src/commit/0315dfa437e447e31b964b6ec4696b0e23cd1010) - Unified iterator parameter names across PHP versions (https://github.com/phpstan/phpstan-src/commit/72b02a6706184a164438af095e1910ecd5c7bb31) # Bugfixes 🐛 - Fix accepting BenevolentUnionType as part of GenericObjectType (https://github.com/phpstan/phpstan-src/commit/d29d098d62da4c13356c23d599f1f24521d177ab), [#&#8203;4605](https://github.com/phpstan/phpstan/issues/4605) - Fix inline `@var` priority with prefixed PHPDoc tags (https://github.com/phpstan/phpstan-src/commit/3186fff7356df4447d38e11c61d43d6ac8405760), [#&#8203;4606](https://github.com/phpstan/phpstan/issues/4606) # Function signature fixes 🤖 - Updated function signatures of zip_read ([#&#8203;461](https://github.com/phpstan/phpstan-src/pull/461)), thanks [@&#8203;spud](https://github.com/spud)! ### [`v0.12.79`](https://github.com/phpstan/phpstan/releases/tag/0.12.79) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.78...0.12.79) # Improvements 🔧 - Support for union type as `@template` type bound (https://github.com/phpstan/phpstan-src/commit/ac7b49ef411606ca90abf973f13f7d1aeea6b1d7), [#&#8203;3769](https://github.com/phpstan/phpstan/issues/3769) - Support `int` and `string` as `@template` type bound (https://github.com/phpstan/phpstan-src/commit/768bfab11b313811c2feb34a16f50ff8ff3fadd5) - Type-specifying extension for `ReflectionClass::isSubclassOf()` (https://github.com/phpstan/phpstan-src/commit/d3b5d60d278861a51b4ce282261d7dea7b9db340), [#&#8203;4577](https://github.com/phpstan/phpstan/issues/4577) - Update `BetterReflection` to version that uses PHPStan namespace instead of random prefixed one (https://github.com/phpstan/phpstan-src/commit/06ef13e9c30626f657b2be10030cf0c857b1dc35). See https://github.com/rectorphp/rector/pull/5665 - Update PhpStorm stubs (https://github.com/phpstan/phpstan-src/commit/5aa8a5589d73ca3e8b87fc6a6110bc92ec766be7) - Add `PhpPropertyReflection::getNativeReflection()` (https://github.com/phpstan/phpstan-src/commit/5fad625b7770b9c5beebb19ccc1a493839308fb4) # Bleeding edge 🔪 - Type inference of `new $string` leads to `object`, not `mixed` (https://github.com/phpstan/phpstan-src/commit/78a9f057d7a1c73cc34af70db406b9392ce0ca3a) *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.* # Bugfixes 🐛 - Fix `GenericObjectType::isSuperTypeOf()` for covariant template types (https://github.com/phpstan/phpstan-src/commit/3f6de01ead2e159413873b63d51e29e9b27a7c91) - Fix `method_exists()` after `new $class` (https://github.com/phpstan/phpstan-src/commit/70756b0939512ff0408299607b4d073f599df244), [#&#8203;4579](https://github.com/phpstan/phpstan/issues/4579) - Fix `--debug` message ([#&#8203;455](https://github.com/phpstan/phpstan-src/pull/455)), thanks [@&#8203;alamirault](https://github.com/alamirault)! - Keep iterable key type and value type when subtracting from iterable (https://github.com/phpstan/phpstan-src/commit/c1f7aafc47d007cbb82114ce1fb306a971333f26), [#&#8203;4498](https://github.com/phpstan/phpstan/issues/4498) - Type description verbosity - be more verbose when invariant template type is involved (https://github.com/phpstan/phpstan-src/commit/d97ddee4d53fa82962452f2b9fe60c334b9149f9) - Fixed inferring return type coming from array_map (https://github.com/phpstan/phpstan-src/commit/ea7e0ac0cb46c8efecdd7be795d6dc8ee53bb094), [#&#8203;4587](https://github.com/phpstan/phpstan/issues/4587) - TemplateTypeCheck - look for nested unsupported types (https://github.com/phpstan/phpstan-src/commit/756af18c18f9f2c8156b6d398ed59e0ef9bf571e) ### [`v0.12.78`](https://github.com/phpstan/phpstan/releases/tag/0.12.78) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.77...0.12.78) # Improvements 🔧 - Remember assigned offset value on general arrays (https://github.com/phpstan/phpstan-src/commit/0f64ca749f5246a2550dd746cb416b37e2e6ef84), [#&#8203;2112](https://github.com/phpstan/phpstan/issues/2112) - Result cache optimization (https://github.com/phpstan/phpstan-src/commit/67b2d1cfa5d9bf769cd71cb2d28dd2f9ca86ba2b) - Result cache - invalidate when scanned file changed (https://github.com/phpstan/phpstan-src/commit/7d279fcfe8d9c2bf9066be302209a58c15b9b8bc), [#&#8203;3952](https://github.com/phpstan/phpstan/issues/3952) - Result cache - hash autoload file and bootstrap files (https://github.com/phpstan/phpstan-src/commit/3457e581151d3b639a6ee2837458e678fd38d8c8), [#&#8203;3416](https://github.com/phpstan/phpstan/issues/3416) - Parameter of closure passed into `array_map`/`array_filter` can resolve to a subtype of native type (https://github.com/phpstan/phpstan-src/commit/bf320b0b2551aeb06934c64edcc2597f740ba401) # Bugfixes 🐛 - Invalidate `count($array)` after `array_shift()` (https://github.com/phpstan/phpstan-src/commit/6b2afbccceff67232e28c97156f4f4b916fb4c00), [#&#8203;4558](https://github.com/phpstan/phpstan/issues/4558) - Fix `@template` name clash from different scopes (https://github.com/phpstan/phpstan-src/commit/527269a28ff58c9ddae6527980540ae4be4be08a), [#&#8203;4557](https://github.com/phpstan/phpstan/issues/4557), [#&#8203;3121](https://github.com/phpstan/phpstan/issues/3121) - Symbol discovery - fixed looking for functions returning references (https://github.com/phpstan/phpstan-src/commit/ec26a001da805605a9bbbbdfb8e55182ee0ad383), [#&#8203;3829](https://github.com/phpstan/phpstan/issues/3829) - First argument of `method_exists()` might remain a string (https://github.com/phpstan/phpstan-src/commit/91894ff918d4453d2eb1197cb63c995b11bb801a), [#&#8203;4573](https://github.com/phpstan/phpstan/issues/4573) - Added many regression tests for already fixed issues (https://github.com/phpstan/phpstan/issues/2837, https://github.com/phpstan/phpstan/issues/3096, https://github.com/phpstan/phpstan/issues/3891, https://github.com/phpstan/phpstan/issues/3544, https://github.com/phpstan/phpstan/issues/2675, https://github.com/phpstan/phpstan/issues/1897, https://github.com/phpstan/phpstan/issues/1801, https://github.com/phpstan/phpstan/issues/1711, https://github.com/phpstan/phpstan/issues/4432, https://github.com/phpstan/phpstan/issues/2268, https://github.com/phpstan/phpstan/issues/2298, https://github.com/phpstan/phpstan/issues/1903, https://github.com/phpstan/phpstan/issues/2927, https://github.com/phpstan/phpstan/issues/2434, https://github.com/phpstan/phpstan/issues/2220, https://github.com/phpstan/phpstan/issues/1871, https://github.com/phpstan/phpstan/issues/1707, https://github.com/phpstan/phpstan/issues/1664, https://github.com/phpstan/phpstan/issues/1661, https://github.com/phpstan/phpstan/issues/1656, https://github.com/phpstan/phpstan/issues/1613, https://github.com/phpstan/phpstan/issues/2682, https://github.com/phpstan/phpstan/issues/2689, https://github.com/phpstan/phpstan/issues/2714, https://github.com/phpstan/phpstan/issues/2846, https://github.com/phpstan/phpstan/issues/3309, https://github.com/phpstan/phpstan/issues/3357, https://github.com/phpstan/phpstan/issues/3534, https://github.com/phpstan/phpstan/issues/3608, https://github.com/phpstan/phpstan/issues/3669, https://github.com/phpstan/phpstan/issues/3920, https://github.com/phpstan/phpstan/issues/3261, https://github.com/phpstan/phpstan/issues/4289, https://github.com/phpstan/phpstan/issues/2568, https://github.com/phpstan/phpstan/issues/4209, https://github.com/phpstan/phpstan/issues/3034, https://github.com/phpstan/phpstan/issues/3117, https://github.com/phpstan/phpstan/issues/1971, https://github.com/phpstan/phpstan/issues/2869, https://github.com/phpstan/phpstan/issues/3024, https://github.com/phpstan/phpstan/issues/3134) # Function signature fixes 🤖 - Fix accepted types for fputcsv fields parameter ([#&#8203;451](https://github.com/phpstan/phpstan-src/pull/451)), thanks [@&#8203;DaveLiddament](https://github.com/DaveLiddament)! ### [`v0.12.77`](https://github.com/phpstan/phpstan/releases/tag/0.12.77) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.76...0.12.77) # Improvements 🔧 - Check `continue`/`break` outside of loop and switch (level 0) (https://github.com/phpstan/phpstan-src/commit/df5c98d7bc071b5fd46ecde4c4a3886285315133), [#&#8203;3588](https://github.com/phpstan/phpstan/issues/3588), [#&#8203;794](https://github.com/phpstan/phpstan/issues/794) # Bugfixes 🐛 - Fix result cache for ever-changing Git commit in `vendor/composer/installed.php` (https://github.com/phpstan/phpstan-src/commit/6367eb6d090a48801c0a5c7ec5254339efcb433f), [#&#8203;4542](https://github.com/phpstan/phpstan/issues/4542) - Avoid false-positive "Offset does not exist" on `isset()` ([#&#8203;452](https://github.com/phpstan/phpstan-src/pull/452)), thanks [@&#8203;VincentLanglet](https://github.com/VincentLanglet)! - Fix function signatures with multiple variants on PHP 8 ([#&#8203;453](https://github.com/phpstan/phpstan-src/pull/453)), [#&#8203;4538](https://github.com/phpstan/phpstan/issues/4538), [#&#8203;4530](https://github.com/phpstan/phpstan/issues/4530) - CallStaticMethodsRule - fix case with non-object class-string (https://github.com/phpstan/phpstan-src/commit/ec2ef2af56f20ed51155a91e897c4598443bc7b6), [#&#8203;4550](https://github.com/phpstan/phpstan/issues/4550) - Fixed inferring from nested generic `class-string<T>` (https://github.com/phpstan/phpstan-src/commit/a7a46b11ce41debc24bfb7d223e6331276abf4ab), [#&#8203;4552](https://github.com/phpstan/phpstan/issues/4552), [#&#8203;4249](https://github.com/phpstan/phpstan/issues/4249) # Function signature fixes 🤖 - Fixed return type of `simplexml_import_dom` (https://github.com/phpstan/phpstan-src/commit/270d507b821b95922140b9e0559cfe515e4ea58f), [#&#8203;4536](https://github.com/phpstan/phpstan/issues/4536) - `Redis::auth()` method also accepts array ([#&#8203;449](https://github.com/phpstan/phpstan-src/pull/449)), thanks [@&#8203;mvorisek](https://github.com/mvorisek)! - `proc_get_status()` - array shape for PHP 8 (https://github.com/phpstan/phpstan-src/commit/f9c571415cfffd0c8c932bd2dd258151cd4670bc) ### [`v0.12.76`](https://github.com/phpstan/phpstan/releases/tag/0.12.76) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.75...0.12.76) # Bugfixes 🐛 - Support for `break X` and `continue X` (https://github.com/phpstan/phpstan-src/commit/31fcad649cce93f4ad20fa72136a3134fbbeb9f1), [#&#8203;4535](https://github.com/phpstan/phpstan/issues/4535), [#&#8203;4346](https://github.com/phpstan/phpstan/issues/4346), [#&#8203;2913](https://github.com/phpstan/phpstan/issues/2913), [#&#8203;2926](https://github.com/phpstan/phpstan/issues/2926), [#&#8203;2549](https://github.com/phpstan/phpstan/issues/2549), [#&#8203;2003](https://github.com/phpstan/phpstan/issues/2003), [#&#8203;1945](https://github.com/phpstan/phpstan/issues/1945), [#&#8203;651](https://github.com/phpstan/phpstan/issues/651), [#&#8203;1283](https://github.com/phpstan/phpstan/issues/1283) - Fixed nullsafe operator with null coalesce (https://github.com/phpstan/phpstan-src/commit/990ba51cb38f29b17579c54c1967223fcc56661a), [#&#8203;4527](https://github.com/phpstan/phpstan/issues/4527) ### [`v0.12.75`](https://github.com/phpstan/phpstan/releases/tag/0.12.75) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.74...0.12.75) # Improvements 🔧 - StubValidator - do not check missing callable signatures (https://github.com/phpstan/phpstan-src/commit/b7d60809dd3c1fed00dde616df6c6946c7da118d) # Bleeding edge 🔪 - Detect wrong usage of `@var` PHPDoc tag (level 2) (https://github.com/phpstan/phpstan-src/commit/58860536dcc60bfc86c29ad67711ed1b19046cb0) - Check array deconstruction (level 3) (https://github.com/phpstan/phpstan-src/commit/aae34d935081a8f8d34f5bd9bdf50ebdfdb85a7e), [#&#8203;3267](https://github.com/phpstan/phpstan/issues/3267) *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.* # Bugfixes 🐛 - PHP 8 - fix signatures with multiple variants (https://github.com/phpstan/phpstan-src/commit/8633000546eb2005387774f1a76db5f5686cf084), [#&#8203;4514](https://github.com/phpstan/phpstan/issues/4514) - Fixed local ignoring using annotations in traits (https://github.com/phpstan/phpstan-src/commit/785b66311ed7591710b189322c7d71fcfa1c3409), [#&#8203;4513](https://github.com/phpstan/phpstan/issues/4513) - Updated PHP 8 stubs (https://github.com/phpstan/phpstan-src/commit/cc9a674016c2ec580343db6185621f1d607aca97), [#&#8203;4519](https://github.com/phpstan/phpstan/issues/4519) - `SplObjectStorage`'s ArrayAccess will never return null (https://github.com/phpstan/phpstan-src/commit/60624379b08831444b326f5eb688d5db87937964), [#&#8203;4436](https://github.com/phpstan/phpstan/issues/4436) - Resolve unknown generic type to bound instead of ErrorType (https://github.com/phpstan/phpstan-src/commit/6ef87d1d1f1065fd980aa01ccda70cb6280f32dc) - Fixed assigning generic object without a constructor (like `SplObjectStorage`) to a property (https://github.com/phpstan/phpstan-src/commit/2017318c316861d6d6ec3d5c0f1a598e04767f96), [#&#8203;3777](https://github.com/phpstan/phpstan/issues/3777) # Function signature fixes 🤖 - Avoid false positive for namespaced Xpath ([#&#8203;447](https://github.com/phpstan/phpstan-src/pull/447)), thanks [@&#8203;VincentLanglet](https://github.com/VincentLanglet)! ### [`v0.12.74`](https://github.com/phpstan/phpstan/releases/tag/0.12.74) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.73...0.12.74) # Improvements 🔧 - Resolve `StaticType` coming from dynamic return type extensions (https://github.com/phpstan/phpstan-src/commit/76b65b4a767b47af62f4da2c52bcbba0961b6eae) # Bugfixes 🐛 - WrongVariableNameInVarTagRule - fix iteratee variable above foreach (https://github.com/phpstan/phpstan-src/commit/3d365fc7af8833656b6e58c1b37d3a8b17079173), [#&#8203;4504](https://github.com/phpstan/phpstan/issues/4504) - Fix undefined variable in `@var` in unreachable code (https://github.com/phpstan/phpstan-src/commit/ec4e7edfe622c24a5e037d3a088ed8175275737e), [#&#8203;4505](https://github.com/phpstan/phpstan/issues/4505) ### [`v0.12.73`](https://github.com/phpstan/phpstan/releases/tag/0.12.73) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.72...0.12.73) # Improvements 🔧 - Support `@var` above global keyword (https://github.com/phpstan/phpstan-src/commit/fa5f8ec4a3b487db5ddf233063d75f2ab9d53173), [#&#8203;4500](https://github.com/phpstan/phpstan/issues/4500) - Rework processing inline `@var` (https://github.com/phpstan/phpstan-src/commit/e5010911e991f0736477f5ed256205def9a6dc06) ### [`v0.12.72`](https://github.com/phpstan/phpstan/releases/tag/0.12.72) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.71...0.12.72) # Improvements 🔧 - Tip linking to [blogpost about solving "no value type specified in iterable type" error](https://phpstan.org/blog/solving-phpstan-no-value-type-specified-in-iterable-type) (https://github.com/phpstan/phpstan-src/commit/d0a35b5d183f1c26a96ea0699c04d6c8fa494d5c) - Do not report "Unable to resolve template type" when the type is not present in parameters (https://github.com/phpstan/phpstan-src/commit/cec9ef6b6d9771e37a8550a40666da0139e7ecb7) - WrongVariableNameInVarTagRule - report for all statement types (https://github.com/phpstan/phpstan-src/commit/0e8441471ee5454f5fa7c5c7b807ba4046431ed7) - InvalidPhpDocVarTagTypeRule - report for all PHPDocs containing `@var` (https://github.com/phpstan/phpstan-src/commit/a5a9a4dea44f515e67f367c4fd01b7ac9c625cb8) # Bleeding edge 🔪 - Check that function-scoped template type is in a parameter (https://github.com/phpstan/phpstan-src/commit/18bdd34a808763764ea281d4f1b62fc0e7968873) *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.* # Bugfixes 🐛 - Fix resolving types in `@var` above `use` statement (https://github.com/phpstan/phpstan-src/commit/4fff79c64f4d7aaca3231f68f0ebc8853ddd16f9), [#&#8203;4486](https://github.com/phpstan/phpstan/issues/4486) - Fix resolving types in `@var` above `namespace` statement (https://github.com/phpstan/phpstan-src/commit/26fb6dda9f919caf82b8491617390457d594985d) - Result cache - invalidate after running `composer install` (https://github.com/phpstan/phpstan-src/commit/f11c0f0922bc7a6c52c079a2bf3b9f04e22115cf), [#&#8203;4495](https://github.com/phpstan/phpstan/issues/4495) ### [`v0.12.71`](https://github.com/phpstan/phpstan/releases/tag/0.12.71) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.70...0.12.71) # Improvements 🔧 - Performance optimizations (https://github.com/phpstan/phpstan-src/commit/ca7e9ef41c467567a502765303034552e9b4c385, https://github.com/phpstan/phpstan-src/commit/369cc186b6274a390a398ca74a2de6d715a8a47c, https://github.com/ondrejmirtes/BetterReflection/commit/fb85182b78f43a8e66a6d0b50e7a243c5d45d5cb) - Dynamic return type extension for understanding `compact()` function (https://github.com/phpstan/phpstan-src/commit/2a75a25431485af4134468f1ef013d2c5dab6a13) - Improve `CompactVariablesRule` - recognize array parameters (https://github.com/phpstan/phpstan-src/commit/f2dd33a09afa5d3619b1c7db9f7c486e60ba0353) # Bugfixes 🐛 - Do not report calls to pure methods/functions with `@return never` on a separate line (https://github.com/phpstan/phpstan-src/commit/136db047e3d37744ab1b5a04aef16d7406078284), [#&#8203;4455](https://github.com/phpstan/phpstan/issues/4455) - Infer `never` return type in closure only with missing or `void` native return typehint (https://github.com/phpstan/phpstan-src/commit/809807af5a8c6685c9220f83a12b6c7cbae3bf53), [#&#8203;4442](https://github.com/phpstan/phpstan/issues/4442) - Fix CachedParser returning stale cache when asked for richer AST through parseFile (https://github.com/phpstan/phpstan-src/commit/bef5a261f3a0a038ad782d1f4dd8f7d85daf7d87) - Do not complain about interface and abstract class when instantiating from object (https://github.com/phpstan/phpstan-src/commit/5ad91d26e2f411505e932ecdc5a412d797c2b817), [#&#8203;4471](https://github.com/phpstan/phpstan/issues/4471) - Fixed `CallableType::getReferencedClasses()` (https://github.com/phpstan/phpstan-src/commit/09da0a3af061425c959779aa6ebfb1330554a35f) # Function signature fixes 🤖 - Fix `MemcachePool::get` declaration (return types) ([#&#8203;434](https://github.com/phpstan/phpstan-src/pull/434)), thanks [@&#8203;fizzka](https://github.com/fizzka)! - Update Imagick functionMap ([#&#8203;435](https://github.com/phpstan/phpstan-src/pull/435)), thanks [@&#8203;davidlienhard](https://github.com/davidlienhard)! ### [`v0.12.70`](https://github.com/phpstan/phpstan/releases/tag/0.12.70) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.69...0.12.70) # Improvements 🔧 - `phpstan.phar` is built with Composer v2, solves `OutOfBoundsException: Package "project/project" is not installed` error (https://github.com/getsentry/sentry-symfony/issues/383) thanks to https://github.com/composer/composer/pull/9635 - Optimization for currently analysed class reflection when there's only one occurrence of the same class in a project (https://github.com/phpstan/phpstan-src/commit/d3435dd97b19dac72efb54c06e13eb37d9348177), [#&#8203;4435](https://github.com/phpstan/phpstan/issues/4435) # Bugfixes 🐛 - "Unable to resolve template type" has to check against explicit NeverType only (https://github.com/phpstan/phpstan-src/commit/ba4bc4f7316a58aaf2d75be606c7b0d90aad136c), [#&#8203;4422](https://github.com/phpstan/phpstan/issues/4422) - Update phpstorm-stubs (https://github.com/phpstan/phpstan-src/commit/6bbd6290c9987267c9ceebec4bace314549a7b73) - Fix link in "internal error" message (https://github.com/phpstan/phpstan-src/commit/a2ce51b4ec1062f97362935bd6737571f7bf7b2f) # Function signature fixes 🤖 - Add SimpleXmlElementXpathMethodReturnTypeExtension ([#&#8203;428](https://github.com/phpstan/phpstan-src/pull/428)), thanks [@&#8203;VincentLanglet](https://github.com/VincentLanglet)! - Allow lowercase variant of constant for `setcookie()` ([#&#8203;431](https://github.com/phpstan/phpstan-src/pull/431)), thanks [@&#8203;VincentLanglet](https://github.com/VincentLanglet)! ### [`v0.12.69`](https://github.com/phpstan/phpstan/releases/tag/0.12.69) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.68...0.12.69) # Improvements 🔧 - The PHAR is present only once in [`phpstan/phpstan`](https://github.com/phpstan/phpstan) distribution (https://github.com/phpstan/phpstan/pull/4390), thanks [@&#8203;mvorisek](https://github.com/mvorisek)! - ComposerJsonAndInstalledJsonSourceLocatorMaker - optimized memory consumption for many autoloaded files (https://github.com/phpstan/phpstan-src/commit/e4b6ffdcb692c1113c0f8505849535f016bfe379), [#&#8203;4401](https://github.com/phpstan/phpstan/issues/4401) - Optimized caching of `isSuperTypeOf()` in `ObjectType` (https://github.com/phpstan/phpstan-src/commit/e88491bb8507c417559343b5e4d51c1fe59b56c5) - Unification for working with current class reflection (like `self::`) across CallStaticMethodsRule, ClassConstantRule, AccessStaticPropertiesRule (https://github.com/phpstan/phpstan-src/commit/863e6c600a40177a20e8677cd05eca077e2b184b), https://github.com/composer/composer/pull/9635 - New feature - require specifying `callable` signatures in PHPDocs: turn on with `checkMissingCallableSignature` parameter (off by default) (https://github.com/phpstan/phpstan-src/pull/430), thanks [@&#8203;dktapps](https://github.com/dktapps)! # Bugfixes 🐛 - Fixed preserving non-empty array in `array_reverse()` (https://github.com/phpstan/phpstan-src/commit/3ccc152efda55793f8efc2e0b97fa720f51d6e31), [#&#8203;4398](https://github.com/phpstan/phpstan/issues/4398) - OPENSSL_VERSION_NUMBER is a dynamic constant name (https://github.com/phpstan/phpstan-src/commit/c865bc3f9b245fc45d5386327456c496b53e2833) - IteratorAggregate - read key and value type from generics if `getIterator()` doesn't have PHPDoc type (https://github.com/phpstan/phpstan-src/commit/c75b0ea678f89369b703f520f7d801afb0a31d5f), https://github.com/phpstan/phpstan/discussions/4415 - Inline `@var` above property should not pollute scope inside methods (https://github.com/phpstan/phpstan-src/commit/e832df4e9912e2a0616922f508290dafefcf73a0), [#&#8203;4412](https://github.com/phpstan/phpstan/issues/4412) - Infer return type `never` from closure (https://github.com/phpstan/phpstan-src/commit/98c8dd6b72502d606c36e7a91e78e77e13db23f4), [#&#8203;4416](https://github.com/phpstan/phpstan/issues/4416) - Fix excluding files when excludePaths.analyse and excludePaths.analyseAndScan are used at the same time (https://github.com/phpstan/phpstan-src/commit/09e4fbec99e04e6dad54873fbba22b3e18f27c1e), [#&#8203;4417](https://github.com/phpstan/phpstan/issues/4417) - VoidType::accepts - support CompoundType (https://github.com/phpstan/phpstan-src/commit/8b4cab5ed0e3922ac359e2de5d8091382694a51a) # Function signature fixes 🤖 - Remove incorrect overrides in PHP8 for `proc_get_status()` ([#&#8203;429](https://github.com/phpstan/phpstan-src/pull/429)), thanks [@&#8203;Firehed](https://github.com/Firehed)! ### [`v0.12.68`](https://github.com/phpstan/phpstan/releases/tag/0.12.68) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.67...0.12.68) # Improvements 🔧 - Infer return type of anonymous functions from the return statements (https://github.com/phpstan/phpstan-src/commit/96750b5acdc17b959ed08f8d0278cf5720c82113), [#&#8203;3115](https://github.com/phpstan/phpstan/issues/3115), [#&#8203;3091](https://github.com/phpstan/phpstan/issues/3091), [#&#8203;2576](https://github.com/phpstan/phpstan/issues/2576) # Bugfixes 🐛 - Fix ClosureReturnStatementsNode to not contain statements from nested closures and anonymous functions (https://github.com/phpstan/phpstan-src/commit/a81a8c3870b119ee15accfb549caa5f9c163d8c5) - Fix FunctionReturnStatementsNode to not contain statements from nested closures and anonymous functions (https://github.com/phpstan/phpstan-src/commit/c70325b4a48039ac84deb457417fc14d0bb97eaf) - Fix MethodReturnStatementsNode to not contain statements from nested closures and anonymous functions (https://github.com/phpstan/phpstan-src/commit/9a99aa5472a8a757b10c8ce32e275f304aeed85c) ### [`v0.12.67`](https://github.com/phpstan/phpstan/releases/tag/0.12.67) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.66...0.12.67) # Improvements 🔧 - Reworked `@var` support so that view files can be analysed successfully (https://github.com/phpstan/phpstan-src/commit/22d363cdb9f01a87ad354ae049434b6f8acbc2fa, https://github.com/phpstan/phpstan-src/commit/27481c3c3615d10919c0d55248cac31f2abde8b6), [#&#8203;4155](https://github.com/phpstan/phpstan/issues/4155), [#&#8203;3516](https://github.com/phpstan/phpstan/issues/3516), [#&#8203;3515](https://github.com/phpstan/phpstan/issues/3515), [#&#8203;351](https://github.com/phpstan/phpstan/issues/351) - Report only relevant "unable to resolve template type" message (https://github.com/phpstan/phpstan-src/commit/a5f9f0c26d9112e5add6d74758b0f7388a141da0), [#&#8203;3853](https://github.com/phpstan/phpstan/issues/3853) - Unable to resolve the template type - tip with a blogpost link (https://github.com/phpstan/phpstan-src/commit/3c56362f74ec7ee2b2ba8d4d95933b8cee98504b) - NewStaticRule - tip with a blogpost link (https://github.com/phpstan/phpstan-src/commit/96f1e106bd10f754b304d874493df14613529607) - Deprecated `PHPStan\Reflection\Generic\ResolvedFunctionVariant` in favor of `PHPStan\Reflection\ResolvedFunctionVariant` (https://github.com/phpstan/phpstan-src/commit/959b6e9ab3d394583236ef9330244937933027ad) # Bugfixes 🐛 - Fixed skipping shadowed trait method by a native method (https://github.com/phpstan/phpstan-src/commit/2de6a241caf3bd78c3c15075b7e255ccfdb62377), [#&#8203;4214](https://github.com/phpstan/phpstan/issues/4214) - `parent::__construct()` resets `$this` state (https://github.com/phpstan/phpstan-src/commit/c8174d59ccc9865ff38560651a5bfc30827fb798), [#&#8203;4351](https://github.com/phpstan/phpstan/issues/4351) - Smoother parallel process quitting when the child process crashes (https://github.com/phpstan/phpstan-src/commit/cbbbd36189c564930937d9dfc02ba4fc7bd39a6b), https://github.com/phpstan/phpstan-doctrine/issues/169 ### [`v0.12.66`](https://github.com/phpstan/phpstan/releases/tag/0.12.66) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.65...0.12.66) # Improvements 🔧 - Support `@pure` and `@phpstan-pure` annotations ([#&#8203;412](https://github.com/phpstan/phpstan-src/pull/412)), thanks [@&#8203;b1rdex](https://github.com/b1rdex)! - Support `@impure` and `@phpstan-impure` ([#&#8203;412](https://github.com/phpstan/phpstan-src/pull/412)) - It closes these issues: [#&#8203;3746](https://github.com/phpstan/phpstan/issues/3746), [#&#8203;3844](https://github.com/phpstan/phpstan/issues/3844), [#&#8203;4301](https://github.com/phpstan/phpstan/issues/4301), [#&#8203;2105](https://github.com/phpstan/phpstan/issues/2105), [#&#8203;929](https://github.com/phpstan/phpstan/issues/929), [#&#8203;1826](https://github.com/phpstan/phpstan/issues/1826) # Bleeding edge 🔪 - Detect stub file added multiple times (https://github.com/phpstan/phpstan-src/commit/4a82eec4044e900be192096d58f04b4e2be80a0a) - BooleanAndConstantConditionRule - check LogicalAnd (https://github.com/phpstan/phpstan-src/commit/40a76e88d0866f7d541e0e43364de07c5a94c465) - BooleanOrConstantConditionRule - check LogicalOr (https://github.com/phpstan/phpstan-src/commit/ae9a558484dc4f330873e962b8dc1b2d18f0c9b7) *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.* # Bugfixes 🐛 - Fix return type of arrow function (https://github.com/phpstan/phpstan-src/commit/e9b783a5e427dcd058ea72f07cb1ce44b8ee8ba7), [#&#8203;4339](https://github.com/phpstan/phpstan/issues/4339) - Apply conditional expressions for non-empty arrays inside foreach (https://github.com/phpstan/phpstan-src/commit/35db779fac3363f3f083ccf04d441e88ba0bd3ac), [#&#8203;4343](https://github.com/phpstan/phpstan/issues/4343) # Function signature fixes 🤖 - Updated return values for `zip_open()` ([#&#8203;419](https://github.com/phpstan/phpstan-src/pull/419)), [#&#8203;4341](https://github.com/phpstan/phpstan/issues/4341), thanks [@&#8203;spud](https://github.com/spud)! - Updated PHP 8 stubs (https://github.com/phpstan/phpstan-src/commit/d586b939265af336cfec3ec4d712a41146a46322) - Improved `setcookie()` and `setrawcookie()` signatures (https://github.com/phpstan/phpstan-src/commit/ccb1d4d4141b23ba87c1762294f54da219d930b1), [#&#8203;4348](https://github.com/phpstan/phpstan/issues/4348) - `array_combine()` dynamicExtension ([#&#8203;418](https://github.com/phpstan/phpstan-src/pull/418)), thanks [@&#8203;VincentLanglet](https://github.com/VincentLanglet)! - `array_rand()` return type extension ([#&#8203;417](https://github.com/phpstan/phpstan-src/pull/417)), thanks [@&#8203;VincentLanglet](https://github.com/VincentLanglet)! - Update `ctype_*` function signature ([#&#8203;421](https://github.com/phpstan/phpstan-src/pull/421)), thanks [@&#8203;BackEndTea](https://github.com/BackEndTea)! ### [`v0.12.65`](https://github.com/phpstan/phpstan/releases/tag/0.12.65) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.64...0.12.65) # Improvements 🔧 - New option `excludePaths` that replaces `excludes_analyse` and allows for more granular settings - different exclusions for analysed paths and discovering symbols in 3rd party code (https://github.com/phpstan/phpstan-src/commit/bf35a1045883bc88a9820e5680c66c98314ff33f) - [#&#8203;3749](https://github.com/phpstan/phpstan/issues/3749), [#&#8203;1796](https://github.com/phpstan/phpstan/issues/1796). [Read more about it in this comment](https://github.com/phpstan/phpstan/issues/3749#issuecomment-754749316). - Clear cache directory - delete old containers (https://github.com/phpstan/phpstan-src/commit/db0a5f61a436b337d11cfb2b4258336bcfab4fff), [#&#8203;4328](https://github.com/phpstan/phpstan/issues/4328) # Bugfixes 🐛 - Generics - do not generalize array shape (https://github.com/phpstan/phpstan-src/commit/94e3443b2d21404a821e05b901dd4b57fcbd4e7f) - Arrow functions - allow more precise return type even when native return type is present (https://github.com/phpstan/phpstan-src/commit/3d0ac6f15e4477480295331f72631067e6bc99c0), [#&#8203;4275](https://github.com/phpstan/phpstan/issues/4275) - `array_filter` w/ arrow functions return type extension ([#&#8203;402](https://github.com/phpstan/phpstan-src/pull/402)), thanks [@&#8203;b1rdex](https://github.com/b1rdex)! - Make IntegerRangeType represent open intervals properly ([#&#8203;409](https://github.com/phpstan/phpstan-src/pull/409)), [#&#8203;577](https://github.com/phpstan/phpstan/issues/577), thanks [@&#8203;jlherren](https://github.com/jlherren)! - Improve specified type in comparisons ([#&#8203;390](https://github.com/phpstan/phpstan-src/pull/390)), thanks [@&#8203;jlherren](https://github.com/jlherren)! - Register missing SplObjectStorage stub (https://github.com/phpstan/phpstan-src/commit/143741c9c68edcc96845926b551d40eeed2af0d5) - Solve issues with arrow functions containing void expression (https://github.com/phpstan/phpstan-src/commit/7ac6383557b414d8b319d28eb23681abf16a668c), [#&#8203;4292](https://github.com/phpstan/phpstan/issues/4292), [#&#8203;3348](https://github.com/phpstan/phpstan/issues/3348) - Fix `isset()` bug (https://github.com/phpstan/phpstan-src/commit/3d6461c33382c7d4b1225a6bbfb6d4b947f6be4c), [#&#8203;4290](https://github.com/phpstan/phpstan/issues/4290) - Fix infinite recursion with `count()` calls in TypeSpecifier (https://github.com/phpstan/phpstan-src/commit/69e68a7a150d975139767ce508ecc42dfb8e3e26), [#&#8203;4300](https://github.com/phpstan/phpstan/issues/4300) # Function signature fixes 🤖 - Fix function signatures for `preg_replace_callback*` for PHP 7.4+ ([#&#8203;411](https://github.com/phpstan/phpstan-src/pull/411)), thanks [@&#8203;jabrandes](https://github.com/jabrandes)! - Sync array_unique parameter names with PHP 8 (https://github.com/phpstan/phpstan-src/commit/9e7bdf7c5056f66a5b344a12f1e26d58c2c5d0c1) ### [`v0.12.64`](https://github.com/phpstan/phpstan/releases/tag/0.12.64) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.63...0.12.64) # Major new feature 🚀 **Dependent variables** PHPStan can now understand relationships between different variables. Cases like these are now understood correctly: ```php if ($debug) { $foo = 'bar'; } if ($debug) { // previously: Variable $foo might not be defined. // now: no error echo $foo; } ``` Additionally, this feature fixes all these issues: [#&#8203;801](https://github.com/phpstan/phpstan/issues/801), [#&#8203;806](https://github.com/phpstan/phpstan/issues/806), [#&#8203;1209](https://github.com/phpstan/phpstan/issues/1209), [#&#8203;1306](https://github.com/phpstan/phpstan/issues/1306), [#&#8203;1722](https://github.com/phpstan/phpstan/issues/1722), [#&#8203;1865](https://github.com/phpstan/phpstan/issues/1865), [#&#8203;2980](https://github.com/phpstan/phpstan/issues/2980), [#&#8203;3371](https://github.com/phpstan/phpstan/issues/3371), [#&#8203;3986](https://github.com/phpstan/phpstan/issues/3986) # Bugfixes 🐛 - Implement property name as an expression in `TypesAssignedToPropertiesRule` (https://github.com/phpstan/phpstan-src/commit/7458d1e09c00a70ce00453db07f4e2412db599f3) - Updated `nikic/php-parser` (https://github.com/phpstan/phpstan-src/commit/19bf582aa3c0e0809446a17399d17d17ab40297c), [#&#8203;4194](https://github.com/phpstan/phpstan/issues/4194) # Function signature fixes 🤖 - Changing return type of `Collator::compare` to `int|false` ([#&#8203;410](https://github.com/phpstan/phpstan-src/pull/410)), thanks [@&#8203;vasekbrychta](https://github.com/vasekbrychta)! - Update PHP 8 stubs (https://github.com/phpstan/phpstan-src/commit/44305499fe9b4aca8943c8e15382581372f6bd45), [#&#8203;4268](https://github.com/phpstan/phpstan/issues/4268) ### [`v0.12.63`](https://github.com/phpstan/phpstan/releases/tag/0.12.63) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.62...0.12.63) # Bugfixes 🐛 - Methods and functions marked as `#[Pure]` but having `@throws` are considered to have side effects (https://github.com/phpstan/phpstan-src/commit/7537f81d6ce37bd90b3aef0d3c329071faf0acee), [#&#8203;4232](https://github.com/phpstan/phpstan/issues/4232) - Do not infer property types from constructor if the property already has a native type (https://github.com/phpstan/phpstan-src/commit/d245daba79551b493a6e4925768f61f76894b4d1), [#&#8203;4234](https://github.com/phpstan/phpstan/issues/4234) - Fix false positive with nullsafe operator (https://github.com/phpstan/phpstan-src/commit/75d00c9a0fb25a84c4656055cc1769123ec06e01), [#&#8203;4199](https://github.com/phpstan/phpstan/issues/4199) - Php8SignatureMapProvider - prefer functionMap return type if PHP 8 stub file has only PHPDoc (https://github.com/phpstan/phpstan-src/commit/893813ce0f6b81455053bde54f286245d5d99e10), [#&#8203;4205](https://github.com/phpstan/phpstan/issues/4205) # Function signature fixes 🤖 - Update functionMap with functions that return false on both PHP 7 and PHP 8 (https://github.com/phpstan/phpstan-src/commit/43e53990703f7c0b0d2ff0249570ac7ed1beed97) ### [`v0.12.62`](https://github.com/phpstan/phpstan/releases/tag/0.12.62) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.61...0.12.62) Support relative paths in extension-installer (https://github.com/phpstan/phpstan-src/commit/0e306c66ca4c6f31184e222ce5df04a17b4307ca), https://github.com/phpstan/extension-installer/issues/17 Starting with `phpstan/phpstan` 0.12.62 and `phpstan/extension-installer` 1.1.0, relative paths to extension configs are used. This allows the generated config to be moved across filesystems, for example from a host system to a Docker container. ### [`v0.12.61`](https://github.com/phpstan/phpstan/releases/tag/0.12.61) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.60...0.12.61) # Bugfixes 🐛 - Inferred property type for missing assigned property should not be set to implicit mixed (https://github.com/phpstan/phpstan-src/commit/5b89088469042b3599d67961e7a833f9838abfad), [#&#8203;4227](https://github.com/phpstan/phpstan/issues/4227) # Function signature fixes 🤖 - Fix wrong function signature of `posix_getpwuid` and `posix_getgrgid` ([#&#8203;408](https://github.com/phpstan/phpstan-src/pull/408)), thanks [@&#8203;aragon999](https://github.com/aragon999)! ### [`v0.12.60`](https://github.com/phpstan/phpstan/releases/tag/0.12.60) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.59...0.12.60) # Improvements 🔧 - Infer private properties in constructor, even if typehinted ([#&#8203;374](https://github.com/phpstan/phpstan-src/pull/374)), thanks [@&#8203;Baldinof](https://github.com/Baldinof)! - Updated nikic/php-parser (https://github.com/phpstan/phpstan-src/commit/030b4f53f2faa05434fc9847c07a3e5555a80393) - Optimize range() dynamic return type extension for big arrays (https://github.com/phpstan/phpstan-src/commit/af5ba63fcf3699424c06b813be8369b447dc924f), [#&#8203;4207](https://github.com/phpstan/phpstan/issues/4207) - Obsolete Docker image note (https://github.com/phpstan/phpstan-src/commit/80d8afb45020cae3f0f825a9e2bc37d0810f776e) # Bugfixes 🐛 - Delete result cache file when it fails to load (https://github.com/phpstan/phpstan-src/commit/c22e62052c0ceb9ab0b29213d94b7ca26a601f0f), [#&#8203;4200](https://github.com/phpstan/phpstan/issues/4200) - Match expression - fix default handling (https://github.com/phpstan/phpstan-src/commit/1dfade1440a36395b775a6bb21ee3b67ac19ca02), [#&#8203;4204](https://github.com/phpstan/phpstan/issues/4204) - TypeSpecifier - resolve values from fetched constants (https://github.com/phpstan/phpstan-src/commit/761c9623a2e24e5957aa8c8e8d0ac707d59bc128), [#&#8203;4206](https://github.com/phpstan/phpstan/issues/4206) - Fix bug when specifying empty array (https://github.com/phpstan/phpstan-src/commit/a73b48f41103c2a47dab03927bee5302285c0f2e) # Function signature fixes 🤖 - Fix Normalizer's normalize method can return false ([#&#8203;403](https://github.com/phpstan/phpstan-src/pull/403)), thanks [@&#8203;TRowbotham](https://github.com/TRowbotham)! - Fix wrong function signature of get_include_path() ([#&#8203;404](https://github.com/phpstan/phpstan-src/pull/404)), thanks [@&#8203;ste93cry](https://github.com/ste93cry)! - functionMap: getmypid() / getmyuid() may return false ([#&#8203;406](https://github.com/phpstan/phpstan-src/pull/406)), thanks [@&#8203;dktapps](https://github.com/dktapps)! - functionMap: unpack() may return false ([#&#8203;405](https://github.com/phpstan/phpstan-src/pull/405)), thanks [@&#8203;dktapps](https://github.com/dktapps)! - Handle encoding for mb_str_split returnTypeExtension ([#&#8203;396](https://github.com/phpstan/phpstan-src/pull/396)), https://github.com/phpstan/phpstan/issues/4183, thanks [@&#8203;VincentLanglet](https://github.com/VincentLanglet)! - SimpleXMLElement methods return `static` ([#&#8203;407](https://github.com/phpstan/phpstan-src/pull/407)), [#&#8203;4222](https://github.com/phpstan/phpstan/issues/4222), thanks [@&#8203;voku](https://github.com/voku)! ### [`v0.12.59`](https://github.com/phpstan/phpstan/releases/tag/0.12.59) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.58...0.12.59) # Bugfixes 🐛 - Ignore NeverType in subtractable types ([#&#8203;389](https://github.com/phpstan/phpstan-src/pull/389)), thanks [@&#8203;jlherren](https://github.com/jlherren)! - Try fixing CpuCoreCounter problem (https://github.com/phpstan/phpstan-src/commit/0e3230199e5282639bc50500286bc8244ff8a748), [#&#8203;4147](https://github.com/phpstan/phpstan/issues/4147) - is_a(): specify class-string types if allow_string: true ([#&#8203;392](https://github.com/phpstan/phpstan-src/pull/392)), https://github.com/phpstan/phpstan/issues/4124, thanks [@&#8203;jiripudil](https://github.com/jiripudil)! - CallableType: accept \[class-string, constant-string] array as callable ([#&#8203;394](https://github.com/phpstan/phpstan-src/pull/394)), https://github.com/phpstan/phpstan/issues/2880, thanks [@&#8203;jiripudil](https://github.com/jiripudil)! - is_a(): support class-string in parameter $class ([#&#8203;393](https://github.com/phpstan/phpstan-src/pull/393)), https://github.com/phpstan/phpstan/issues/2799, thanks [@&#8203;jiripudil](https://github.com/jiripudil)! - Support "null" and "false" pseudotypes in native unions ([#&#8203;400](https://github.com/phpstan/phpstan-src/pull/400)), https://github.com/phpstan/phpstan/issues/4198, https://github.com/phpstan/phpstan/issues/4179, thanks [@&#8203;jiripudil](https://github.com/jiripudil)! # Function signature fixes 🤖 - Fix a misplaced null in XMLWriter::startElementNS ([#&#8203;388](https://github.com/phpstan/phpstan-src/pull/388)), thanks [@&#8203;spaze](https://github.com/spaze)! - sync some more types with PhpStorm stubs ([#&#8203;387](https://github.com/phpstan/phpstan-src/pull/387)), thanks [@&#8203;voku](https://github.com/voku)! - Fix ftp_mlsd ([#&#8203;399](https://github.com/phpstan/phpstan-src/pull/399)), thanks [@&#8203;enumag](https://github.com/enumag)! ### [`v0.12.58`](https://github.com/phpstan/phpstan/releases/tag/0.12.58) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.57...0.12.58) # Improvements 🔧 - Configurable result cache path (https://github.com/phpstan/phpstan-src/commit/518b20dc47138a7347357bf9fcbb6b339973c088), [#&#8203;3755](https://github.com/phpstan/phpstan/issues/3755) - StubValidator - analyse only project stub files (https://github.com/phpstan/phpstan-src/commit/f956c6d1dcf46152d29275cda2aad4bf3c81c022) - Update phpstorm-stubs (https://github.com/phpstan/phpstan-src/commit/fb95fabcb98b2485175e007a9ce74962d7c8be87) - ResultCacheManager - remove `parametersSchema` before comparing config files (https://github.com/phpstan/phpstan-src/commit/2a87b3af4a2f2e431595971518e99065adb3c2f7) # Bleeding edge 🔪 - Check `DateTime` instantiation ([#&#8203;380](https://github.com/phpstan/phpstan-src/pull/380)), thanks [@&#8203;b1rdex](https://github.com/b1rdex)! *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.* # Bugfixes 🐛 - Concat between numeric and empty string produces numeric string ([#&#8203;378](https://github.com/phpstan/phpstan-src/pull/378)), thanks [@&#8203;jlherren](https://github.com/jlherren)! - Fix array dim fetches with `treatPhpDocTypesAsCertain: false` (https://github.com/phpstan/phpstan-src/commit/a9ec1746ef4143d59278372ee2a8f8fe2764007f), [#&#8203;4099](https://github.com/phpstan/phpstan/issues/4099) - Fixed expression assignment throwing away native expression types for `treatPhpDocTypesAsCertain: false` (https://github.com/phpstan/phpstan-src/commit/64da8f9c05f39125e1a9be00c18690aacd284204), [#&#8203;3760](https://github.com/phpstan/phpstan/issues/3760) - Result cache - fix result cache save and restore with Neon with statements (https://github.com/phpstan/phpstan-src/commit/602c71877c75faf7efcb0090eb4039a2c3b72d3d), [#&#8203;4125](https://github.com/phpstan/phpstan/issues/4125) - Catch more BetterReflection errors (https://github.com/phpstan/phpstan-src/commit/3e8ec5f0d4ecf3df531c9f674345508a8e1e51fa), [#&#8203;4135](https://github.com/phpstan/phpstan/issues/4135) - Fixed SimpleXMLElement cast to boolean (https://github.com/phpstan/phpstan-src/commit/83c1e0b830db4f072e4c139b239b546f1acf4276), [#&#8203;3965](https://github.com/phpstan/phpstan/issues/3965), [#&#8203;2997](https://github.com/phpstan/phpstan/issues/2997) - hrtime(true) returns benevolent union type (https://github.com/phpstan/phpstan-src/commit/2a39e5a41185d892c2b55c130950bfda60f91d10), [#&#8203;3650](https://github.com/phpstan/phpstan/issues/3650) # Function signature fixes 🤖 - Fix Reflection::getStaticProperties()'s return type ([#&#8203;377](https://github.com/phpstan/phpstan-src/pull/377)), thanks [@&#8203;jlherren](https://github.com/jlherren)! - `mysqli_get_client_info()` argument is optional (https://github.com/phpstan/phpstan-src/commit/b01c6c9f71b4e46f6a2505e335dc1000882169ad), [#&#8203;4013](https://github.com/phpstan/phpstan/issues/4013) - Fixed `RedisArray::__construct()` (https://github.com/phpstan/phpstan-src/commit/3e956033ad718b56c607f026bd670613db02f151), [#&#8203;3688](https://github.com/phpstan/phpstan/issues/3688) - Fix `DateTime`/`DateTimeImmutable::getLastErrors()` return types ([#&#8203;380](https://github.com/phpstan/phpstan-src/pull/380)), thanks [@&#8203;b1rdex](https://github.com/b1rdex)! - Use dynamic return type extension for `mb_str_split` ([#&#8203;379](https://github.com/phpstan/phpstan-src/pull/379)), thanks [@&#8203;VincentLanglet](https://github.com/VincentLanglet)! - `XMLWriter::*Ns()` can accept null in `$prefix` ([#&#8203;383](https://github.com/phpstan/phpstan-src/pull/383)), thanks [@&#8203;spaze](https://github.com/spaze)! - Support for numeric string in bc math ([#&#8203;382](https://github.com/phpstan/phpstan-src/pull/382)), thanks [@&#8203;aszenz](https://github.com/aszenz)! - Fix socket_select's signature https://www.php.net/manual/en/function.socket-select.php ([#&#8203;385](https://github.com/phpstan/phpstan-src/pull/385)), thanks [@&#8203;szepeviktor](https://github.com/szepeviktor)! - Fix imageColorAllocate\* and imageColorAt return type declarations https://www.php.net/manual/en/function.imagecolorallocate.php#refsect1-function.imagecolorallocate-returnvalues ([#&#8203;386](https://github.com/phpstan/phpstan-src/pull/386)), thanks [@&#8203;mundschenk-at](https://github.com/mundschenk-at)! ### [`v0.12.57`](https://github.com/phpstan/phpstan/releases/tag/0.12.57) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.56...0.12.57) # Improvements 🔧 - New Docker image hosted in GitHub Container Registry and based on PHP 8. See [the homepage](https://github.com/orgs/phpstan/packages/container/package/phpstan) and [the documentation](https://phpstan.org/user-guide/docker). - Support for [attributes](https://wiki.php.net/rfc/attributes_v2) (PHP 8) - Result cache does not get invalidated when only ignoreErrors changes (https://github.com/phpstan/phpstan-src/commit/ef84d9444f889ac5606c37ce80d2fa5f19072cb8) - this makes working with the baseline instantaneous! - Result cache - do not restore and save when only files (not directories) are passed as analysed paths (https://github.com/phpstan/phpstan-src/commit/dd11e250007d211a420dfe3da132d08bb2180d7c) - FunctionCallParametersCheck - more precise lines (https://github.com/phpstan/phpstan-src/commit/ba119bcc7b95a46f887c124f4f0d096a0e9c66ca) # Bugfixes 🐛 - Refactored levels that report named arguments errors (https://github.com/phpstan/phpstan-src/commit/1e42295fdce7ef14ab8fc1bc83d00ce8e9e08c43) - TeamcityErrorFormatter - attempt to fix notFileSpecificErrors that do not appear (https://github.com/phpstan/phpstan-src/commit/8ec0a963075432d0041f380abf085a4759d3d966) - Fix FloatType equaling ConstantFloatType ([#&#8203;375](https://github.com/phpstan/phpstan-src/pull/375)), thanks [@&#8203;jlherren](https://github.com/jlherren)! - Fixed wrong closure typehint (https://github.com/phpstan/phpstan-src/commit/50aff6d16cc6d3d3d04778ac579b25c9698b6d74), [#&#8203;4097](https://github.com/phpstan/phpstan/issues/4097) - PhpFunctionReflection - do not return nonexistent filename (https://github.com/phpstan/phpstan-src/commit/e496d71a77ab3b13fb09d2b76e55affd3610bdf4, https://github.com/phpstan/phpstan-src/commit/f000222ca5345d40efa920e52317bdd3bc8c5ea4, https://github.com/phpstan/phpstan-src/commit/3ea4fc30474cba6db3dbf99d7e9006756ed8c983), [#&#8203;4089](https://github.com/phpstan/phpstan/issues/4089) - Updated BetterReflection (https://github.com/phpstan/phpstan-src/commit/73a0c1bf421491501b7a56f053d5df252ddc223c), [#&#8203;4095](https://github.com/phpstan/phpstan/issues/4095) - Turns out static method can be called on a trait (https://github.com/phpstan/phpstan-src/commit/86c11d335debcfd926ec53213a11d19831891566), [#&#8203;4107](https://github.com/phpstan/phpstan/issues/4107) # Function signature fixes 🤖 - Fixing ldap functions stubs ([#&#8203;376](https://github.com/phpstan/phpstan-src/pull/376)), thanks [@&#8203;MCMic](https://github.com/MCMic)! ### [`v0.12.56`](https://github.com/phpstan/phpstan/releases/tag/0.12.56) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.55...0.12.56) # Improvements 🔧 - Support for [named arguments](https://wiki.php.net/rfc/named_params) (PHP 8) - FunctionCallParametersCheck - argument errors reported on more precise lines (https://github.com/phpstan/phpstan-src/commit/c507ae2ed63e583a2f55b0fd7111a01ce7867d66) # Bugfixes 🐛 - Fix internal error (https://github.com/phpstan/phpstan-src/commit/63de0e86ef71f44dbce2b6cc56382ac386190811), [#&#8203;4087](https://github.com/phpstan/phpstan/issues/4087) - Parallel analysis - fix UTF-8 error (https://github.com/phpstan/phpstan-src/commit/0524fb5c8e060d40ef6de65955e8e4b324d94477), [#&#8203;3956](https://github.com/phpstan/phpstan/issues/3956) ### [`v0.12.55`](https://github.com/phpstan/phpstan/releases/tag/0.12.55) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.54...0.12.55) # Improvements 🔧 - Support for [match expression](https://wiki.php.net/rfc/match_expression_v2) (PHP 8) - Support for [nullsafe operator](https://wiki.php.net/rfc/nullsafe_operator) (PHP 8) - Check for no longer supported `(unset)` cast (PHP 8) (https://github.com/phpstan/phpstan-src/commit/56471f6c5e8c933e9098443e5f7492eca9cfc9ed) - `current()` dynamic return type extension (https://github.com/phpstan/phpstan-src/commit/dafba25bd501931a5076b721ffff5906a2e6cc05), [#&#8203;2539](https://github.com/phpstan/phpstan/issues/2539) - OffsetAccessWithoutDimForReadingRule cannot be ignored (https://github.com/phpstan/phpstan-src/commit/450592cf774363e0eb5d44a190c0c1f234993258) - Updated `jetbrains/phpstorm-stubs` (https://github.com/phpstan/phpstan-src/commit/fa8a365e03f95023c4d9ab1709db6e2cecd76ec6) - Detect parameter type widening violation before PHP 7.2 (https://github.com/phpstan/phpstan-src/commit/456f4435ae304fa1a115d7768f6d6326af25b4ec) - Improve comparison operators ([#&#8203;372](https://github.com/phpstan/phpstan-src/pull/372)), thanks [@&#8203;jlherren](https://github.com/jlherren)! - Check also AssignRef in all assignment rules (https://github.com/phpstan/phpstan-src/commit/16392131928ed7ada416484b6443f5bc8e709ae0) - Running with `--debug -vvv` will show how much memory each file consumes (https://github.com/phpstan/phpstan-src/commit/29f89385724a5dc5bbb66e515cb182c5d60a4634) # Bugfixes 🐛 - Fix `range()` with string arguments (https://github.com/phpstan/phpstan-src/commit/67a905a920ce590ac38be7a85f3642c00441b9a7), [#&#8203;2378](https://github.com/phpstan/phpstan/issues/2378) - Assertions done on a variable used in a closure should be transferred inside the closure (https://github.com/phpstan/phpstan-src/commit/36dac3de0330aff1b276f6c4e0dfa65f56588437) - More precise spaceship operator type (https://github.com/phpstan/phpstan-src/commit/1a4f8b3e8659e7ecd2efbb26e96ade42a2c709fb) - Merging scopes in root scope - create maybe-existent variables from the other scope too (https://github.com/phpstan/phpstan-src/commit/310cb839326b462d75ccb000ea2d77b4c58950ae), [#&#8203;4070](https://github.com/phpstan/phpstan/issues/4070) - Int and float toString() produces numeric-string ([#&#8203;371](https://github.com/phpstan/phpstan-src/pull/371)), [#&#8203;4005](https://github.com/phpstan/phpstan/issues/4005), thanks [@&#8203;b1rdex](https://github.com/b1rdex)! - Fix unreachable statement after switch with conditional break (https://github.com/phpstan/phpstan-src/commit/46c39e8d456a44eb3bdcea1a65d5c05bef1ae3e0), [#&#8203;4076](https://github.com/phpstan/phpstan/issues/4076) - Fix detecting unused constructor parameters when func_get_args() is involved (https://github.com/phpstan/phpstan-src/commit/37c6bbc8ec643c9ac27a962086d84d749870588f), [#&#8203;1917](https://github.com/phpstan/phpstan/issues/1917) - Support ARRAY_FILTER_USE_KEY and ARRAY_FILTER_USE_BOTH (https://github.com/phpstan/phpstan-src/commit/138cabd75aa923eff9f320675e905dafc2c3dc49), [#&#8203;3132](https://github.com/phpstan/phpstan/issues/3132) - Fixed compatibility with PHP 7.1 (https://github.com/phpstan/phpstan-src/commit/98b5509441032c004b44219e2214c4cce067d89c) - Parallel analysis - listen to error on Encoder (https://github.com/phpstan/phpstan-src/commit/1fd761d139902f419fb3f7ee0313309e9c951aec, https://github.com/phpstan/phpstan-src/commit/95101a01350698ecaa447fbf791516b8f0a5ccee, https://github.com/phpstan/phpstan-src/commit/14928bf41fbe80ba68ab484e138138442d1cef4a) - Fix IntegerRangeType overflowing ([#&#8203;372](https://github.com/phpstan/phpstan-src/pull/372)), [#&#8203;4010](https://github.com/phpstan/phpstan/issues/4010), thanks [@&#8203;jlherren](https://github.com/jlherren)! - Add missing pre/post inc/dec type specifiers in conditions ([#&#8203;372](https://github.com/phpstan/phpstan-src/pull/372)), thanks [@&#8203;jlherren](https://github.com/jlherren)! - Map phpDoc parameter names for native methods because stub parameter names might be different (https://github.com/phpstan/phpstan-src/commit/9afec60a1caa9eaa5799fb1bb8dd5a17776f02a9), [#&#8203;4084](https://github.com/phpstan/phpstan/issues/4084) # Function signature fixes 🤖 - Add "base64" as key for `stream_get_meta_data` ([#&#8203;369](https://github.com/phpstan/phpstan-src/pull/369)), thanks [@&#8203;SvenRtbg](https://github.com/SvenRtbg)! - PDOStatement::getColumnMeta can return false (https://github.com/phpstan/phpstan-src/commit/9d5f0534753ae507f0c55f817667fc5a2d916349) - ceil() never returns int ([#&#8203;373](https://github.com/phpstan/phpstan-src/pull/373)), thanks [@&#8203;jlherren](https://github.com/jlherren)! ### [`v0.12.54`](https://github.com/phpstan/phpstan/releases/tag/0.12.54) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.53...0.12.54) # Improvements 🔧 - Support for [promoted properties](https://wiki.php.net/rfc/constructor_promotion) (PHP 8) - Support for `@return never` as an alternative to `earlyTerminatingMethodCalls` and `earlyTerminatingFunctionCalls` ([#&#8203;366](https://github.com/phpstan/phpstan-src/pull/366), https://github.com/phpstan/phpstan-src/commit/cc91080c2fbd149d2e9f70bd2908fde78dcad5bf), thanks [@&#8203;b1rdex](https://github.com/b1rdex)! - `PHPStan\dumpType` dummy function and rule for debugging inferred types (https://github.com/phpstan/phpstan-src/commit/c24c8ef699a8cd3b73d355bfd1e7d0b0ff4fc11f) - Updated `jetbrains/phpstorm-stubs` (https://github.com/phpstan/phpstan-src/commit/51aaf579d78e563ca84387c38ce82772bc11ffa4), [#&#8203;4029](https://github.com/phpstan/phpstan/issues/4029) # Bugfixes 🐛 - Fix `ConstantArrayType::toBoolean()` (https://github.com/phpstan/phpstan-src/commit/d22abbea7882cd70346360889989649381c6adbc), [#&#8203;4043](https://github.com/phpstan/phpstan/issues/4043) - Fix `array_slice()` with mixed argument ([#&#8203;367](https://github.com/phpstan/phpstan-src/pull/367)), thanks [@&#8203;jlherren](https://github.com/jlherren)! - Native return type `void` can be combined with PHPDoc type `never` (https://github.com/phpstan/phpstan-src/commit/1857c6cc907fee900996ada63a087cd5341b944f), [#&#8203;4006](https://github.com/phpstan/phpstan/issues/4006) - `ConstantArrayType::generalize()` should generalize item type too (https://github.com/phpstan/phpstan-src/commit/fc052c46cfd0c7940c3182a5b23cd2fac3dac1d7), [#&#8203;4056](https://github.com/phpstan/phpstan/issues/4056) - Result cache - export interface methods (https://github.com/phpstan/phpstan-src/commit/e36e1cd85dfe4ec22077f05ec18595cd11d87139), [#&#8203;4054](https://github.com/phpstan/phpstan/issues/4054) ### [`v0.12.53`](https://github.com/phpstan/phpstan/releases/tag/0.12.53) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.52...0.12.53) # Improvements 🔧 - Support for `Stringable` (PHP 8) (https://github.com/phpstan/phpstan-src/commit/3143833c4f3b1401c2c397be1d4168281683d8d1) - Updated `jetbrains/phpstorm-stubs` (https://github.com/phpstan/phpstan-src/commit/3714a73578f3767aab1d1f7eda11718a31a2f055) - Add support for `no-return` and `never-returns` types as aliases of `never` ([#&#8203;361](https://github.com/phpstan/phpstan-src/pull/361)), thanks [@&#8203;b1rdex](https://github.com/b1rdex)! - Read `#[Pure]` from methods in phpstorm-stubs (https://github.com/phpstan/phpstan-src/commit/500b16052084494dbf14cdf5eeab93f4e3360389) - Detect unused constructor calls (https://github.com/phpstan/phpstan-src/commit/21c50e3c8719eb0e192a383230e09b890b352780) # Bugfixes 🐛 - Sort `IntegerRangeType` numerically ([#&#8203;357](https://github.com/phpstan/phpstan-src/pull/357)), thanks [@&#8203;jlherren](https://github.com/jlherren)! - Fix grammar error ([#&#8203;356](https://github.com/phpstan/phpstan-src/pull/356)), thanks [@&#8203;ericpoe](https://github.com/ericpoe)! - MethodSignatureRule - fixed error message (https://github.com/phpstan/phpstan-src/commit/38fe6937273088dc098e372210d5046929cdea28), [#&#8203;4006](https://github.com/phpstan/phpstan/issues/4006), [#&#8203;4003](https://github.com/phpstan/phpstan/issues/4003) - General array after offset assign is non empty (https://github.com/phpstan/phpstan-src/commit/d67dae35c72344f5cc6a3bd92eee481249d4bd04), [#&#8203;4016](https://github.com/phpstan/phpstan/issues/4016), [#&#8203;3752](https://github.com/phpstan/phpstan/issues/3752) - Fixed `ConstantArrayType::isSuperTypeOf()` (https://github.com/phpstan/phpstan-src/commit/1753f2f097a556574dbfc9264372f152f000163c) - Non-ArrayAccess object might be offset-accessible (https://github.com/phpstan/phpstan-src/commit/b55656f558535e17f785c6bbba9f5468a1440be4, [#&#8203;363](https://github.com/phpstan/phpstan-src/pull/363)), [#&#8203;3836](https://github.com/phpstan/phpstan/issues/3836), thanks [@&#8203;b1rdex](https://github.com/b1rdex)! - PHPStan Pro - use Cloudflare DNS (https://github.com/phpstan/phpstan-src/commit/fb5553533d76caf454be8748b5ce10b64f4f7270) - Do not inherit constructor PHPDocs from internal classes (https://github.com/phpstan/phpstan-src/commit/3a57521362cc7c33e2288f0c6e5b3f9ccf0823e7), [#&#8203;4011](https://github.com/phpstan/phpstan/issues/4011), [#&#8203;4030](https://github.com/phpstan/phpstan/issues/4030) - Fix checking overriden method signature when method-level generics are involved (https://github.com/phpstan/phpstan-src/commit/1c2b7271ff0468f264837cc7ab32c6a52574658e), [#&#8203;4017](https://github.com/phpstan/phpstan/issues/4017), [#&#8203;4023](https://github.com/phpstan/phpstan/issues/4023) - CallToStaticMethodStamentWithoutSideEffectsRule - skip `parent::__construct()` (https://github.com/phpstan/phpstan-src/commit/c8e4f8bb309c01e339a06c6d4c0bfab27a0d6c08) - PhpStormStubsSourceStubber AstLocator - use PHP 8 parser (https://github.com/phpstan/phpstan-src/commit/381080427111371297e7d02c7d2ee696d3353b20) # Function signature fixes 🤖 - `system()` can return false ([#&#8203;358](https://github.com/phpstan/phpstan-src/pull/358)), thanks [@&#8203;jlherren](https://github.com/jlherren)! - Correct type of SimpleXMLElement properties ([#&#8203;359](https://github.com/phpstan/phpstan-src/pull/359)), thanks [@&#8203;AJenbo](https://github.com/AJenbo)! ### [`v0.12.52`](https://github.com/phpstan/phpstan/releases/tag/0.12.52) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.51...0.12.52) # Improvements 🔧 - Detect more unused function calls (generate `functionMetadata.php` from PhpStorm stubs' `#[Pure]` attribute) (https://github.com/phpstan/phpstan-src/commit/28176907579d800e3edc879212654bc4fabbe484) # Bugfixes 🐛 - Scope - any variable after `extract()` call might exist (https://github.com/phpstan/phpstan-src/commit/d3e7b9cd30d1fe0a323ec42d75dc74821a0def84), [#&#8203;3990](https://github.com/phpstan/phpstan/issues/3990) - Fix false positive with `isset()` and `empty()` (https://github.com/phpstan/phpstan-src/commit/05942ca9dabf94c75f17f038fa966cee61dc58e0), [#&#8203;3991](https://github.com/phpstan/phpstan/issues/3991) - Fixed `assert()` bug (https://github.com/phpstan/phpstan-src/commit/ca044c40c30fdfa01bbca75f816c82c63aff3448), [#&#8203;3994](https://github.com/phpstan/phpstan/issues/3994) - `array_shift()` should invalidate remembered `count()` call (https://github.com/phpstan/phpstan-src/commit/26d29ec6022237148c3b482043ac88f97ae5eba0), [#&#8203;3993](https://github.com/phpstan/phpstan/issues/3993) - Do not complain about non-covariant return type in `count()` method in implementations of Countable interface (MethodSignatureRule - read PHPDoc types instead of combined types) (https://github.com/phpstan/phpstan-src/commit/fb8d3ef823742ed11ee2b1fba337ed34c8034e8d), [#&#8203;3997](https://github.com/phpstan/phpstan/issues/3997) - Fix literal array with empty item outside of left-side assign (https://github.com/phpstan/phpstan-src/commit/a97477bfb7dbee0f0e7f8404e3c58dee4cadb0dd), [#&#8203;4000](https://github.com/phpstan/phpstan/issues/4000) ### [`v0.12.51`](https://github.com/phpstan/phpstan/releases/tag/0.12.51) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.50...0.12.51) # Improvements 🔧 - Implement `positive-int` and `negative-int` types (https://github.com/phpstan/phpstan-src/commit/2fc6a5f96d444c210bc69e3971510d2726a53ce2), [#&#8203;3790](https://github.com/phpstan/phpstan/issues/3790) - Certain functions are known to only ever return 0 or positive integer (https://github.com/phpstan/phpstan-src/commit/6784a1ce7c1d79a13941c15534cdf968182538f4, https://github.com/phpstan/phpstan-src/commit/a78a2e795a88497f5dfbe972a3ccf63c4e31aeb1) - Implement property name as an expression in AccessPropertiesRule and AccessStaticPropertiesRule ([#&#8203;348](https://github.com/phpstan/phpstan-src/pull/348)) - Update PhpStorm stubs (https://github.com/phpstan/phpstan-src/commit/4a886db25a276d327759ee0a3e3d3c6ff585df1e), [#&#8203;3975](https://github.com/phpstan/phpstan/issues/3975) - PhpStorm stubs - parse them with PHP 8 parser (https://github.com/phpstan/phpstan-src/commit/59c04234e9c49e45bb28f2938a0a90db01f3d8e5, https://github.com/phpstan/phpstan-src/commit/0f8a61a86e51f46bc478994d06d9226d6f3283db) - Old-style constructors are no longer supported on PHP 8 (https://github.com/phpstan/phpstan-src/commit/aa502ff6b53ecf18da2122172e56c7e0538b1951) # Bugfixes 🐛 - Fixed casting CurlMultiHandle to `(int)` (https://github.com/phpstan/phpstan-src/commit/72194195a71b112f132fbf0a69ac0f2bc496e647) - Update PHP 8 stubs - fix `assert_options()` (https://github.com/phpstan/phpstan-src/commit/2164616b8cd876eab7f95b8f6efbc582f3aad14d), [#&#8203;3944](https://github.com/phpstan/phpstan/issues/3944) - Fix resolving type of `isset($arr['key'])` ([#&#8203;346](https://github.com/phpstan/phpstan-src/pull/346)), thanks [@&#8203;jlherren](https://github.com/jlherren)! - Fix `isset()` with multiple arguments ([#&#8203;345](https://github.com/phpstan/phpstan-src/pull/345)), thanks [@&#8203;jlherren](https://github.com/jlherren)! - Create only the default `tmpDir` directory (https://github.com/phpstan/phpstan-src/commit/5be8b8081bb01cc8c2ea0c91554288777b2a4f90) - PropertyDescriptor - correctly resolve from reflection whether a property is static or not (https://github.com/phpstan/phpstan-src/commit/fadb43965ecf660921391548bdedaea4d25ca6d9) - Fix scale parameter check in bc math return type extension ([#&#8203;353](https://github.com/phpstan/phpstan-src/pull/353)), [#&#8203;3978](https://github.com/phpstan/phpstan/issues/3978), thanks [@&#8203;jaroslavlibal](https://github.com/jaroslavlibal)! - Fixed variable certainty of a nonexistent variable after `isset()` (https://github.com/phpstan/phpstan-src/commit/3b21093bb5750494dd839649c955691b3e1a61b7), [#&#8203;3985](https://github.com/phpstan/phpstan/issues/3985) - `isset()` - fix false positive (https://github.com/phpstan/phpstan-src/commit/fcb78d9597713cb7a8617f0c5365e51e1a01f078), [#&#8203;2816](https://github.com/phpstan/phpstan/issues/2816) - Fix truncating invalid UTF-8 strings ([#&#8203;354](https://github.com/phpstan/phpstan-src/pull/354)), thanks [@&#8203;jfreixa](https://github.com/jfreixa)! - Fix `array_slice` with non-empty-array (https://github.com/phpstan/phpstan-src/commit/273b3cef8f49211a569a4d4e3849895dcfc26376) # Function signature fixes 🤖 - `explode()` returns a non-empty array in certain scenarios (https://github.com/phpstan/phpstan-src/commit/00691075acb1db2d1a6fbdbf607e0b52271815bb), [#&#8203;3596](https://github.com/phpstan/phpstan/issues/3596), [#&#8203;3961](https://github.com/phpstan/phpstan/issues/3961) - `setlocale()` can take as argument string|null ([#&#8203;351](https://github.com/phpstan/phpstan-src/pull/351)), thanks [@&#8203;peter-gribanov](https://github.com/peter-gribanov)! ### [`v0.12.50`](https://github.com/phpstan/phpstan/releases/tag/0.12.50) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.49...0.12.50) # Improvements 🔧 - Support for `throw` expression (PHP 8.0) (https://github.com/phpstan/phpstan-src/commit/5f2d42cec0f1d95ea3290695e717d1ab5ad09a14) - Support `::class` on expression (PHP 8.0) (https://github.com/phpstan/phpstan-src/commit/cec1be72aa725c23b171973e3e9b063ad3a20b87) - Support `non-empty-array` and `non-empty-list` (https://github.com/phpstan/phpstan-src/commit/a4038b2712406fc3e30f878f5483bbb9200a53d5) # Bugfixes 🐛 - Fix an intersection with NeverType ([#&#8203;341](https://github.com/phpstan/phpstan-src/pull/341)), thanks [@&#8203;jlherren](https://github.com/jlherren)! - Fix GenericClassStringType being equal when it's not ([#&#8203;341](https://github.com/phpstan/phpstan-src/pull/341)), thanks [@&#8203;jlherren](https://github.com/jlherren)! - Fix intersection of iterable and array ([#&#8203;341](https://github.com/phpstan/phpstan-src/pull/341)), thanks [@&#8203;jlherren](https://github.com/jlherren)! - Fixed nested ternary (https://github.com/phpstan/phpstan-src/commit/ea43e81b26275b29171fb466006f1352e9433699), [#&#8203;3942](https://github.com/phpstan/phpstan/issues/3942) - Fixed casting CurlHandle to `(int)` (https://github.com/phpstan/phpstan-src/commit/842b468cc60cbcf599b161f26e4806387b915455), [#&#8203;3939](https://github.com/phpstan/phpstan/issues/3939) - Fixed SimpleXMLElement bug (https://github.com/phpstan/phpstan-src/commit/af5921e46418da45816b98de4ef1e59c9eb4c5a7), [#&#8203;3958](https://github.com/phpstan/phpstan/issues/3958) - Fix SimpleXMLElement iterable type on PHP 8 (https://github.com/phpstan/phpstan-src/commit/befb7433cf539938a52b530ad2dfdbb965e245c2), [#&#8203;3947](https://github.com/phpstan/phpstan/issues/3947) - Report real file with a parse error (https://github.com/phpstan/phpstan-src/commit/8113f3840dbd298bbb5fb5311c6f1f85ea5f4d59), [#&#8203;3943](https://github.com/phpstan/phpstan/issues/3943) # Function signature fixes 🤖 - Correct `hash` function return type ([#&#8203;343](https://github.com/phpstan/phpstan-src/pull/343)), thanks [@&#8203;Synchro](https://github.com/Synchro)! ### [`v0.12.49`](https://github.com/phpstan/phpstan/releases/tag/0.12.49) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.48...0.12.49) # Improvements 🔧 - **Try out PHP 8 analysis now!** Set `parameters.phpVersion` in your `phpstan.neon` to `80000` and re-run PHPStan to see how well your code will fare once PHP 8 is released! - It will be improved in the coming weeks to cover more deprecations and new features. - Update phpstorm-stubs and understand `@removed` annotation (https://github.com/phpstan/phpstan-src/commit/a39a46f5b870d0aa636de0e4a87979a4f9062946, https://github.com/phpstan/phpstan-src/commit/4eecc4f7b8ff7cfbeaaac73d60876ea759ef0e12) - Implemented falsey-filtered subtracted `mixed` type ([#&#8203;339](https://github.com/phpstan/phpstan-src/pull/339)), [#&#8203;1014](https://github.com/phpstan/phpstan/issues/1014), thanks [@&#8203;jlherren](https://github.com/jlherren)! # Bugfixes 🐛 - `hoa/Stream.php` - remove registerShutdownFunction (https://github.com/phpstan/phpstan-src/commit/edd5c3c14dd13da10a038065de1cc3329df573a2), [#&#8203;3907](https://github.com/phpstan/phpstan/issues/3907) - DependencyResolver - get current function reflection instead of obtaining it through ReflectionProvider (https://github.com/phpstan/phpstan-src/commit/0e429416b5a0ca4bed9fe1522c2d30fcb92acd95), [#&#8203;3909](https://github.com/phpstan/phpstan/issues/3909) - More useful behaviour of "some jobs remaining" (https://github.com/phpstan/phpstan-src/commit/6c61e497f692e692d95829689c2715347b6a916, https://github.com/phpstan/phpstan-src/commit/34c48299d1de901f9a27d5c71213b1b48e6ed53c), [#&#8203;3910](https://github.com/phpstan/phpstan/issues/3910) - Fix type-less variadic argument in anonymous function ([#&#8203;332](https://github.com/phpstan/phpstan-src/pull/332)), thanks [@&#8203;jlherren](https://github.com/jlherren)! - Fix native union type parameter with `false` (https://github.com/phpstan/phpstan-src/commit/917cdb13748c62ff0402a50a2d70ea5839125ba9) - Fix native union type with incomplete PHPDoc (https://github.com/phpstan/phpstan-src/commit/c3d09898e8195346c66d66fa7908fa65e27e451a) - Fix type inference in assignment with side-effects ([#&#8203;333](https://github.com/phpstan/phpstan-src/pull/333)), [#&#8203;3875](https://github.com/phpstan/phpstan/issues/3875), [#&#8203;2611](https://github.com/phpstan/phpstan/issues/2611), [#&#8203;3548](https://github.com/phpstan/phpstan/issues/3548), thanks [@&#8203;jlherren](https://github.com/jlherren)! - Fix JustNullableTypeTrait.equals() ([#&#8203;335](https://github.com/phpstan/phpstan-src/pull/335)), [#&#8203;3866](https://github.com/phpstan/phpstan/issues/3866), thanks [@&#8203;jlherren](https://github.com/jlherren)! - Fix variadic parameter after optional (https://github.com/phpstan/phpstan-src/commit/287b8b85ca7f2faf12e1c6ac5301d78be54067b9) - Fix reporting overriden variadics (https://github.com/phpstan/phpstan-src/commit/2cd700142fb4756650f96a6227e4bb35eb3b5ef0) # Function signature fixes 🤖 - make second two arguments optional in `mysqli_begin_transaction` ([#&#8203;331](https://github.com/phpstan/phpstan-src/pull/331)), thanks [@&#8203;MasterOdin](https://github.com/MasterOdin)! - `PHPStan\Reflection\ClassReflection::getName()` returns `class-string` (https://github.com/phpstan/phpstan-src/commit/3d1d930c0091cef6a2fae422d5400482a66427a3) - Fix `Memcache::get` signature ([#&#8203;338](https://github.com/phpstan/phpstan-src/pull/338)), thanks [@&#8203;dada-amater](https://github.com/dada-amater)! - Handle dynamic return types for bc math functions ([#&#8203;187](https://github.com/phpstan/phpstan-src/pull/187)), thanks [@&#8203;eigan](https://github.com/eigan)! - First parameter of `SimpleXMLElement::children()` accepts null (https://github.com/phpstan/phpstan-src/commit/7ce2e54b1883d387365a9ffabbbaf1896a3c97bb) - functionMap - synchronized some of parameter names with PHP 8 stubs (https://github.com/phpstan/phpstan-src/commit/71e7550ba355fd9be672f6efa623216509926b15, https://github.com/phpstan/phpstan-src/commit/0c87f16948c88e885077085994281fec4be9f3ab) - Dynamic return type extension for `pow()` (https://github.com/phpstan/phpstan-src/commit/c54e495319a1f6e59233f44e7567d056538aaee7) ### [`v0.12.48`](https://github.com/phpstan/phpstan/releases/tag/0.12.48) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.47...0.12.48) - Fix `Error::canBeIgnored()` which caused [result cache](https://phpstan.org/user-guide/result-cache) to be silently unused (https://github.com/phpstan/phpstan-src/commit/2af17d9aeddf0d69dc0b0e739e0ad38af54eb80d), [#&#8203;3897](https://github.com/phpstan/phpstan/issues/3897) - Make last parameter of `openssl_seal` optional ([#&#8203;329](https://github.com/phpstan/phpstan-src/pull/329)), thanks [@&#8203;phil-davis](https://github.com/phil-davis)! - functionMap - Fix more optional parameters followed by required parameters (https://github.com/phpstan/phpstan-src/commit/d2f443ccfe2c228eff89b4b5668aaf92dad0e3ea) - Return `false` for hash_hmac/hash_hmac_file on invalid algorithm ([#&#8203;328](https://github.com/phpstan/phpstan-src/pull/328)), thanks [@&#8203;pascalheidmann](https://github.com/pascalheidmann)! ### [`v0.12.47`](https://github.com/phpstan/phpstan/releases/tag/0.12.47) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.46...0.12.47) 🚀 PHPStan Pro has been released 🚀 In few brief points: - Web UI for browsing found errors, you can click and open your editor of choice on the offending line. - Continuous analysis (watch mode): scans changed files in the background, refreshes the UI automatically. - Interactive fixer: lets you choose the right fix for found errors :blush: Try it by running PHPStan with the `--pro` option. After 30-day free trial period it costs 7 EUR for individuals monthly, 70 EUR for teams (up to 25 members), you’ll support the development of open-source PHPStan :blush: If you’re using PHPStan at your job to prevent bugs reaching production, please consider paying for PHPStan Pro, 70 EUR monthly is less than a man-day :blush: You can read more about it on the blog: https://phpstan.org/blog/introducing-phpstan-pro I’m looking forward to your feedback! ### [`v0.12.46`](https://github.com/phpstan/phpstan/releases/tag/0.12.46) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.45...0.12.46) - Update `nikic/php-parser` (https://github.com/phpstan/phpstan-src/commit/e7203bc45cc7f75988752f4389672a69719fcb01), fixes [#&#8203;3885](https://github.com/phpstan/phpstan/issues/3885) (Internal error in StubPhpDocProvider.php) - `openssl_seal` has up to 6 parameters ([#&#8203;327](https://github.com/phpstan/phpstan-src/pull/327)), thanks [@&#8203;foppelfb](https://github.com/foppelfb)! ### [`v0.12.45`](https://github.com/phpstan/phpstan/releases/tag/0.12.45) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.44...0.12.45) `bindec` returns `float|int` ([#&#8203;326](https://github.com/phpstan/phpstan-src/pull/326)), thanks [@&#8203;Synchro](https://github.com/Synchro)! ### [`v0.12.44`](https://github.com/phpstan/phpstan/releases/tag/0.12.44) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.43...0.12.44) `preg_split` sometimes returns array of arrays ([#&#8203;324](https://github.com/phpstan/phpstan-src/pull/324)), thanks [@&#8203;spaze](https://github.com/spaze)! ### [`v0.12.43`](https://github.com/phpstan/phpstan/releases/tag/0.12.43) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.42...0.12.43) # Improvements 🔧 - Updated nikic/php-parser to 4.10.0 (https://github.com/phpstan/phpstan-src/commit/ff092a0187555a3b0f79cc9b951e051c0253af59) # Bugfixes 🐛 - Removed duplicate rule (https://github.com/phpstan/phpstan-src/commit/92b57a5ec7e96f02df6ac90e2ec29d7df4577f20) - Encode newlines in GithubErrorFormatter ([#&#8203;317](https://github.com/phpstan/phpstan-src/pull/317)), thanks [@&#8203;staabm](https://github.com/staabm)! - Do not report `$_SESSION` as always existing ([#&#8203;321](https://github.com/phpstan/phpstan-src/pull/321)), thanks [@&#8203;b1rdex](https://github.com/b1rdex)! # Function signature fixes 🤖 - Fixed Redis::zScore() signature ([#&#8203;319](https://github.com/phpstan/phpstan-src/pull/319)), thanks [@&#8203;lyrixx](https://github.com/lyrixx)! - Fix Redis::lPush(), Redis::lPushx(), Redis::rPush() and Redis::rPushx() signature ([#&#8203;323](https://github.com/phpstan/phpstan-src/pull/323)), thanks [@&#8203;araab](https://github.com/araab)! ### [`v0.12.42`](https://github.com/phpstan/phpstan/releases/tag/0.12.42) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.41...0.12.42) Fix error: `Exception: Return value of PHPStan\PhpDoc\ResolvedPhpDocBlock::getNameScope() must be an instance of PHPStan\Analyser\NameScope, null returned` (https://github.com/phpstan/phpstan-src/commit/6e73d64d0c6b80de95f9d1a24ce71e4940eae715), [#&#8203;3820](https://github.com/phpstan/phpstan/issues/3820) ### [`v0.12.41`](https://github.com/phpstan/phpstan/releases/tag/0.12.41) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.40...0.12.41) # Improvements 🔧 - **Faster result cache** - analyse dependent files only if public-facing thing (like public or protected properties, methods, constants etc.) from changed file was changed ([#&#8203;314](https://github.com/phpstan/phpstan-src/pull/314)) - Missing typehints: recurse into generic objects parameters ([#&#8203;306](https://github.com/phpstan/phpstan-src/pull/306)), thanks [@&#8203;dktapps](https://github.com/dktapps)! - Updated `nikic/php-parser` to 4.9.1 (https://github.com/phpstan/phpstan-src/commit/abf2d0fcb726eed9676e4e1c2a94ecaf8aa957f8) - Add option to check internal class capitalization ([#&#8203;313](https://github.com/phpstan/phpstan-src/pull/313)), thanks [@&#8203;Riimu](https://github.com/Riimu)! # Bugfixes 🐛 - Implemented checks for use of void return of yield ([#&#8203;309](https://github.com/phpstan/phpstan-src/pull/309)), [#&#8203;2873](https://github.com/phpstan/phpstan/issues/2873), thanks [@&#8203;dktapps](https://github.com/dktapps)! - TypeNodeResolver: callable variadics are always optional ([#&#8203;310](https://github.com/phpstan/phpstan-src/pull/310)), [#&#8203;3815](https://github.com/phpstan/phpstan/issues/3815), [#&#8203;3326](https://github.com/phpstan/phpstan/issues/3326), thanks [@&#8203;dktapps](https://github.com/dktapps)! ### [`v0.12.40`](https://github.com/phpstan/phpstan/releases/tag/0.12.40) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.39...0.12.40) # Improvements 🔧 - New `numeric-string` type for PHPDocs - Understand that `date` function can sometimes return numeric string (https://github.com/phpstan/phpstan-src/commit/1053ee754c7f6cc366c295cc1f64b0ba0f021875), [#&#8203;2899](https://github.com/phpstan/phpstan/issues/2899) - Optimized memory consumption. It's now down 30 % to 40 % than in 0.12.39! (https://github.com/phpstan/phpstan-src/commit/c9678cd71d92c8de6f1c75b415c55035e9ae936a, https://github.com/phpstan/phpstan-src/commit/ba40208daa839870bc0d5faaf2c3bc52dbd4a941) # Bugfixes 🐛 - Fixed various bugs related to `is_numeric()` (https://github.com/phpstan/phpstan-src/commit/7f04f75c9cd98a8ada7d54fa2938bb2d707c4bee, https://github.com/phpstan/phpstan-src/commit/1d27c61ede2f92774fe53b88607a893514ff1fd4), [#&#8203;3664](https://github.com/phpstan/phpstan/issues/3664), [#&#8203;3489](https://github.com/phpstan/phpstan/issues/3489), [#&#8203;2710](https://github.com/phpstan/phpstan/issues/2710), [#&#8203;3133](https://github.com/phpstan/phpstan/issues/3133), [#&#8203;2964](https://github.com/phpstan/phpstan/issues/2964), [#&#8203;2550](https://github.com/phpstan/phpstan/issues/2550), [#&#8203;3161](https://github.com/phpstan/phpstan/issues/3161) ### [`v0.12.39`](https://github.com/phpstan/phpstan/releases/tag/0.12.39) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.38...0.12.39) # Improvements 🔧 - Support for prefixed PHPDoc `@method` tags ([#&#8203;302](https://github.com/phpstan/phpstan-src/pull/302)), thanks [@&#8203;yosatak](https://github.com/yosatak)! # Bleeding edge 🔪 - Add `SplObjectStorage` stub ([#&#8203;301](https://github.com/phpstan/phpstan-src/pull/301)), [#&#8203;3111](https://github.com/phpstan/phpstan/issues/3111), thanks [@&#8203;VincentLanglet](https://github.com/VincentLanglet)! *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.* # Bugfixes 🐛 - Understand array is not empty after `count($array) > 0` and similar conditions ([#&#8203;305](https://github.com/phpstan/phpstan-src/pull/305)), thanks [@&#8203;ossinkine](https://github.com/ossinkine)! - Remove NonEmptyArrayType after `unset()` (https://github.com/phpstan/phpstan-src/commit/e96481c3210c9aa93de45f482c11789c1face65d) - functionMap should not be prefixed in the PHAR (https://github.com/phpstan/phpstan-src/commit/79bae4b17d9a1a38559127c90107bacbec6cb853), [#&#8203;3776](https://github.com/phpstan/phpstan/issues/3776) ### [`v0.12.38`](https://github.com/phpstan/phpstan/releases/tag/0.12.38) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.37...0.12.38) # Improvements 🔧 - PHP 8: Support for `static` return type (https://github.com/phpstan/phpstan-src/commit/75ff7054b04b2f2929f4a02785187c429cf8386c) - Add support for the `callable-string` type ([#&#8203;296](https://github.com/phpstan/phpstan-src/pull/296)), thanks [@&#8203;ste93cry](https://github.com/ste93cry)! - Updated `nikic/php-parser` to 4.9.0 (https://github.com/phpstan/phpstan-src/commit/05b6a541158370abb3033f5a94fad1b462ad4e00) - Doc comment above class doesn't have to exist if it has a stub file (https://github.com/phpstan/phpstan-src/commit/17315cb32f4d584dd28b413b42f338d3ab14b5de) - `min()` and `max()` may return false if array size could be zero ([#&#8203;300](https://github.com/phpstan/phpstan-src/pull/300)), thanks [@&#8203;dktapps](https://github.com/dktapps)! # Bugfixes 🐛 - Fix internal error with an unknown interface (https://github.com/phpstan/phpstan-src/commit/19fab3fc26dc776a3ec9df4c642880e93ec1a2c4) - Property is also read for `??=` and other assign ops (https://github.com/phpstan/phpstan-src/commit/efb11ec5cfaee7b7a54ff0dd79689410f387122a, https://github.com/phpstan/phpstan-src/commit/71c51e40e71985b152456b3b56d4c6593f0fe279), [#&#8203;3735](https://github.com/phpstan/phpstan/issues/3735), [#&#8203;3636](https://github.com/phpstan/phpstan/issues/3636) - PHAR compiler - preload `src/` too (https://github.com/phpstan/phpstan-src/commit/ca70ff098542c88ea6e8386b0c09e0dac3503851), [#&#8203;3731](https://github.com/phpstan/phpstan/issues/3731) # Function signature fixes 🤖 - Fix nullables in DOMXPath ([#&#8203;299](https://github.com/phpstan/phpstan-src/pull/299)), thanks [@&#8203;xPaw](https://github.com/xPaw)! ### [`v0.12.37`](https://github.com/phpstan/phpstan/releases/tag/0.12.37) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.36...0.12.37) # Improvements 🔧 - Added TeamCity error formatter ([#&#8203;295](https://github.com/phpstan/phpstan-src/pull/295)), thanks [@&#8203;MaximilianKresse](https://github.com/MaximilianKresse)! - Updated `nikic/php-parser` to 4.8.0 (https://github.com/phpstan/phpstan-src/commit/65a74c660d09141b6d69439f99e01a922e0409ab) - Updated `LexerFactory` to take advantage of the new `Emulative` lexer capabilities (https://github.com/phpstan/phpstan-src/commit/71013bc41eec44b9a5796ec6dd8c84b5e01b847e) - some of the new syntax from PHP 7.3, 7.4, and 8.0 will now be marked as parse error on lower PHP versions # Bugfixes 🐛 - Escape special `nette/di` characters in BaselineNeonErrorFormatter (https://github.com/phpstan/phpstan-src/commit/7336df1a85d761b53df1222c6f1840d2420b99ba), [#&#8203;3705](https://github.com/phpstan/phpstan/issues/3705) ### [`v0.12.36`](https://github.com/phpstan/phpstan/releases/tag/0.12.36) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.35...0.12.36) # Improvements 🔧 - Introduced NodeConnectingVisitor to be able to look around the current node in rules (https://github.com/phpstan/phpstan-src/commit/e72ef39e1519b0e0c6d0cd89884d2e8a39d3c071) - Add support for `@phpstan-throws` ([#&#8203;292](https://github.com/phpstan/phpstan-src/pull/292)), thanks [@&#8203;VincentLanglet](https://github.com/VincentLanglet)! - Generics: disallow variance definition other than in class or interface ([#&#8203;278](https://github.com/phpstan/phpstan-src/pull/278)), thanks [@&#8203;hrach](https://github.com/hrach)! # Bugfixes 🐛 - Update BetterReflection - fixes bug with namespaced constants (https://github.com/phpstan/phpstan-src/commit/818830419df76d89e7b7d533d85c2196cf573a62), [#&#8203;3712](https://github.com/phpstan/phpstan/issues/3712) - Prevent internal error in case of unknown constant (https://github.com/phpstan/phpstan-src/commit/e964816ea590b447696438ed433f7e5359037ab4), [#&#8203;3379](https://github.com/phpstan/phpstan/issues/3379) - Fix detecting unused property from class used in trait (https://github.com/phpstan/phpstan-src/commit/11ef998efbea0ab9edc046918a52c4918a553ba6), [#&#8203;3716](https://github.com/phpstan/phpstan/issues/3716) ### [`v0.12.35`](https://github.com/phpstan/phpstan/releases/tag/0.12.35) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.34...0.12.35) # Bugfixes 🐛 - Fixed parent class of ParseError on PHP < 7.3 (https://github.com/phpstan/phpstan-src/commit/353cb012ab57f2f32f4360ebddd24164d17b73bd), [#&#8203;3690](https://github.com/phpstan/phpstan/issues/3690) - Fix unknown constants as default parameter values (https://github.com/phpstan/phpstan-src/commit/d3044eef82abeea4c191f599cee3775fdebd46f4), [#&#8203;3635](https://github.com/phpstan/phpstan/issues/3635), [#&#8203;3629](https://github.com/phpstan/phpstan/issues/3629) - Private \__clone method isn't considered unused (https://github.com/phpstan/phpstan-src/commit/cdbed8608a5245560fb3858fda21803d129353f5), [#&#8203;3630](https://github.com/phpstan/phpstan/issues/3630) - Do not report unused private methods/properties in traits (https://github.com/phpstan/phpstan-src/commit/5958c29890388c0c0b23178c3e2380de2556171a), [#&#8203;3637](https://github.com/phpstan/phpstan/issues/3637) - Fix anonymous class that extends the outer class (https://github.com/phpstan/phpstan-src/commit/4cad0c63d5d2148abffc9d309aedf08bed39ed08), [#&#8203;3663](https://github.com/phpstan/phpstan/issues/3663) - Fix infinite loop (https://github.com/phpstan/phpstan-src/commit/6d818816d66f50ece9922c8b437bbfd2067bb728), [#&#8203;3686](https://github.com/phpstan/phpstan/issues/3686) # Function signature fixes 🤖 - Correct return types for `odbc_connect()` and `odbc_prepare()` ([#&#8203;289](https://github.com/phpstan/phpstan-src/pull/289)), thanks [@&#8203;duncan3dc](https://github.com/duncan3dc)! ### [`v0.12.34`](https://github.com/phpstan/phpstan/releases/tag/0.12.34) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.33...0.12.34) # Improvements 🔧 - `@mixin` above classes with `__callStatic()` creates static methods (https://github.com/phpstan/phpstan-src/commit/aa38695f3790b4984e0d60301f4b0ef32eb9578f), [#&#8203;3641](https://github.com/phpstan/phpstan/issues/3641) - Detect cache saving error (https://github.com/phpstan/phpstan-src/commit/542238a6e8a1f9af328736f9232e2744e0d69e4c), [#&#8203;3638](https://github.com/phpstan/phpstan/issues/3638) - Updated nikic/php-parser to 4.7.0 (https://github.com/phpstan/phpstan-src/commit/5a3deae451ced207901bf707c81152e6bf9a1b55) - Improved PHP 8 compatibility after [Treat namespaced names as single token RFC](https://wiki.php.net/rfc/namespaced_names_as_token) got merged into php-src # Bugfixes 🐛 - Handle `yield` in for loop, foreach loop, while loop, do-while loop, if condition, switch statement ([#&#8203;286](https://github.com/phpstan/phpstan-src/pull/286)), thanks [@&#8203;dantleech](https://github.com/dantleech)! - Fix missing method `Generator::throw()` (https://github.com/phpstan/phpstan-src/commit/153c874ad7f533e7da5f5af4d55c2839494d3754), [#&#8203;3683](https://github.com/phpstan/phpstan/issues/3683), [#&#8203;3418](https://github.com/phpstan/phpstan/issues/3418) - Fix anonymous class with PHPDoc ([#&#8203;283](https://github.com/phpstan/phpstan-src/pull/283)), [#&#8203;3661](https://github.com/phpstan/phpstan/issues/3661), thanks [@&#8203;dbrekelmans](https://github.com/dbrekelmans)! # Function signature fixes 🤖 - PDO::exec could also return false ([#&#8203;281](https://github.com/phpstan/phpstan-src/pull/281)), thanks [@&#8203;Slamdunk](https://github.com/Slamdunk)! - Allowing null as limit for mb_strcut ([#&#8203;284](https://github.com/phpstan/phpstan-src/pull/284)), thanks [@&#8203;balazscsaba2006](https://github.com/balazscsaba2006)! - proc_get_status return type: use array shape according to doc; can also return false ([#&#8203;288](https://github.com/phpstan/phpstan-src/pull/288)), thanks [@&#8203;Slamdunk](https://github.com/Slamdunk)! ### [`v0.12.33`](https://github.com/phpstan/phpstan/releases/tag/0.12.33) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.32...0.12.33) # Improvements 🔧 - **Initial PHP 8 support!** - PHPStan can now analyse sources for PHP 7.x when running on PHP 8. Not all the new PHP 8 features are supported yet. - Support for native union types (https://github.com/phpstan/phpstan-src/commit/39f8909dfa2c7e53086a2c7443f848d864a6ae2a) - Support for native `mixed` type (https://github.com/phpstan/phpstan-src/commit/a9043e0121d512572275ffbf1661aa28bfd1b563) - **Set different PHP version than your runtime** - If you set different `phpVersion` parameter in your `phpstan.neon`, you can for example tell PHPStan to analyse source code like it's written for PHP 7.4 even if you're running PHP 8. The `phpVersion` config parameter is in `PHP_VERSION_ID` format - for PHP 7.4, use `70400`. - You can also set a newer PHP version. So you can run PHPStan on 7.4, but already test compatibility with PHP 8 by setting `phpVersion` to `80000`. - Check uninitialized typed properties that aren't set in the constructor (https://github.com/phpstan/phpstan-src/commit/a1eb1f5b65b62019b1d4653f9438c7591c3379a3), [#&#8203;2984](https://github.com/phpstan/phpstan/issues/2984) - Off by default, needs `checkUninitializedProperties: true`. - Show error on unescaped `()` in ignoreErrors (https://github.com/phpstan/phpstan-src/commit/8479d405a452d915c79792c0d1c54c55dd3a9790), [#&#8203;3602](https://github.com/phpstan/phpstan/issues/3602) # Bleeding edge 🔪 - **Detect unused and write-only/read-only private properties, methods, and constants** (level 4) - [Read more on the PHPStan's blog](http://phpstan.org/blog/detecting-unused-private-properties-methods-constants) - `config.platform.php` in project's `composer.json` is respected and overrides the current runtime PHP version (https://github.com/phpstan/phpstan-src/commit/d2351952200507028d6785de882aaccf0b649336). *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.* # Bugfixes 🐛 - Skip not deprecated methods ([#&#8203;267](https://github.com/phpstan/phpstan-src/pull/267)), thanks [@&#8203;malarzm](https://github.com/malarzm)! - Type aliases cannot be used internally because they might clash with an existing class name (https://github.com/phpstan/phpstan-src/commit/4d082805aeca65db89549545ff06c5c877d68c48), [#&#8203;3569](https://github.com/phpstan/phpstan/issues/3569) - Fix covariant type check when template has bound ([#&#8203;272](https://github.com/phpstan/phpstan-src/pull/272)), thanks [@&#8203;hrach](https://github.com/hrach)! # Function signature fixes 🤖 - Updated phpstorm-stubs (https://github.com/phpstan/phpstan-src/commit/e1f492c1dc7d2d32fcb2f01ea3aaa6deb6de9c3c), [#&#8203;3539](https://github.com/phpstan/phpstan/issues/3539), [#&#8203;3512](https://github.com/phpstan/phpstan/issues/3512), [#&#8203;3525](https://github.com/phpstan/phpstan/issues/3525) - Updated GD's `image*` functions ([#&#8203;265](https://github.com/phpstan/phpstan-src/pull/265)), thanks [@&#8203;javajawa](https://github.com/javajawa)! - PDOStatement::fetchColumn can return an int ([#&#8203;266](https://github.com/phpstan/phpstan-src/pull/266)), thanks [@&#8203;anthonyryan1](https://github.com/anthonyryan1)! - XMLReader::expand may return false on error ([#&#8203;273](https://github.com/phpstan/phpstan-src/pull/273)), thanks [@&#8203;taavit](https://github.com/taavit)! - SQLite3Stmt::execute to return false ([#&#8203;275](https://github.com/phpstan/phpstan-src/pull/275)), thanks [@&#8203;colinmo](https://github.com/colinmo)! - mime_content_type can receive a stream too ([#&#8203;276](https://github.com/phpstan/phpstan-src/pull/276)), thanks [@&#8203;gnutix](https://github.com/gnutix)! - Fix date_time_set function signature ([#&#8203;280](https://github.com/phpstan/phpstan-src/pull/280)), thanks [@&#8203;olivierchabert](https://github.com/olivierchabert)! ### [`v0.12.32`](https://github.com/phpstan/phpstan/releases/tag/0.12.32) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.31...0.12.32) # Improvements 🔧 - **Make GithubErrorFormatter the default when running in GitHub Actions** (https://github.com/phpstan/phpstan-src/commit/6fd85e3b7dae790061b278852b1b34a17e3679c6) - If you're currently running PHPStan with `--error-format checkstyle | cs2pr`, you can omit this part from your build script! - You can override this behaviour by running with `--error-format table`. - Error formatter `github` for GitHub Actions ([#&#8203;261](https://github.com/phpstan/phpstan-src/pull/261)), thanks [@&#8203;Quetzacoalt91](https://github.com/Quetzacoalt91)! # Bleeding edge 🔪 - Check leading and trailing file whitespace and BOM (https://github.com/phpstan/phpstan-src/commit/6905d66cf4256eae48ae997b88fbbc58e0ad2ae8) *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.* # Bugfixes 🐛 - Fix handling unpacked argument with constant arrays (https://github.com/phpstan/phpstan-src/commit/a21012d142b476ec5a59366319c098bb8dc40afd), [#&#8203;3481](https://github.com/phpstan/phpstan/issues/3481) ### [`v0.12.31`](https://github.com/phpstan/phpstan/releases/tag/0.12.31) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.30...0.12.31) # Bugfixes 🐛 - Subclasses of PDO are analysed using static reflection (https://github.com/phpstan/phpstan-src/commit/8390949321d55448a1a3592f6089137929252abf), [#&#8203;3527](https://github.com/phpstan/phpstan/issues/3527) - Fix problems related to conditional declarations of classes - [#&#8203;3522](https://github.com/phpstan/phpstan/issues/3522) - Dive into a trait that starts on the same line as the one in the reflection (https://github.com/phpstan/phpstan-src/commit/e6dd87bd194abcb9e49059bc7cf86ab7cf4e0366), [#&#8203;3460](https://github.com/phpstan/phpstan/issues/3460) # Function signature fixes 🤖 - `ZipArchive::open()` returns true on success, int (error code) on failure ([#&#8203;253](https://github.com/phpstan/phpstan-src/pull/253)), thanks [@&#8203;dktapps](https://github.com/dktapps)! - `mysqli_stmt_fetch()` and `mysqli_stmt::fetch()` can return NULL ([#&#8203;255](https://github.com/phpstan/phpstan-src/pull/255)), thanks [@&#8203;morozov](https://github.com/morozov)! - `openssl_pkey_export()` allows null for the passphrase ([#&#8203;256](https://github.com/phpstan/phpstan-src/pull/256)), thanks [@&#8203;ConradSollitt](https://github.com/ConradSollitt)! - Fix `enchant_broker_list_dicts()` return type ([#&#8203;257](https://github.com/phpstan/phpstan-src/pull/257)), [#&#8203;3530](https://github.com/phpstan/phpstan/issues/3530), thanks [@&#8203;villfa](https://github.com/villfa)! - correct return value for PHP internal functions on failure ([#&#8203;258](https://github.com/phpstan/phpstan-src/pull/258)), thanks [@&#8203;peter-gribanov](https://github.com/peter-gribanov)! - Fix return type & callback type hints for Redis::subscribe() ([#&#8203;259](https://github.com/phpstan/phpstan-src/pull/259)), thanks [@&#8203;hollodotme](https://github.com/hollodotme)! ### [`v0.12.30`](https://github.com/phpstan/phpstan/releases/tag/0.12.30) [Compare Source](https://github.com/phpstan/phpstan/compare/0.12.29...0.12.30) # Improvements 🔧 - Enhancements for analysis of view files implemented in plain PHP ([#&#8203;351](https://github.com/phpstan/phpstan/issues/351)) - All variables including `$this` in the root scope are always "maybe-defined" which means they won't be reported on level 0 but on level 1 (https://github.com/phpstan/phpstan-src/commit/0613451c60bbebf1db50bbea618f2fcd2e3f7c07, https://github.com/phpstan/phpstan-src/commit/14b17a8f05b5bba0377b0fbb4311d3c3c6cb44e7), [#&#8203;351](https://github.com/phpstan/phpstan/issues/351) - Variables in the root scope can be made always defined with inline `@var` PHPDoc (https://github.com/phpstan/phpstan-src/commit/44f9d08dd0c9c5ca3f88d484132fc3dfc25d056b) - Support multiple doc comments above statement (https://github.com/phpstan/phpstan-src/commit/428c8e594f6b2ac2706e79760964b0635f78bdbc) - Detect duplicate declarations of class constants, properties, and methods ([#&#8203;250](https://github.com/phpstan/phpstan-src/pull/250)), [#&#8203;3475](https://github.com/phpstan/phpstan/issues/3475), thanks [@&#8203;dktapps](https://github.com/dktapps)! - Support for BitwiseNot (`~`) operator ([#&#8203;249](https://github.com/phpstan/phpstan-src/pull/249)), thanks [@&#8203;dktapps](https://github.com/dktapps)! # Bugfixes 🐛 - Classes that extend ext-dom classes are always analysed using static reflection ([#&#8203;242](https://github.com/phpstan/phpstan-src/pull/242)), [#&#8203;3477](https://github.com/phpstan/phpstan/issues/3477), thanks [@&#8203;schlessera](https://github.com/schlessera)! - Look at `install-path` from `installed.json` available in Composer v2 (https://github.com/phpstan/phpstan-src/commit/4cf01410bbafed980ab47f8cbd0e2d1eb3864328), [#&#8203;3426](https://github.com/phpstan/phpstan/issues/3426) - Skip files from broken Composer installations (https://github.com/phpstan/phpstan-src/commit/d1990b804a997af97573dcb9172832b53592a407), [#&#8203;3426](https://github.com/phpstan/phpstan/issues/3426) - Fix DOMDocument child class contravariance check (https://github.com/phpstan/phpstan-src/commit/09f0bebde608fe7976eaef6a40f543de8464a8a4), [#&#8203;3478](https://github.com/phpstan/phpstan/issues/3478) # Function signature fixes 🤖 - Update jetbrains/phpstorm-stubs (solves [#&#8203;3492](https://github.com/phpstan/phpstan/issues/3492), [#&#8203;3482](https://github.com/phpstan/phpstan/issues/3482), [#&#8203;3480](https://github.com/phpstan/phpstan/issues/3480)) - dbase-ext: DB-handle changed from int to resource ([#&#8203;246](https://github.com/phpstan/phpstan-src/pull/246)), thanks [@&#8203;swen100](https://github.com/swen100)! - `dbase_open` and `dbase_create` can also return false ([#&#8203;246](https://github.com/phpstan/phpstan-src/pull/246)), thanks [@&#8203;swen100](https://github.com/swen100)! - functionMap: narrow possible return values of openssl_verify() ([#&#8203;250](https://github.com/phpstan/phpstan-src/pull/250)), thanks [@&#8203;dktapps](https://github.com/dktapps)! - Loosen the requirements for the $function parameter of the register_shutdown_function function ([#&#8203;240](https://github.com/phpstan/phpstan-src/pull/240)), thanks [@&#8203;ste93cry](https://github.com/ste93cry)! </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xODUuOCIsInVwZGF0ZWRJblZlciI6IjM5LjE4NS44IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
chore(deps): update dependency phpstan/phpstan to v0.12.100
Some checks failed
renovate/artifacts Artifact file update failure
3b9750e533
renovate-bot force-pushed renovate/phpstan-packages from 3b9750e533 to deab626dba 2025-03-12 12:08:39 +00:00 Compare
kumi merged commit 6804801f2c into main 2025-03-12 12:10:27 +00:00
kumi deleted branch renovate/phpstan-packages 2025-03-12 12:10:28 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: kumi/alltube-library#2
No description provided.