phpstan / extension-installer

Composer plugin for automatic installation of PHPStan extensions.
MIT License
410 stars 27 forks source link

fix(deps): update dependency phpstan/phpstan to v1 - autoclosed #53

Closed renovate[bot] closed 2 years ago

renovate[bot] commented 2 years ago

WhiteSource Renovate

This PR contains the following updates:

Package Type Update Change
phpstan/phpstan require major ^0.12.62 -> ^1.0.0

Release Notes

phpstan/phpstan ### [`v1.4.4`](https://togithub.com/phpstan/phpstan/releases/1.4.4) [Compare Source](https://togithub.com/phpstan/phpstan/compare/1.4.3...1.4.4) # Improvements πŸ”§ - Return type extension for `array_column()` ([#​948](https://togithub.com/phpstan/phpstan-src/pull/948)), thanks [@​jlherren](https://togithub.com/jlherren)! - Generic stub for `DatePeriod` + constructor dynamic return type extension ([#​958](https://togithub.com/phpstan/phpstan-src/pull/958)), [#​5953](https://togithub.com/phpstan/phpstan/issues/5953), thanks [@​Alban-io](https://togithub.com/Alban-io)! - Resolve remaining predefined constants ([#​693](https://togithub.com/phpstan/phpstan-src/pull/693)), thanks [@​herndlm](https://togithub.com/herndlm)! # Bugfixes πŸ› - Support all `array_filter()` flags for narrowing down types ([#​941](https://togithub.com/phpstan/phpstan-src/pull/941)), thanks [@​herndlm](https://togithub.com/herndlm)! - Fix error The supplied range exceeds the maximum array size ([#​934](https://togithub.com/phpstan/phpstan-src/pull/934)), [#​6375](https://togithub.com/phpstan/phpstan/issues/6375), thanks [@​voku](https://togithub.com/voku)! - Nullable union template type bound is actually supported (https://github.com/phpstan/phpstan-src/commit/1d8b2eb269b1de8c449b372580852c2a6307c323), [#​4656](https://togithub.com/phpstan/phpstan/issues/4656), [#​5305](https://togithub.com/phpstan/phpstan/issues/5305), [#​3384](https://togithub.com/phpstan/phpstan/issues/3384) - Fix reporting nonexistent offset in `isset()` (https://github.com/phpstan/phpstan-src/commit/f05e8eb8fe3d979afa9e627371f4df92ab28fadf), [#​4926](https://togithub.com/phpstan/phpstan/issues/4926) - Fix interaction between template type and intersection type ([#​955](https://togithub.com/phpstan/phpstan-src/pull/955)), [#​6210](https://togithub.com/phpstan/phpstan/issues/6210), thanks [@​arnaud-lb](https://togithub.com/arnaud-lb)! - Fix tests on 32-bit ([#​957](https://togithub.com/phpstan/phpstan-src/pull/957)), thanks [@​herndlm](https://togithub.com/herndlm)! - Fix resolving type of `isset()`, `empty()` and null coalesce operator (`??`) (https://github.com/phpstan/phpstan-src/commit/3b17acc5de4ac507d678f9ca9b2cd15937921ffb), [#​4592](https://togithub.com/phpstan/phpstan/issues/4592), [#​4903](https://togithub.com/phpstan/phpstan/issues/4903), [#​2420](https://togithub.com/phpstan/phpstan/issues/2420), [#​2718](https://togithub.com/phpstan/phpstan/issues/2718), [#​3126](https://togithub.com/phpstan/phpstan/issues/3126), [#​4586](https://togithub.com/phpstan/phpstan/issues/4586), [#​4887](https://togithub.com/phpstan/phpstan/issues/4887) # Function signature fixes πŸ€– - Narrow down the return type of the `Throwable::getTrace()` method ([#​914](https://togithub.com/phpstan/phpstan-src/pull/914)), thanks [@​ste93cry](https://togithub.com/ste93cry)! - Fix DOMDocument::saveXML signature ([#​956](https://togithub.com/phpstan/phpstan-src/pull/956)), thanks [@​kissifrot](https://togithub.com/kissifrot)! ### [`v1.4.3`](https://togithub.com/phpstan/phpstan/releases/1.4.3) [Compare Source](https://togithub.com/phpstan/phpstan/compare/1.4.2...1.4.3) # Improvements πŸ”§ - Support for `--memory-limit` CLI option in `clear-result-cache` command (https://github.com/phpstan/phpstan-src/commit/156700b5152ada253edba34b39cda955729e97a8), [#​6432](https://togithub.com/phpstan/phpstan/issues/6432) - Pass verbosity to workers and show stack trace on error ([#​935](https://togithub.com/phpstan/phpstan-src/pull/935)), thanks [@​benja-M-1](https://togithub.com/benja-M-1)! - Move collecting errors from error handler from Analyser to FileAnalyser to be used in parallel runs too (https://github.com/phpstan/phpstan-src/commit/7dd699f9461704a8ef2f4505f1dec534f13e7ccd) - Use memory limit management trick from Laravel instead of the current `.memory_limit` file (https://github.com/phpstan/phpstan-src/commit/daf7d5577bd8c796509768eb6a8d2862b6027a53), https://twitter.com/timacdonald87/status/1484804225658146823 # Bugfixes πŸ› - Fix unset() on intersection with hasOffset (https://github.com/phpstan/phpstan-src/commit/b43c057d2d34448b421cd879320974f393d992ac), [#​6399](https://togithub.com/phpstan/phpstan/issues/6399), [#​4357](https://togithub.com/phpstan/phpstan/issues/4357) - ConstantStringType - catch Error in setOffsetValueType (https://github.com/phpstan/phpstan-src/commit/54f67c5252fe1a4eff30703875b734111ab46e5a), [#​6231](https://togithub.com/phpstan/phpstan/issues/6231) - Fix reflection error for the attribute `#[ReturnTypeWillChange]` on PHP 7.1-7.4 (https://github.com/ondrejmirtes/BetterReflection/commit/bf362441dceecd766dbd54bd470c7b4c333e4c13, https://github.com/phpstan/phpstan-src/commit/639a055975fceffe94902fee9d90bff88ec11cf0), [#​6414](https://togithub.com/phpstan/phpstan/issues/6414) - Fix `array_filter` with callback that always evaluates to false ([#​939](https://togithub.com/phpstan/phpstan-src/pull/939)), thanks [@​herndlm](https://togithub.com/herndlm)! - Fix iterable key and value type - prefer generic type variables instead of key()/current() typehints (https://github.com/phpstan/phpstan-src/commit/a2acf64f793976a21f22babbfc27318a60fea4fa), [#​5817](https://togithub.com/phpstan/phpstan/issues/5817) - Fix trait detection recursion for anonymous classes ([#​946](https://togithub.com/phpstan/phpstan-src/pull/946)), thanks [@​herndlm](https://togithub.com/herndlm)! - Fix internal error with a big number in for loop condition (https://github.com/phpstan/phpstan-src/commit/f1734dc5318d1777c7ae6e77d4d3777182e845aa), [#​6466](https://togithub.com/phpstan/phpstan/issues/6466) # Function signature fixes πŸ€– - Add missing `Ds\Set::reduce()` to stubs ([#​942](https://togithub.com/phpstan/phpstan-src/pull/942)), thanks [@​ZebulanStanphill](https://togithub.com/ZebulanStanphill)! - Refine `*strlen()` return type to exclude negative integers ([#​945](https://togithub.com/phpstan/phpstan-src/pull/945)), thanks [@​staabm](https://togithub.com/staabm)! - Bugfix `DatePeriod::getEndDate` declaration ([#​951](https://togithub.com/phpstan/phpstan-src/pull/951)), thanks [@​nyamsprod](https://togithub.com/nyamsprod)! ### [`v1.4.2`](https://togithub.com/phpstan/phpstan/releases/1.4.2) [Compare Source](https://togithub.com/phpstan/phpstan/compare/1.4.1...1.4.2) - CleaningParser - remove conditional code by `PHP_VERSION_ID` (https://github.com/phpstan/phpstan-src/commit/433511a3eb526b0a340277aeb48ff20f292922d1), [#​6386](https://togithub.com/phpstan/phpstan/issues/6386), [https://github.com/api-platform/core/issues/4614](https://togithub.com/api-platform/core/issues/4614), [https://github.com/api-platform/api-platform/issues/2101](https://togithub.com/api-platform/api-platform/issues/2101) - Enums will no longer crash the playground (https://github.com/phpstan/phpstan-src/commit/121e0212db869fe0c42307a1485f27054d492041) - Fix `ObjectType::equals()` when compared to `EnumCaseObjectType` (https://github.com/phpstan/phpstan-src/commit/ab0245c49a16609da528d8e91dc5124b2c911ecb), [#​6394](https://togithub.com/phpstan/phpstan/issues/6394) - Fix calling method statically on string (https://github.com/phpstan/phpstan-src/commit/3aa878f2b22907b440055a714c605e8bb6e3de58), [#​6404](https://togithub.com/phpstan/phpstan/issues/6404) - Fix native type of variadic parameter (https://github.com/phpstan/phpstan-src/commit/a5447db695e55151c52d5cf67b489fceb7d51c43), [#​6393](https://togithub.com/phpstan/phpstan/issues/6393), [#​5698](https://togithub.com/phpstan/phpstan/issues/5698) - Update PhpStorm stubs ([#​930](https://togithub.com/phpstan/phpstan-src/pull/930)) ### [`v1.4.1`](https://togithub.com/phpstan/phpstan/releases/1.4.1) [Compare Source](https://togithub.com/phpstan/phpstan/compare/1.4.0...1.4.1) # Improvements πŸ”§ - TypeSpecifier - understand `==` operator for the same types on both sides (https://github.com/phpstan/phpstan-src/commit/e40eff0a8e34ceae776e38d48a31efbe67ea399a), [#​6370](https://togithub.com/phpstan/phpstan/issues/6370), [#​4413](https://togithub.com/phpstan/phpstan/issues/4413) - Add `ClassReflection::getBackedEnumType()` method (https://github.com/phpstan/phpstan-src/commit/a0ed2d304e0344df34b49e010d5f491f0d321d3a) - Achieve `BenevolentUnionType` return type without dynamic return type extension (https://github.com/phpstan/phpstan-src/commit/723dfc51eab190ff940d0b0130b9986eb1b5d36a), [https://github.com/phpstan/phpstan/discussions/6391](https://togithub.com/phpstan/phpstan/discussions/6391) # Bugfixes πŸ› - Allow readonly property write in `__unserialize` ([#​929](https://togithub.com/phpstan/phpstan-src/pull/929)), thanks [@​ruudk](https://togithub.com/ruudk)! - Fix missing properties on `UnitEnum` and `BackedEnum` (https://github.com/phpstan/phpstan-src/commit/67d3a882a85e53f36158e60a8cb30e997aca293c), [#​6385](https://togithub.com/phpstan/phpstan/issues/6385) - `ConstantArrayTypeBuilder` - fix for potential performance problems (https://github.com/phpstan/phpstan-src/commit/86b93068ae863a0377118dfe93c3b1286a8673b7), [#​6375](https://togithub.com/phpstan/phpstan/issues/6375) # Function signature fixes πŸ€– - Add missing `Set::map()` method to functionMap ([#​923](https://togithub.com/phpstan/phpstan-src/pull/923)), thanks [@​simPod](https://togithub.com/simPod)! - `gnupg_verify()` accepts false fot its signature param ([#​925](https://togithub.com/phpstan/phpstan-src/pull/925)), thanks [@​spaze](https://togithub.com/spaze)! - Improve signature of `random_bytes()` ([#​926](https://togithub.com/phpstan/phpstan-src/pull/926)), thanks [@​staabm](https://togithub.com/staabm)! - More precise `count_chars()` mode-param ([#​927](https://togithub.com/phpstan/phpstan-src/pull/927)), thanks [@​staabm](https://togithub.com/staabm)! - More precise `getdate()` return type ([#​928](https://togithub.com/phpstan/phpstan-src/pull/928)), thanks [@​staabm](https://togithub.com/staabm)! ### [`v1.4.0`](https://togithub.com/phpstan/phpstan/releases/1.4.0) [Compare Source](https://togithub.com/phpstan/phpstan/compare/1.3.3...1.4.0) **This release fixes 25 issues! πŸŽ‰** # Major new features πŸš€ - Support for PHP 8.1 `readonly` properties ([RFC](https://wiki.php.net/rfc/readonly_properties_v2)) - Readonly properties must be assigned in the constructor of the declaring class - Memoized type of a readonly property is not invalidated even when calling a method with side effects - Readonly properties cannot be passed by reference - Improved detection of incorrect types assigned to properties: - [#​5804](https://togithub.com/phpstan/phpstan/issues/5804), [#​6333](https://togithub.com/phpstan/phpstan/issues/6333), [#​4906](https://togithub.com/phpstan/phpstan/issues/4906), [#​4165](https://togithub.com/phpstan/phpstan/issues/4165), [#​3703](https://togithub.com/phpstan/phpstan/issues/3703) # Improvements πŸ”§ - `ParametersAcceptorSelector` - message for `ShouldNotHappenException` (https://github.com/phpstan/phpstan-src/commit/d3c34832c7e27ee068cef99c437add30cce5ad23), [#​6328](https://togithub.com/phpstan/phpstan/issues/6328) - Constructor of `BenevolentUnionType` is covered by BC promise (https://github.com/phpstan/phpstan-src/commit/8f28dc8453f0da1f1476fe2f732e7be3f209d726) # Bugfixes πŸ› - Fix PHPDocs with `require` statement (https://github.com/phpstan/phpstan-src/commit/b5a2c8f2b5f0b87c09f87a1457610212e688d6e2), [#​6348](https://togithub.com/phpstan/phpstan/issues/6348) - Fix inferring template types in `ClosureType` ([#​921](https://togithub.com/phpstan/phpstan-src/pull/921)), thanks [@​canvural](https://togithub.com/canvural)! - Fix `random_int()` without args crash (https://github.com/phpstan/phpstan-src/commit/6d7ba0f0db550df34aac51af3a0f8f13e710ca0c), [#​6361](https://togithub.com/phpstan/phpstan/issues/6361) Thanks to some internal refactorings listed below, the following issues have been fixed: [#​5337](https://togithub.com/phpstan/phpstan/issues/5337), [#​4910](https://togithub.com/phpstan/phpstan/issues/4910), [#​5316](https://togithub.com/phpstan/phpstan/issues/5316), [#​5607](https://togithub.com/phpstan/phpstan/issues/5607), [#​3766](https://togithub.com/phpstan/phpstan/issues/3766), [#​3858](https://togithub.com/phpstan/phpstan/issues/3858), [#​3310](https://togithub.com/phpstan/phpstan/issues/3310), [#​3264](https://togithub.com/phpstan/phpstan/issues/3264), [#​2806](https://togithub.com/phpstan/phpstan/issues/2806), [#​5328](https://togithub.com/phpstan/phpstan/issues/5328), [#​3044](https://togithub.com/phpstan/phpstan/issues/3044), [#​6184](https://togithub.com/phpstan/phpstan/issues/6184), [#​3339](https://togithub.com/phpstan/phpstan/issues/3339), [#​5656](https://togithub.com/phpstan/phpstan/issues/5656), [#​5362](https://togithub.com/phpstan/phpstan/issues/5362), [#​3867](https://togithub.com/phpstan/phpstan/issues/3867), [#​5707](https://togithub.com/phpstan/phpstan/issues/5707) - Fix scope after for-loop (https://github.com/phpstan/phpstan-src/commit/4fb1a77b02415356c98fd86323cdc19495b652dd) - Improve preserving `ConstantArrayType` after setting new offset (https://github.com/phpstan/phpstan-src/commit/ec117fa2aec96ea1aef1190c3decb9d945219e21) - `ConstantArrayTypeBuilder` - preserve `ConstantArrayType` for integer range offsets (https://github.com/phpstan/phpstan-src/commit/3eab4628f2f031456eb320b43f9c722ab419d370) - Fix generalizing `ConstantIntegerType` in Scope (https://github.com/phpstan/phpstan-src/commit/d6c7595ba5ee9ea6ff137082fe3a59d8803962ae) - Scope generalization for integer range types (https://github.com/phpstan/phpstan-src/commit/36513388a628fac652f5d9cc5db8c6cdf21a175e) # Function signature fixes πŸ€– - Changed signature of `gmp_div` ([#​915](https://togithub.com/phpstan/phpstan-src/pull/915)), thanks [@​danielmarschall](https://togithub.com/danielmarschall)! - `PDO::prepare()` might return `false` ([#​916](https://togithub.com/phpstan/phpstan-src/pull/916), https://github.com/phpstan/phpstan-src/commit/a9881e3afd4a105f0bd1391fb57a8e5c3462d2bc), thanks [@​staabm](https://togithub.com/staabm)! - More precise `preg_match*` return type signatures ([#​918](https://togithub.com/phpstan/phpstan-src/pull/918)), thanks [@​staabm](https://togithub.com/staabm)! ### [`v1.3.3`](https://togithub.com/phpstan/phpstan/releases/1.3.3) [Compare Source](https://togithub.com/phpstan/phpstan/compare/1.3.2...1.3.3) # Improvements πŸ”§ - ThrowableReturnTypeExtension honors `@method` tag for `getCode()` method above child Exception classes (https://github.com/phpstan/phpstan-src/commit/e04cc8dfb8f6b3a2c4ac399232a6691baed1d162) - Development repository [`phpstan/phpstan-src`](https://togithub.com/phpstan/phpstan-src) now uses promoted properties ([https://github.com/phpstan/phpstan-src/pull/910](https://togithub.com/phpstan/phpstan-src/pull/910)) ### [`v1.3.2`](https://togithub.com/phpstan/phpstan/releases/1.3.2) [Compare Source](https://togithub.com/phpstan/phpstan/compare/1.3.1...1.3.2) # Improvements - Scope - Improved file description for traits used by anonymous classes (https://github.com/phpstan/phpstan-src/commit/10e46026885ba643d63513594682efd634bf6350), [#​6312](https://togithub.com/phpstan/phpstan/issues/6312) # Bugfixes πŸ› - Fix handling renamed trait method (https://github.com/phpstan/phpstan-src/commit/8498b01253f94f142554463aa23f2b842ee8f0c4), [#​6306](https://togithub.com/phpstan/phpstan/issues/6306) - Fix FileTypeMapper call in MethodTemplateTypeRule (https://github.com/phpstan/phpstan-src/commit/63838ee7c202d7b116a5d3dd57f9bb608fdb54fd) - Fix looking for PHPDocs in trait in anonymous class in trait (https://github.com/phpstan/phpstan-src/commit/11176c76aac5b7e15cc16d32e88ecc31cf6de64b), [#​6253](https://togithub.com/phpstan/phpstan/issues/6253) - Better progress bar visuals for CI environments (https://github.com/phpstan/phpstan-src/commit/0993d180e5a15a17631d525909356081be59ffeb), [#​6295](https://togithub.com/phpstan/phpstan/issues/6295) # Function signature fixes πŸ€– - These functions return `false` since PHP 5.4 ([#​907](https://togithub.com/phpstan/phpstan-src/pull/907)), thanks [@​johnbillion](https://togithub.com/johnbillion)! - Improve `Exception::getCode()` type (https://github.com/phpstan/phpstan-src/commit/11817175c9977a835d8a0dcc6f8edf2d87744b47) ### [`v1.3.1`](https://togithub.com/phpstan/phpstan/releases/1.3.1) [Compare Source](https://togithub.com/phpstan/phpstan/compare/1.3.0...1.3.1) # Bugfixes πŸ› - Fixed `mixed` type not considered nullable (https://github.com/phpstan/phpstan-src/commit/c0aad86b543c97ce00e012f0092c22fa96728f35), [#​6293](https://togithub.com/phpstan/phpstan/issues/6293), [#​6158](https://togithub.com/phpstan/phpstan/issues/6158) - Fix renamed trait method visibility (https://github.com/phpstan/phpstan-src/commit/fc5be6a991e355094a97c3b9cdc27ff39284f192), [#​6264](https://togithub.com/phpstan/phpstan/issues/6264) - Fix `PDO::pgsqlGetNotify()` call (https://github.com/phpstan/phpstan-src/commit/3624bbb2c47c997f2048cc490854e32bb7a77e92), [#​6255](https://togithub.com/phpstan/phpstan/issues/6255) - Fix PHPDocs in file with `#!` shebang (https://github.com/phpstan/phpstan-src/commit/c87284a8eafcea2fde391b69a29daa8f4a0adf37), [#​6252](https://togithub.com/phpstan/phpstan/issues/6252) - Fix infinite recursion in `@mixin` extensions (https://github.com/phpstan/phpstan-src/commit/9ab4e6fd8ef29d7bf7b0b729250e04f3dd5ad75d), [#​6300](https://togithub.com/phpstan/phpstan/issues/6300) # Function signature fixes πŸ€– - Fix return type of `SessionHandler::gc()` ([#​899](https://togithub.com/phpstan/phpstan-src/pull/899)), thanks [@​Khartir](https://togithub.com/Khartir)! - added `preg_quote` to NonEmptyStringFunctionsReturnTypeExtension ([#​881](https://togithub.com/phpstan/phpstan-src/pull/881)), thanks [@​staabm](https://togithub.com/staabm)! - Support non-empty-string type in string-replace functions ([#​879](https://togithub.com/phpstan/phpstan-src/pull/879)), thanks [@​staabm](https://togithub.com/staabm)! - uniqid() always returns a non-empty-string ([#​905](https://togithub.com/phpstan/phpstan-src/pull/905)), thanks [@​MidnightDesign](https://togithub.com/MidnightDesign)! ### [`v1.3.0`](https://togithub.com/phpstan/phpstan/releases/1.3.0) [Compare Source](https://togithub.com/phpstan/phpstan/compare/1.2.0...1.3.0) # Major new features πŸš€ - **Support for PHP 8.1 Enums** - [RFC](https://wiki.php.net/rfc/enumerations) - Thanks to [@​kukulich](https://togithub.com/kukulich) for custom Enum rules! - Upgraded [Roave/BetterReflection to 5.0.0](https://togithub.com/Roave/BetterReflection/releases/tag/5.0.0) - PHP 7.1+ is still supported because the dependency is downgraded automatically in [our own fork](https://togithub.com/ondrejmirtes/BetterReflection/tree/ng) - This brings plenty of bugfixes, for example PHP 8.0 Attributes can now be read in static reflection context - PHPStan now works when OPCache is enabled! - Thanks to this commit: https://github.com/phpstan/phpstan-src/commit/e30f4467ab8fa2421f7da6c3909061ab4d5ba743 - The development repository `phpstan/phpstan-src` is now PHP 8.0+ only, while the distribution package `phpstan/phpstan` still supports PHP 7.1+. - This is achieved thanks to automatic downgrade of source code using Rector during PHAR compilation - PHPStan now ships with Symfony PHP polyfills for PHP 7.2-8.0. # Improvements πŸ”§ - Update `nikic/php-parser` to 4.13.2 (https://github.com/phpstan/phpstan-src/commit/8939964ecfb44a01629c3f2747dbecbc6b273ea0) - Update to Symfony 5.4 ([#​863](https://togithub.com/phpstan/phpstan-src/pull/863)) - CLI option `--allow-empty-baseline` to allow generating empty baseline ([#​776](https://togithub.com/phpstan/phpstan-src/pull/776)), thanks [@​Lctrs](https://togithub.com/Lctrs)! - Support for `@phpstan-property`, `@phpstan-property-read`, and `@phpstan-property-write` ([#​775](https://togithub.com/phpstan/phpstan-src/pull/775)), thanks [@​mad-briller](https://togithub.com/mad-briller)! - Add support for the `key-of<...>` and `value-of<...>` types ([#​800](https://togithub.com/phpstan/phpstan-src/pull/800)), thanks [@​ste93cry](https://togithub.com/ste93cry)! - GithubErrorFormatter > Allow any `ErrorFormatter` ([#​854](https://togithub.com/phpstan/phpstan-src/pull/854)), thanks [@​ruudk](https://togithub.com/ruudk)! - Array unpacking support for string-keyed arrays ([#​803](https://togithub.com/phpstan/phpstan-src/pull/803)), thanks [@​canvural](https://togithub.com/canvural)! - Moved some classes from ClassBlacklistReflectionProvider to staticReflectionClassNamePatterns config so that they are in effect for ClassBlacklistSourceLocator too (https://github.com/phpstan/phpstan-src/commit/e40ba1569885ce70cdfea4d06abe429960589b31) - PHPStanTestCase: Added a helper method to assert no errors happend ([#​894](https://togithub.com/phpstan/phpstan-src/pull/894)), thanks [@​staabm](https://togithub.com/staabm)! # Bugfixes πŸ› - Resolve deprecated tag also from parents ([#​792](https://togithub.com/phpstan/phpstan-src/pull/792)), thanks [@​eiriksm](https://togithub.com/eiriksm)! - `echo` isn't callable either. ([#​777](https://togithub.com/phpstan/phpstan-src/pull/777)), thanks [@​johnbillion](https://togithub.com/johnbillion)! - Resolve object type by class const fetch in switch statement ([#​745](https://togithub.com/phpstan/phpstan-src/pull/745)), thanks [@​marmichalski](https://togithub.com/marmichalski)! - Allow also `$object::class` with Identical ([#​745](https://togithub.com/phpstan/phpstan-src/pull/745)), thanks [@​marmichalski](https://togithub.com/marmichalski)! - Fixed ErrorFormatter tests in terminals with console support ([#​805](https://togithub.com/phpstan/phpstan-src/pull/805)), thanks [@​kukulich](https://togithub.com/kukulich)! - Copy all environment variables when running PHPStan Pro (https://github.com/phpstan/phpstan-src/commit/e61ad9575a000b410efcf2824ef3a4c87083e1b6), [#​5433](https://togithub.com/phpstan/phpstan/issues/5433) - Allow destructuring of objects implementing ArrayAccess ([#​819](https://togithub.com/phpstan/phpstan-src/pull/819)), thanks [@​herndlm](https://togithub.com/herndlm)! - Spreading of general arrays should not lead to a non-empty-array ([#​818](https://togithub.com/phpstan/phpstan-src/pull/818)), thanks [@​herndlm](https://togithub.com/herndlm)! - Simplify FileTypeMapper (https://github.com/phpstan/phpstan-src/commit/256d11b8fe9f19924b9f4decc3451665fc8c2769) - Make FileTypeMapper more deterministic (https://github.com/phpstan/phpstan-src/commit/ae6dca5d4f485fde77a1b2c7eaca55fe2ec9b28a) - Fix normal vs. stub PHPDoc (https://github.com/phpstan/phpstan-src/commit/e9dd3a30339de34a3fe11092b3aa245216038953) - ReflectionAttribute is no longer final class (https://github.com/phpstan/phpstan-src/commit/97e153ce52148d94719e3af442aa7358f3a73d07) - ReflectionAttribute stub - IS_INSTANCEOF constant (https://github.com/phpstan/phpstan-src/commit/cfb6fad051a4419872b4de47db45c398c90be6e1) - DependencyResolver - cause autoloading less often when looking at literal arrays (https://github.com/phpstan/phpstan-src/commit/b927c87f585d314ba5a766203a32671186d612c5), [#​6187](https://togithub.com/phpstan/phpstan/issues/6187), [#​6096](https://togithub.com/phpstan/phpstan/issues/6096) - MemoizingReflectionProvider - cache `hasClass()` as case-sensitive (https://github.com/phpstan/phpstan-src/commit/792ce0af4b4bd59f8c5c4f67a28685922e0fff15), [#​6096](https://togithub.com/phpstan/phpstan/issues/6096) - XdebugHandler - setPersistent ([#​726](https://togithub.com/phpstan/phpstan-src/pull/726)), [#​5809](https://togithub.com/phpstan/phpstan/issues/5809), thanks [@​fsmoak](https://togithub.com/fsmoak)! - Simplify AutoloadSourceLocator - let it actually autoload the file (https://github.com/phpstan/phpstan-src/commit/e30f4467ab8fa2421f7da6c3909061ab4d5ba743) - AutoloadSourceLocator - filter classes by startLine only if there are multiple of them ([#​882](https://togithub.com/phpstan/phpstan-src/pull/882)) - ComposerJsonAndInstalledJsonSourceLocatorMaker - fix for autoload-dev section ([#​882](https://togithub.com/phpstan/phpstan-src/pull/882)) - TestCaseSourceLocatorFactory - skip invalid Composer locations ([#​882](https://togithub.com/phpstan/phpstan-src/pull/882)) - Fix ReturnTypeRule ([#​882](https://togithub.com/phpstan/phpstan-src/pull/882)) - Silent `@` operator should use `& $errno` check ([#​889](https://togithub.com/phpstan/phpstan-src/pull/889)), thanks [@​samsonasik](https://togithub.com/samsonasik)! - ClassTemplateTypeRule should not be executed for interfaces (https://github.com/phpstan/phpstan-src/commit/9adf6bff2e4a3564dfacb073f99d7638797c0a19) - MixinRule - check interfaces and enums (https://github.com/phpstan/phpstan-src/commit/8519cca4247f34ca201f38e16f57dd7aff275fe0) # Function signature fixes πŸ€– - Added DynamicReturnTypeExtension for `trigger_error` ([#​766](https://togithub.com/phpstan/phpstan-src/pull/766)), thanks [@​staabm](https://togithub.com/staabm)! - The array returned by `array_count_values()` can never contain a zero. ([#​773](https://togithub.com/phpstan/phpstan-src/pull/773)), thanks [@​johnbillion](https://togithub.com/johnbillion)! - Add ThrowableReturnTypeExtension ([#​795](https://togithub.com/phpstan/phpstan-src/pull/795)), thanks [@​herndlm](https://togithub.com/herndlm)! - Update functionMap for XSLTProcessor ([#​797](https://togithub.com/phpstan/phpstan-src/pull/797)), thanks [@​hbrecht](https://togithub.com/hbrecht)! - imap_delete / imap_undelete: correction ([#​799](https://togithub.com/phpstan/phpstan-src/pull/799)), thanks [@​hbrecht](https://togithub.com/hbrecht)! - Fix the signature of the value returned from the `date_parse` and `date_parse_from_format` functions ([#​807](https://togithub.com/phpstan/phpstan-src/pull/807)), thanks [@​ste93cry](https://togithub.com/ste93cry)! - Fix the signature of `get_resources()` ([#​837](https://togithub.com/phpstan/phpstan-src/pull/837)), thanks [@​MidnightDesign](https://togithub.com/MidnightDesign)! - Fix preg_filter function signature ([#​826](https://togithub.com/phpstan/phpstan-src/pull/826)), thanks [@​johnstevenson](https://togithub.com/johnstevenson)! - Fix ldap_set_rebind_proc signature ([#​851](https://togithub.com/phpstan/phpstan-src/pull/851)), thanks [@​villfa](https://togithub.com/villfa)! - `restore_error_handler` and `restore_exception_handler` always return boolean `true`. ([#​850](https://togithub.com/phpstan/phpstan-src/pull/850)), thanks [@​johnbillion](https://togithub.com/johnbillion)! - More specific return types for some `DateTimeZone` methods ([#​857](https://togithub.com/phpstan/phpstan-src/pull/857)), thanks [@​johnbillion](https://togithub.com/johnbillion)! - Add missing `Set::map()` method to `ext-ds` stub ([#​855](https://togithub.com/phpstan/phpstan-src/pull/855)), thanks [@​simPod](https://togithub.com/simPod)! - Support variable constant flags in `preg_split` (https://github.com/phpstan/phpstan-src/commit/a16c7aeac11f3072edc2d5f01dfef4e5442290d2), thanks [@​clxmstaab](https://togithub.com/clxmstaab)! ### [`v1.2.0`](https://togithub.com/phpstan/phpstan/releases/1.2.0) [Compare Source](https://togithub.com/phpstan/phpstan/compare/1.1.2...1.2.0) # Improvements πŸ”§ - Support for some features from PHP 8.1 - Support for `new` in initializers - [RFC](https://wiki.php.net/rfc/new_in_initializers) (https://github.com/phpstan/phpstan-src/commit/1a102fec28a2901927ce703a540fb82e47d17143) - Support for first-class callables - [RFC](https://wiki.php.net/rfc/first_class_callable_syntax) - Support for `array_is_list()` - [RFC](https://wiki.php.net/rfc/is_list) ([#​770](https://togithub.com/phpstan/phpstan-src/pull/770)), thanks [@​canvural](https://togithub.com/canvural)! - Support `literal-string` with encapsed strings ([#​768](https://togithub.com/phpstan/phpstan-src/pull/768)), thanks [@​craigfrancis](https://togithub.com/craigfrancis)! - Tips for always used properties and constants extensions (https://github.com/phpstan/phpstan-src/commit/2db3c268e26d44125aa728c917ba51ec400b46b3) - Autowire rules from the `rules` config section by their class name (https://github.com/phpstan/phpstan-src/commit/50cb90ddc6e6f6bdd248b7ea4bb5002193e808d6) # Bugfixes πŸ› - Type system: ConstantStringType created from `::class` is always considered a classname (https://github.com/phpstan/phpstan-src/commit/da34d3f1d642d71d5a5130d371bb243c65b0b195), [#​5979](https://togithub.com/phpstan/phpstan/issues/5979) - Do not run PHP bug workaround on PHP 8+ where it's fixed (https://github.com/phpstan/phpstan-src/commit/6573959829e3d07e1fa2a93845c973d47a12fdfd), [#​5954](https://togithub.com/phpstan/phpstan/issues/5954) - Promoted properties do not have a default value (https://github.com/phpstan/phpstan-src/commit/7c8e81dcf88378039ac57da459b4288b7e620a59), [#​5906](https://togithub.com/phpstan/phpstan/issues/5906) - CleaningParser - do not remove inline `@var` tags (https://github.com/phpstan/phpstan-src/commit/2652f2dc6c713ba2200df922a62fe651f2e4445e), [#​5921](https://togithub.com/phpstan/phpstan/issues/5921) - AttributesCheck - do not report named arguments in attributes (https://github.com/phpstan/phpstan-src/commit/6366066f3b28a5bdef0c6a3d533c291a8490e1f8), [#​5898](https://togithub.com/phpstan/phpstan/issues/5898) # Function signature fixes πŸ€– - functionMap - removed functions that are reserved keywords and separate AST nodes (https://github.com/phpstan/phpstan-src/commit/08f3e2d02329fa39561356c630d8d561631419d9), [#​6014](https://togithub.com/phpstan/phpstan/issues/6014) ### [`v1.1.2`](https://togithub.com/phpstan/phpstan/releases/1.1.2) [Compare Source](https://togithub.com/phpstan/phpstan/compare/1.1.1...1.1.2) # Bugfixes πŸ› - Properties are read when using AssignRef (`=&`) too (https://github.com/phpstan/phpstan-src/commit/74787be3fe520a72febf3b779f12e9ad9e471c85), [#​5935](https://togithub.com/phpstan/phpstan/issues/5935) - Fixed internal error with method attributes referencing `self::` (https://github.com/phpstan/phpstan-src/commit/b5e44f7936d54accf7c5f5e5df9941b884f5b779), [#​5951](https://togithub.com/phpstan/phpstan/issues/5951) - Fix stub namespaces in some extensions like `pecl_http` (https://github.com/ondrejmirtes/BetterReflection/commit/9f2b6eb6b8c17949bf82a46c34167504de0b0782, https://github.com/ondrejmirtes/BetterReflection/commit/bdd25238b192396e633d9ca07a25f2da724a9dc0), [#​5460](https://togithub.com/phpstan/phpstan/issues/5460), thanks [@​kukulich](https://togithub.com/kukulich)! - Do not attempt to clear old containers if the directory does not exist (https://github.com/phpstan/phpstan-src/commit/2427b83fc13d8151034ae57cc625e525897af748) # Function signature fixes πŸ€– - Mark file resource functions as having side effects ([#​698](https://togithub.com/phpstan/phpstan-src/pull/698)), thanks [@​jlherren](https://togithub.com/jlherren)! - Use positive integers for various time functions ([#​760](https://togithub.com/phpstan/phpstan-src/pull/760)), thanks [@​staabm](https://togithub.com/staabm)! ### [`v1.1.1`](https://togithub.com/phpstan/phpstan/releases/1.1.1) [Compare Source](https://togithub.com/phpstan/phpstan/compare/1.1.0...1.1.1) # Bugfixes πŸ› - Fixed `/** @​phpstan-ignore-line */` and `/** @​phpstan-ignore-next-line */` annotations sometimes not working because of AST (https://github.com/phpstan/phpstan-src/commit/9474696dff040ba6d5a9adadc8c87551074cbf94), [#​4750](https://togithub.com/phpstan/phpstan/issues/4750), [#​4759](https://togithub.com/phpstan/phpstan/issues/4759), [#​3834](https://togithub.com/phpstan/phpstan/issues/3834), [#​3563](https://togithub.com/phpstan/phpstan/issues/3563), [#​4250](https://togithub.com/phpstan/phpstan/issues/4250), [#​4798](https://togithub.com/phpstan/phpstan/issues/4798) - Do not report non-existent function after `function_exists()` check (https://github.com/phpstan/phpstan-src/commit/28e8c11a2bdf11eede53a152825fd3bd7733d95d), [#​3576](https://togithub.com/phpstan/phpstan/issues/3576) - Make `function_exists()` similar to `is_callable()` (https://github.com/phpstan/phpstan-src/commit/4a988637e67b6ff6854192c57adbbe3c32d62629), [#​1849](https://togithub.com/phpstan/phpstan/issues/1849) ### [`v1.1.0`](https://togithub.com/phpstan/phpstan/releases/1.1.0) [Compare Source](https://togithub.com/phpstan/phpstan/compare/1.0.2...1.1.0) # Improvements πŸ”§ - Update `nikic/php-parser` to 4.13.1 (https://github.com/phpstan/phpstan-src/commit/6a64c8aa95ebdd15832cf482d10e543cbe18ae35), [#​5458](https://togithub.com/phpstan/phpstan/issues/5458) - Update `jetbrains/phpstorm-stubs` (https://github.com/phpstan/phpstan-src/commit/546e87c61ff1b8591c7300d16484093870410a8c), [#​5833](https://togithub.com/phpstan/phpstan/issues/5833) - Support for `PhpStormStubsElementAvailable` attribute in `jetbrains/phpstorm-stubs` (https://github.com/phpstan/phpstan-src/commit/e41e66a1ecab998ed6e49376e6a5d0894c8ccc98) - Support for some features from PHP 8.1 - Support for native `never` return type - [RFC](https://wiki.php.net/rfc/noreturn_type) (https://github.com/phpstan/phpstan-src/commit/59be92fd7e736217185b075c99d2fca21a6393b1) - Support for native pure intersection types - [RFC](https://wiki.php.net/rfc/pure-intersection-types) (https://github.com/phpstan/phpstan-src/commit/be0555743559a43c183089417a390299a11b7a3b, https://github.com/phpstan/phpstan-src/commit/021e25ed2b6da96401ef754455ac5589db8eeda1), [#​5870](https://togithub.com/phpstan/phpstan/issues/5870) - Support for tentative return types - [RFC](https://wiki.php.net/rfc/internal_method_return_types) (https://github.com/phpstan/phpstan-src/commit/0e98150eff1d71de28c683a8de115c4efef83b8a, https://github.com/phpstan/phpstan-src/commit/762fc470a2b5308d4d0469457bac809e6ddc2196) - ReflectionEnum runtime stubs (PHP 8.0+) (https://github.com/phpstan/phpstan-src/commit/e3a0e0d1b968c4338d2a50d76562c49e49521565) - Full Enums support is coming in a later release # Bugfixes πŸ› - Fix chaining nullsafe operator ([#​752](https://togithub.com/phpstan/phpstan-src/pull/752)), [#​5868](https://togithub.com/phpstan/phpstan/issues/5868), thanks [@​olsavmic](https://togithub.com/olsavmic)! # Function signature fixes πŸ€– - Fix return type of `get_loaded_extensions()` ([#​754](https://togithub.com/phpstan/phpstan-src/pull/754)), thanks [@​dktapps](https://togithub.com/dktapps)! - `call_user_func_array()` support named arguments ([#​727](https://togithub.com/phpstan/phpstan-src/pull/727)), thanks [@​mglaman](https://togithub.com/mglaman)! - `phpversion()` does not return false when no arguments are given ([#​753](https://togithub.com/phpstan/phpstan-src/pull/753)), thanks [@​dktapps](https://togithub.com/dktapps)! ### [`v1.0.2`](https://togithub.com/phpstan/phpstan/releases/1.0.2) [Compare Source](https://togithub.com/phpstan/phpstan/compare/1.0.1...1.0.2) # Bugfixes πŸ› - Analyze `Composer` namespace only with static reflection, some classes in PHAR are unprefixed (https://github.com/phpstan/phpstan-src/commit/95754d1c52c99a9cfebfb595d58413955bbe61d4), [https://github.com/composer/composer/pull/10253](https://togithub.com/composer/composer/pull/10253) - ArrayType - use BenevolentUnionType even if it contains StrictMixedType (https://github.com/phpstan/phpstan-src/commit/c59330c539a5cabba7a1c06a7f468d0c3a7dcfa7), [#​5834](https://togithub.com/phpstan/phpstan/issues/5834), [#​5881](https://togithub.com/phpstan/phpstan/issues/5881), [#​5872](https://togithub.com/phpstan/phpstan/issues/5872), [#​5861](https://togithub.com/phpstan/phpstan/issues/5861) - This fixes "expects array, array given" errors # Function signature fixes πŸ€– - Unified the name of the second `array_map` parameter (https://github.com/phpstan/phpstan-src/commit/94333459e3fc2cfdd2800437e2bb336bb46d304f) - More precise `connection_aborted()` signature ([#​715](https://togithub.com/phpstan/phpstan-src/pull/715)), thanks [@​staabm](https://togithub.com/staabm)! - More precise `str_split()` signature ([#​718](https://togithub.com/phpstan/phpstan-src/pull/718)), thanks [@​staabm](https://togithub.com/staabm)! - `DateFunctionReturnTypeExtension`: support more precise single-char date-formats ([#​721](https://togithub.com/phpstan/phpstan-src/pull/721)), thanks [@​staabm](https://togithub.com/staabm)! - Support `$preserve_keys` argument for `iterator_to_array()` ([#​748](https://togithub.com/phpstan/phpstan-src/pull/748)), thanks [@​Lctrs](https://togithub.com/Lctrs)! ### [`v1.0.1`](https://togithub.com/phpstan/phpstan/releases/1.0.1) [Compare Source](https://togithub.com/phpstan/phpstan/compare/1.0.0...1.0.1) - Fixed "Expected node type PhpParser\Node\Stmt\Property, NULL occurred" (https://github.com/phpstan/phpstan-src/commit/e5f8e72c41692014f1352c411e81e605b694fabe), [#​5875](https://togithub.com/phpstan/phpstan/issues/5875) - `DerivativeContainerFactory` - pass all arguments to the derived container (https://github.com/phpstan/phpstan-src/commit/f28c7e9d06f65fff2ebcb954a581989078929a90) - `PhpStanNamespaceIn3rdPartyPackageRule` - fix segfault when there's no composer.json (https://github.com/phpstan/phpstan-src/commit/d4efedbd50af2317b18a2628cbadac40d66eed6d) ### [`v1.0.0`](https://togithub.com/phpstan/phpstan/releases/1.0.0) [Compare Source](https://togithub.com/phpstan/phpstan/compare/0.12.99...1.0.0) **PHPStan 1.0 is here** and I'm really excited about it! [Read the accompanying article](https://phpstan.org/blog/phpstan-1-0-released) on PHPStan's blog and also [check out the merchandise](https://phpstan.org/merch) we're selling for limited time (until November 22nd). It includes white and blue PHPStan t-shirts, PHPStan stickers, and also something very special: Rule level badges that you can pin to your clothes to show off that you care about code quality 😊 White and blue PHPStan T-shirts # Major new features πŸš€ - Level 9 with checkExplicitMixed (https://github.com/phpstan/phpstan-src/commit/e5bbb52fbc9139502f231999173ba6412e62587d) - 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: [#​2420](https://togithub.com/phpstan/phpstan/issues/2420), [#​4588](https://togithub.com/phpstan/phpstan/issues/4588), [#​3553](https://togithub.com/phpstan/phpstan/issues/3553), [#​3382](https://togithub.com/phpstan/phpstan/issues/3382), [#​4177](https://togithub.com/phpstan/phpstan/issues/4177), [#​4091](https://togithub.com/phpstan/phpstan/issues/4091), [#​2288](https://togithub.com/phpstan/phpstan/issues/2288), [#​1157](https://togithub.com/phpstan/phpstan/issues/1157) - Precise try-catch-finally analysis (https://github.com/phpstan/phpstan-src/commit/4588e73dd618e1077bfe1cec7b8e62e251d5eb95) - [Learn more on PHPStan's blog](https://phpstan.org/blog/precise-try-catch-finally-analysis) - Validate overriding methods in stubs (https://github.com/phpstan/phpstan-src/commit/c98d0a4946c373543c379427983e02ccef71f86c) - Nicer type descriptions usable in PHPDocs (https://github.com/phpstan/phpstan-src/commit/03341cc6bf010faf1e99f1dbddf5cea66d56e3cf, https://github.com/phpstan/phpstan-src/commit/51d7431dbe802827bac61907d7bcb58a168dff81) **New rules** - Level 0 - Check leading and trailing file whitespace and BOM (https://github.com/phpstan/phpstan-src/commit/6905d66cf4256eae48ae997b88fbbc58e0ad2ae8) - Check overriding constants (https://github.com/phpstan/phpstan-src/commit/89acb0db4400c95b231ae74830e8607d72824cbc) - Check classes extending `@final` classes (https://github.com/phpstan/phpstan-src/commit/dffd2c2351e5fc5d22b752bf3b8be84bf1708f71), [https://github.com/phpstan/phpstan/discussions/5343](https://togithub.com/phpstan/phpstan/discussions/5343) - Check that function-scoped template type is in a parameter (https://github.com/phpstan/phpstan-src/commit/18bdd34a808763764ea281d4f1b62fc0e7968873) - Check overriding properties (https://github.com/phpstan/phpstan-src/commit/0f4885aa101e0cc49f906e72990e356bd281ec63), [#​4281](https://togithub.com/phpstan/phpstan/issues/4281) - Level 1 - Rule for checking null-coalescing `??` operator issues ([#​36](https://togithub.com/phpstan/phpstan-src/pull/36)), thanks [@​leongersen](https://togithub.com/leongersen)! - Level 2 - Detect wrong usage of `@var` PHPDoc tag (https://github.com/phpstan/phpstan-src/commit/58860536dcc60bfc86c29ad67711ed1b19046cb0) - Rules for accessing private class elements through `static::` (https://github.com/phpstan/phpstan-src/commit/d8e89538ac84236cb3c40ea85b524e4f7cc30852, https://github.com/phpstan/phpstan-src/commit/bad2607a032787d822a1a8f91d5176455eac8693, https://github.com/phpstan/phpstan-src/commit/270326a1ed22398a98b15880e12a3b8015a83c4a) - Class constants - incompatible PHPDoc types (https://github.com/phpstan/phpstan-src/commit/780a54cd0149d8cb5a62bb1ef6fa2b0871114ee5) - Cross-check generic interface implementations (https://github.com/phpstan/phpstan-src/commit/284af50d76210a449f210699732171ecacf3307f), [#​5222](https://togithub.com/phpstan/phpstan/issues/5222) - Level 3 - Check that function with `@throws void` does not have an explicit throw point (https://github.com/phpstan/phpstan-src/commit/8b3382aceac801b9801fccda253033d8e8e5f655) - Check array deconstruction (https://github.com/phpstan/phpstan-src/commit/aae34d935081a8f8d34f5bd9bdf50ebdfdb85a7e), [#​3267](https://togithub.com/phpstan/phpstan/issues/3267) - Level 4 - Detect unused and write-only/read-only private properties, methods, and constants - [Read more on the PHPStan's blog](http://phpstan.org/blog/detecting-unused-private-properties-methods-constants) - Rule for checking additional issues like always-defined/never-defined properties, array offsets etc. in `isset()` (https://github.com/phpstan/phpstan-src/commit/25b61d974f5ca1cb00d7d2be4dce750553787b87) - `empty()` rule (https://github.com/phpstan/phpstan-src/commit/601460ccecfd72888d96e9c53d21cc3a8b66c719), [#​970](https://togithub.com/phpstan/phpstan/issues/970) - While loop - detect always true and always false conditions (https://github.com/phpstan/phpstan-src/commit/217fac309862f82485f8b756f09665192235aa13, https://github.com/phpstan/phpstan-src/commit/fb3f83e8f601b31a6eb5a12d58211dfced629821) - Do-while loop - detect always true and always false conditions (https://github.com/phpstan/phpstan-src/commit/e81ccd40a4872bde4f6578919b93b4d821021557) - Report dead catch with exception that is not thrown in the try block (https://github.com/phpstan/phpstan-src/commit/ce9299c0e9ab55fc63d7a2e0814c99cc221cb514) - Rule for detecting overwriting exit points in finally (https://github.com/phpstan/phpstan-src/commit/3f712be7c4a840fcae3bb8d3ebfa888ead4e964e) - Level 5 - Check callable parameter types for `array_map()` and `array_filter()` calls ([#​555](https://togithub.com/phpstan/phpstan-src/pull/555)), [#​5609](https://togithub.com/phpstan/phpstan/issues/5609), [#​5356](https://togithub.com/phpstan/phpstan/issues/5356), [#​1954](https://togithub.com/phpstan/phpstan/issues/1954), thanks [@​BackEndTea](https://togithub.com/BackEndTea)! - `implode()` function rule ([#​679](https://togithub.com/phpstan/phpstan-src/pull/679)), thanks [@​staabm](https://togithub.com/staabm)! - Check `DateTime` instantiation ([#​380](https://togithub.com/phpstan/phpstan-src/pull/380)), thanks [@​b1rdex](https://togithub.com/b1rdex)! - `random_int()` dynamic return type extension and parameters rule ([#​99](https://togithub.com/phpstan/phpstan-src/pull/99)), thanks [@​cs278](https://togithub.com/cs278)! - Level 6 - Detect unresolvable return type after generic function call (https://github.com/phpstan/phpstan-src/commit/9070c5bce39105a186d03e3e5b6871c2b5d28550), [#​2581](https://togithub.com/phpstan/phpstan/issues/2581) - Inspect types for missing typehints recursively (https://github.com/phpstan/phpstan-src/commit/2f456b91bbbc8c376ad4e5866fc7a7b457710eab), [#​5148](https://togithub.com/phpstan/phpstan/issues/5148) # BC breaks for end-users - Level `max` is now level 9. Feel free to update `max` to `8` if your code isn't ready. - Description of some types was updated to match the syntax in PHPDocs. This includes `numeric-string` (it was previously described as `string&numeric`), and also [array shapes](https://phpstan.org/writing-php-code/phpdoc-types#array-shapes). - Removed `baselineNeon` error formatter, use `--generate-baseline` CLI option instead (https://github.com/phpstan/phpstan-src/commit/492cfbcd74b540eda1520e11b67d7be00cbc7c31) - Removed `polluteCatchScopeWithTryAssignments` config parameter (https://github.com/phpstan/phpstan-src/commit/8933c7e28c2ebb1fd69584c031f579cd53ddf4ae) - Removed deprecated `autoload_files` parameter - use [Discovering Symbols](https://phpstan.org/user-guide/discovering-symbols) instead (https://github.com/phpstan/phpstan-src/commit/7a21246cae9dd7968bf7bef92223b53f5d681b72) - Removed deprecated `autoload_directories` parameter - use [Discovering Symbols](https://phpstan.org/user-guide/discovering-symbols) instead (https://github.com/phpstan/phpstan-src/commit/f67b48a71220b295a1704fe9749492e5de9ee18f) - Removed `bootstrap` parameter - use `bootstrapFiles` instead (https://github.com/phpstan/phpstan-src/commit/1baa29425d2e170af8ac53e4e579c34c25b640e4) - Moved `implicitThrows` configuration parameter to `exceptions.implicitThrows` (https://github.com/phpstan/phpstan-src/commit/96b7c48025dcbd5a709cea71ee4e9e73770e0d54) - Removed `--paths-file` CLI option (https://github.com/phpstan/phpstan-src/commit/5670cf221723eb652643623ad487351cb187f6c3), [#​5756](https://togithub.com/phpstan/phpstan/issues/5756) - Removed `dump-deps` command (https://github.com/phpstan/phpstan-src/commit/9c7017c697c29668f8a7c766236e597737f99f91) - Deprecated `excludes_analyse` option, use `excludePaths` instead (https://github.com/phpstan/phpstan-src/commit/d25c5e5a6c62a4537d4a108707ff26b5bea687d9) The following are interesting only if you create a custom ruleset in your configuration file: - Removed `DeadCatchRule`, replaced by `CatchWithUnthrownExceptionRule` (https://github.com/phpstan/phpstan-src/commit/4dba60bacbf3ac0efe8627fa32177ee21cdd3eca) - Removed `VariableCertaintyInIssetRule`, replaced by `IssetRule` (https://github.com/phpstan/phpstan-src/commit/2e858dee389d4843e4d1a7dc1bc565c264be247f) - Removed `MissingClosureNativeReturnTypehintRule`, no longer needed thanks to type inference (https://github.com/phpstan/phpstan-src/commit/1c34d8dc855cb5f4cf5c8b033b7155eeed0e277b) - Rename rules with typos (https://github.com/phpstan/phpstan-src/commit/003ab1aea558085cd27636a0b95a4c9f0e062e9a) # BC breaks for extension developers - Extensions are checked with rules for correct usage of PHPStan internals according to [backward compatibility promise](https://phpstan.org/developing-extensions/backward-compatibility-promise). - Thanks to upgrading `nikic/php-parser` to [version 4.13.0](https://togithub.com/nikic/PHP-Parser/releases/tag/v4.13.0), you should now use `->getArgs()` instead of `->args` wherever possible. \*Β Helpful message about this change is also included in PHPStan itself: https://github.com/phpstan/phpstan-src/commit/c836a423d34faa818127e34efb89ef4b3a7b66b6 - `PHPStan\Parser\Parser` service is no longer autowired. You need to choose the right instance for your needs and register it in the [`arguments` section of your service](https://phpstan.org/developing-extensions/dependency-injection-configuration) that needs the parser in the configuration. The Parser services you can choose from are: - `@defaultAnalysisParser` - the best choice if you're parsing files that are among the analysed files - `@currentPhpVersionSimpleDirectParser` - the closest choice to default behaviour from previous PHPStan versions - [Read more about this here.](https://togithub.com/rectorphp/rector/issues/6744#issuecomment-950282826) - Helpful message about this change is also included in PHPStan itself: https://github.com/phpstan/phpstan-src/commit/038c7a518f57b1a04536b038d24f110f9d06aa01 - Removed `CompoundTypeHelper` (https://github.com/phpstan/phpstan-src/commit/145c4e3af4045b074b1d6e697022a835433cd5f2) - Removed `CommentHelper` (https://github.com/phpstan/phpstan-src/commit/ebad6f61b9a65b68c200f7ac3a444ce198149396) - Removed `DependencyDumper` (https://github.com/phpstan/phpstan-src/commit/9c7017c697c29668f8a7c766236e597737f99f91) - Removed `PHPStan\Reflection\Generic\ResolvedFunctionVariant`, replaced by `PHPStan\Reflection\ResolvedFunctionVariant` (https://github.com/phpstan/phpstan-src/commit/1cc6c8175a6d92cf717cd553506c9da8a2dd72cc) - Removed `ClassReflection::getNativeMethods()`, use `getNativeReflection()` instead (https://github.com/phpstan/phpstan-src/commit/d2c1446b3b0f581502019c522ccb521b37e7dc15) - Removed `PhpPropertyReflection::hasPhpDoc()`, replaced by `hasPhpDocType()` (https://github.com/phpstan/phpstan-src/commit/bedd5be99107254f42efb7728c9ce3a7b958e33e) - `NodeDependencies` no longer iterable (https://github.com/phpstan/phpstan-src/commit/f76875a84d8dcca8f9d67c08b6492c609e9aff98) - Renamed `TestCase` to `PHPStanTestCase` ([#​634](https://togithub.com/phpstan/phpstan-src/pull/634)), thanks [@​frankdejonge](https://togithub.com/frankdejonge)! - `StaticType` and `ThisType` - require `ClassReflection` in constructor (https://github.com/phpstan/phpstan-src/commit/7aabc848351689f18a1db99598df8d5b4944aa87) - `PHPStanTestCase` - extensions can no longer be provided by overriding methods from `PHPStanTestCase`. Use `getAdditionalConfigFiles()` instead. (https://github.com/phpstan/phpstan-src/commit/65efd93f764e9db076851ef262179fe670f1ab38, https://github.com/phpstan/phpstan-src/commit/239291a91089da6684d8c52e58b9a77ceb178071) - Removed some unused internal helper methods from Broker (https://github.com/phpstan/phpstan-src/commit/d57815103091d8f25347b8441da3ed099f70d7af) - Changed return types of various methods that had `|false` to `|null` (https://github.com/phpstan/phpstan-src/commit/629ccf6b02146e1cbf0499982358c595e3d6edd5) - Type generalization precision is now a required argument (https://github.com/phpstan/phpstan-src/commit/65681033ff625c67a478212a0cd6da29cd5ab5fa) - Some constructor parameters are now required (https://github.com/phpstan/phpstan-src/commit/1f4062fe2d0d5406e9b8a782f99b6da61eceafde) - Deprecated `BrokerAwareExtension` (https://github.com/phpstan/phpstan-src/commit/db2f7fb9e7928de68665ca09a3e1002d8a329b33) - Deprecated `PHPStanTestCase::createBroker()`. Use `createReflectionProvider()` instead. (https://github.com/phpstan/phpstan-src/commit/1e5cf58e07446e634803c3be87e7c41fdd903c7c) - Deprecated `PHPStan\Broker\Broker`. Use `PHPStan\Reflection\ReflectionProvider` instead. (https://github.com/phpstan/phpstan-src/commit/c7755948c124cfbcb1220ab912a6eaa863cdf5fb) - Deprecated `PHPStan\Broker\Broker::getInstance()`. Use `PHPStan\Reflection\ReflectionProviderStaticAccessor` instead. (https://github.com/phpstan/phpstan-src/commit/4e7d60d74b3fda7dc4d3e0c0798b7fd55a7b32f2) - Cannot create `IntersectionType` with less than two types (https://github.com/phpstan/phpstan-src/commit/f7d232a666151bd3cd6417e103b358b8b13afa69) - Removed `ReflectionWithFilename`, use `ClassReflection|FunctionReflection` instead (https://github.com/phpstan/phpstan-src/commit/3738fcd98a98f5a8ef61b40a4c0c5384b7704714) # Improvements πŸ”§ - Performance optimizations - use is_file() over file_exists(), which is faster ([#​724](https://togithub.com/phpstan/phpstan-src/pull/724)), thanks [@​staabm](https://togithub.com/staabm)! - faster IgnoredError->shouldIgnore() ([#​736](https://togithub.com/phpstan/phpstan-src/pull/736)), thanks [@​staabm](https://togithub.com/staabm)! - faster `FileHelper::normalizePath()` ([#​735](https://togithub.com/phpstan/phpstan-src/pull/735)), thanks [@​staabm](https://togithub.com/staabm)! - faster `TypeCombinator::compareTypesInUnion()` ([#​742](https://togithub.com/phpstan/phpstan-src/pull/742)), thanks [@​voku](https://togithub.com/voku)! - faster `TypeCombinator::union()` ([#​743](https://togithub.com/phpstan/phpstan-src/pull/743)), thanks [@​voku](https://togithub.com/voku)! - faster `TypeCombinator::union()` v2 ([#​747](https://togithub.com/phpstan/phpstan-src/pull/747)), thanks [@​voku](https://togithub.com/voku)! - faster `TypeCombinator::intersect()` ([#​747](https://togithub.com/phpstan/phpstan-src/pull/747)), thanks [@​voku](https://togithub.com/voku)! - faster `TypeCombinator::remove()` ([#​746](https://togithub.com/phpstan/phpstan-src/pull/746)), thanks [@​voku](https://togithub.com/voku)! - TypeCombinator - call count() less often (https://github.com/phpstan/phpstan-src/commit/f3c054b19975d570991b2ea99c1ca1c42d42161c) - TypeCombinator - eliminate same types before normalization (https://github.com/phpstan/phpstan-src/commit/ac6a1022ff90851171f29cbceb45b1d639099255) - This caused bad memory leak (https://github.com/phpstan/phpstan-src/commit/25cb765aca4c9a3ab05fee99ff3295b61ccaf7c0) - Improve memory consumption (https://github.com/phpstan/phpstan-src/commit/d781e34a35e1dd6d6918b3160edae8d93b9fae6b) - FileExcluder: Improve performance of isExcludedFromAnalysing ([#​728](https://togithub.com/phpstan/phpstan-src/pull/728)), thanks [@​dktapps](https://togithub.com/dktapps)! - Changing analysedPaths does not regenerate the DI container (https://github.com/phpstan/phpstan-src/commit/27df5cf55ee17cd3368c9cbecb681105def7f581), [#​5825](https://togithub.com/phpstan/phpstan/issues/5825) - Do not clear old containers in worker processes ([#​733](https://togithub.com/phpstan/phpstan-src/pull/733)), [#​5825](https://togithub.com/phpstan/phpstan/issues/5825), thanks [@​dktapps](https://togithub.com/dktapps)! - Always populate `analysedPathsFromConfig` (https://github.com/phpstan/phpstan-src/commit/9f5f911337e810e5674421abc1745b2f9b6ae0b5), [#​5850](https://togithub.com/phpstan/phpstan/issues/5850) - Teach `IssetRule` everything what `VariableCertaintyInIssetRule` does (https://github.com/phpstan/phpstan-src/commit/9689fbd0ed9f8438afc8679c90df61ee48a638fe), [#​970](https://togithub.com/phpstan/phpstan/issues/970) - `MissingReturnRule` - make the error non-ignorable for native typehints (https://github.com/phpstan/phpstan-src/commit/9ecefd56d8b1d5cf0100c50d6e620285d5312291) - `get_class()` returns `false` for mixed argument types (https://github.com/phpstan/phpstan-src/commit/e86742db58f9cb3459b777570cc33d64af0ed8fa), [#​4741](https://togithub.com/phpstan/phpstan/issues/4741) - Require specifying template types for `RecursiveIterator`, `RecursiveArrayIterator`, `WeakMap` (https://github.com/phpstan/phpstan-src/commit/0b9288832073210d52a3915d9fdc1d7991a1b86b) - Rewrite OptimizedDirectorySourceLocator to use PhpFileCleaner from Composer (https://github.com/phpstan/phpstan-src/commit/b7bd0a98dbe3f8536f92b66ff17a42c98968783c) - Detect stub file added multiple times (https://github.com/phpstan/phpstan-src/commit/4a82eec4044e900be192096d58f04b4e2be80a0a) - Type inference of `new $string` leads to `object`, not `mixed` (https://github.com/phpstan/phpstan-src/commit/78a9f057d7a1c73cc34af70db406b9392ce0ca3a) - Basic support for `interface-string` and `trait-string` (https://github.com/phpstan/phpstan-src/commit/d0ef5d4af755e52eba3fd678bdd28f211f3b7d80) - Change message 'typehint' to 'type' and 'typehint type' to 'type'. ([#​270](https://togithub.com/phpstan/phpstan-src/pull/270)), thanks [@​Danack](https://togithub.com/Danack)! - IgnoredErrorHelper does not produce warnings, only errors (https://github.com/phpstan/phpstan-src/commit/915fa2e2bb567d22e9d5968008a46e762605c780) - Support general array and array shape as template type bound ([#​673](https://togithub.com/phpstan/phpstan-src/pull/673)), thanks [@​drupol](https://togithub.com/drupol)! - TypeSpecifierContext - Do not create multiple equivalent objects ([#​677](https://togithub.com/phpstan/phpstan-src/pull/677)), thanks [@​jlherren](https://togithub.com/jlherren)! - Distinguish circular type aliases from invalid type definitions ([#​678](https://togithub.com/phpstan/phpstan-src/pull/678)), thanks [@​jiripudil](https://togithub.com/jiripudil)! - more precise `SpecifiedTypes` phpdocs ([#​682](https://togithub.com/phpstan/phpstan-src/pull/682)), thanks [@​staabm](https://togithub.com/staabm) - Resolve `PHP_INT_MAX` as positiv

Configuration

πŸ“… Schedule: 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.



This PR has been generated by WhiteSource Renovate. View repository job log here.