phpstan/phpstan
### [`v0.12.99`](https://togithub.com/phpstan/phpstan/releases/0.12.99)
[Compare Source](https://togithub.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 ([#658](https://togithub.com/phpstan/phpstan-src/pull/658)), [#5534](https://togithub.com/phpstan/phpstan/issues/5534),thanks [@Seldaek](https://togithub.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, [#5609](https://togithub.com/phpstan/phpstan/issues/5609), [#5356](https://togithub.com/phpstan/phpstan/issues/5356), [#1954](https://togithub.com/phpstan/phpstan/issues/1954)
- Teach `IssetRule` everything what `VariableCertaintyInIssetRule` does (https://github.com/phpstan/phpstan-src/commit/9689fbd0ed9f8438afc8679c90df61ee48a638fe), [#970](https://togithub.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 ([#657](https://togithub.com/phpstan/phpstan-src/pull/657)), [#5584](https://togithub.com/phpstan/phpstan/issues/5584), thanks [@staabm](https://togithub.com/staabm)!
- `checkExplicitMixed` - replace mixed type recursively (https://github.com/phpstan/phpstan-src/commit/b4f81dbd777f071d78ccfc453c12e82b6f950f11), [#5218](https://togithub.com/phpstan/phpstan/issues/5218)
- Fixed `checkExplicitMixed` with `TemplateMixedType` (https://github.com/phpstan/phpstan-src/commit/6ba9ef29cb5ccd5b540815e899c95e6a1602ccad), [#3566](https://togithub.com/phpstan/phpstan/issues/3566)
- `BaselineNeonErrorFormatter`: Sort errors by normalized relative path ([#536](https://togithub.com/phpstan/phpstan-src/pull/536)), [#5085](https://togithub.com/phpstan/phpstan/issues/5085), thanks [@dktapps](https://togithub.com/dktapps)!
- Enter assignment of property fetch's var when in null coalesce operator (https://github.com/phpstan/phpstan-src/commit/7ddfa174a60a15e584c7e6f4fec82237ccd70da8), [#3283](https://togithub.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), [#5615](https://togithub.com/phpstan/phpstan/issues/5615), [#5428](https://togithub.com/phpstan/phpstan/issues/5428), [#2191](https://togithub.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` ([#669](https://togithub.com/phpstan/phpstan-src/pull/669)), thanks [@staabm](https://togithub.com/staabm)!
- `array_map` - understand call with multiple arrays (https://github.com/phpstan/phpstan-src/commit/3e0ecec8fc2482e412f67f6a62bdb6542be0fe5d), [#5039](https://togithub.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` ([#665](https://togithub.com/phpstan/phpstan-src/pull/665)), thanks [@howyi](https://togithub.com/howyi)!
- Make `SimpleXMLElement` stub more specific ([#666](https://togithub.com/phpstan/phpstan-src/pull/666)), thanks [@devbanana](https://togithub.com/devbanana)!
### [`v0.12.98`](https://togithub.com/phpstan/phpstan/releases/0.12.98)
[Compare Source](https://togithub.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](https://togithub.com/phpstan/phpstan-symfony/issues/195)
### [`v0.12.97`](https://togithub.com/phpstan/phpstan/releases/0.12.97)
[Compare Source](https://togithub.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), [#5507](https://togithub.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), [#5331](https://togithub.com/phpstan/phpstan/issues/5331)
- Make `ReflectionAttribute` generic ([#640](https://togithub.com/phpstan/phpstan-src/pull/640), [#643](https://togithub.com/phpstan/phpstan-src/pull/643)), thanks [@vhenzl](https://togithub.com/vhenzl)!
- Implemented math on IntegerRangeType and ConstantIntegerType ([#637](https://togithub.com/phpstan/phpstan-src/pull/637)), [#4843](https://togithub.com/phpstan/phpstan/issues/4843), thanks [@staabm](https://togithub.com/staabm)!
- Support `non-empty-array` type in `[] != $arr` conditions ([#649](https://togithub.com/phpstan/phpstan-src/pull/649)), thanks [@staabm](https://togithub.com/staabm)!
- Optimization - do not sort huge unions (https://github.com/phpstan/phpstan-src/commit/5a44c297adb6ded659c3206e9e9525f60a37d55b), [#5500](https://togithub.com/phpstan/phpstan/issues/5500)
- Optimize calculating scalar values from huge unions (https://github.com/phpstan/phpstan-src/commit/a6ca5f7a7ef60f20ca9c2f5ec5410d28224e2db8), [#5527](https://togithub.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), [#5497](https://togithub.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), [#5517](https://togithub.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), [#5525](https://togithub.com/phpstan/phpstan/issues/5525)
- Fix `?parent` in return type (https://github.com/phpstan/phpstan-src/commit/30c9b01fd12bf2a1f655b369629c3a38acff978e), [#5529](https://togithub.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), [#5536](https://togithub.com/phpstan/phpstan/issues/5536)
- added `sizeof()` as alias of `count()` for Smaller/SmallerOrEqual ([#647](https://togithub.com/phpstan/phpstan-src/pull/647), [#648](https://togithub.com/phpstan/phpstan-src/pull/648)), [#4843](https://togithub.com/phpstan/phpstan/issues/4843), thanks [@staabm](https://togithub.com/staabm)!
- Refactor PreInc and PreDec (https://github.com/phpstan/phpstan-src/commit/a6a23dcaf6254c182e39117cbeb9f8087c1ee22c), [#1870](https://togithub.com/phpstan/phpstan/issues/1870)
- Fix inferring `TemplateUnionType` ((https://github.com/phpstan/phpstan-src/commit/1b5710a3aa87a3d475d565c8ded12de170ee6cb6), [#5562](https://togithub.com/phpstan/phpstan/issues/5562)
# Function signature fixes π€
- substr_count returns non-negative integer (https://github.com/phpstan/phpstan-src/commit/8db058a52c763408f30cd914d743d930ff3e7e8e), [#5513](https://togithub.com/phpstan/phpstan/issues/5513)
- mb_str_split() / str_split() always returns `non-empty-array` ([#633](https://togithub.com/phpstan/phpstan-src/pull/633)), thanks [@staabm](https://togithub.com/staabm)!
- Third parameter of `sodium_base642bin()` is optional. ([#644](https://togithub.com/phpstan/phpstan-src/pull/644)), thanks [@tehbeard](https://togithub.com/tehbeard)!
- Make `filter_var()` return `non-empty-string` if input is non-empty ([#642](https://togithub.com/phpstan/phpstan-src/pull/642)), thanks [@devbanana](https://togithub.com/devbanana)!
- use positive-int in `iterator_count()` / `iterator_apply()` ([#646](https://togithub.com/phpstan/phpstan-src/pull/646)), thanks [@staabm](https://togithub.com/staabm)!
- use positive-int in `array_count_values()` ([#645](https://togithub.com/phpstan/phpstan-src/pull/645)), thanks [@staabm](https://togithub.com/staabm)!
- `filter_var()` should return non empty string only when it will not be sanitized ([#650](https://togithub.com/phpstan/phpstan-src/pull/650)), thanks [@devbanana](https://togithub.com/devbanana)!
- Sync `parse_url` signature with PHP 8 (https://github.com/phpstan/phpstan-src/commit/f7c6464067e04d5fc3f11b6f624a29fee067b1be)
### [`v0.12.96`](https://togithub.com/phpstan/phpstan/releases/0.12.96)
[Compare Source](https://togithub.com/phpstan/phpstan/compare/0.12.95...0.12.96)
- OverridingPropertyRule - relax checking PHPDoc types (https://github.com/phpstan/phpstan-src/commit/24f6264bac7af157bb4efdd34a8536f6445c6ac3), [#5494](https://togithub.com/phpstan/phpstan/issues/5494)
- Add `PHP_WINDOWS_*`Β constants to `dynamicConstantNames` (https://github.com/phpstan/phpstan-src/commit/9762d371ebb2663ada1e6947d2edc685330011ee)
### [`v0.12.95`](https://togithub.com/phpstan/phpstan/releases/0.12.95)
[Compare Source](https://togithub.com/phpstan/phpstan/compare/0.12.94...0.12.95)
# Improvements π§
- Support `@var` above class constants (https://github.com/phpstan/phpstan-src/commit/b932769213234a3ee78c39c7505ded5fade3568c), [#4361](https://togithub.com/phpstan/phpstan/issues/4361), [#3530](https://togithub.com/phpstan/phpstan/issues/3530)
- Removed lossy type optimization: `TypeCombinator::CONSTANT_SCALAR_UNION_THRESHOLD` (https://github.com/phpstan/phpstan-src/commit/c56d866e63d6cd9eb80eecc9c7f1c989b2110cd3), [#5447](https://togithub.com/phpstan/phpstan/issues/5447), [#5454](https://togithub.com/phpstan/phpstan/issues/5454), [#4925](https://togithub.com/phpstan/phpstan/issues/4925), [#4793](https://togithub.com/phpstan/phpstan/issues/4793), [#5062](https://togithub.com/phpstan/phpstan/issues/5062), [#3366](https://togithub.com/phpstan/phpstan/issues/3366), [#3555](https://togithub.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 ([#614](https://togithub.com/phpstan/phpstan-src/pull/614)), thanks [@staabm](https://togithub.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), [#4281](https://togithub.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](https://togithub.com/phpstan/phpstan/discussions/5392)
- `DateTime|DateTimeInterface` union accepts `DateTimeInterface` ([#586](https://togithub.com/phpstan/phpstan-src/pull/586)), thanks [@VincentLanglet](https://togithub.com/VincentLanglet)!
- Make default `parallel.processTimeout` 10x bigger (https://github.com/phpstan/phpstan-src/commit/abb4378d635d1b8caaa2b5bd50e0304eec396f5f), [#5341](https://togithub.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 ([#613](https://togithub.com/phpstan/phpstan-src/pull/613)), thanks [@dktapps](https://togithub.com/dktapps)!
- `PDOStatement` implements `IteratorAggregate` on PHP 8 (https://github.com/phpstan/phpstan-src/commit/dec054d330550d4706870b3cdbbd5c51e2880876), [#5436](https://togithub.com/phpstan/phpstan/issues/5436)
- Assure GitLab error formatter have integer line properties ([#616](https://togithub.com/phpstan/phpstan-src/pull/616)), thanks [@simonhammes](https://togithub.com/simonhammes)!
- Fix inferring template type from `non-empty-string` (https://github.com/phpstan/phpstan-src/commit/6a33de94e447fdfdb8a67ac374e971dc2673fc5a), [#5372](https://togithub.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), [#5372](https://togithub.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), [#2959](https://togithub.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()` ([#599](https://togithub.com/phpstan/phpstan-src/pull/599)), thanks [@AIlkiv](https://togithub.com/AIlkiv)!
- Remove wrong return type of `imagejpeg` GD function ([#619](https://togithub.com/phpstan/phpstan-src/pull/619)), thanks [@mauriciofauth](https://togithub.com/mauriciofauth)!
- fix return type for gzeof() ([#620](https://togithub.com/phpstan/phpstan-src/pull/620)), thanks [@forrest79](https://togithub.com/forrest79)!
- Fix `openssl_seal()` `$iv` parameter ([#624](https://togithub.com/phpstan/phpstan-src/pull/624)), thanks [@jlherren](https://togithub.com/jlherren)!
- fix `pg_field_name` prototype ([#626](https://togithub.com/phpstan/phpstan-src/pull/626)), thanks [@thierry-f-78](https://togithub.com/thierry-f-78)!
- Fix `Phar`/`PharData::extractTo` type information ([#628](https://togithub.com/phpstan/phpstan-src/pull/628)), thanks [@Seldaek](https://togithub.com/Seldaek)!
- More precise `abs()` return-type ([#629](https://togithub.com/phpstan/phpstan-src/pull/629)), thanks [@staabm](https://togithub.com/staabm)!
- `str_split()` length parameter is always positive ([#631](https://togithub.com/phpstan/phpstan-src/pull/631)), thanks [@staabm](https://togithub.com/staabm)!
- return `non-empty-array` from `mb_str_split`/`str_split` ([#632](https://togithub.com/phpstan/phpstan-src/pull/632)), thanks [@staabm](https://togithub.com/staabm)!
- Cover `non-empty-string` in more string fuctions ([#606](https://togithub.com/phpstan/phpstan-src/pull/606)), [#5350](https://togithub.com/phpstan/phpstan/issues/5350), thanks [@staabm](https://togithub.com/staabm)!
- Added `rand()` dynamic return type extension ([#606](https://togithub.com/phpstan/phpstan-src/pull/606)), thanks [@staabm](https://togithub.com/staabm)!
- Added stub for `WeakMap` ([#623](https://togithub.com/phpstan/phpstan-src/pull/613)), thanks [@dktapps](https://togithub.com/dktapps)!
- Add `#[ReturnTypeWillChange]` stub ([#618](https://togithub.com/phpstan/phpstan-src/pull/618)), thanks [@zonuexe](https://togithub.com/zonuexe)!
- Cover `non-empty-array` in `array_map()` ([#601](https://togithub.com/phpstan/phpstan-src/pull/601)), thanks [@Lctrs](https://togithub.com/Lctrs)!
- Add dynamic return type extension for `mb_substitute_character` ([#607](https://togithub.com/phpstan/phpstan-src/pull/607)), thanks [@TRowbotham](https://togithub.com/TRowbotham)!
- `strlen`: cover more scalar types ([#630](https://togithub.com/phpstan/phpstan-src/pull/630)), thanks [@staabm](https://togithub.com/staabm)!
- support integer-range type in `min()`/`max()` for two arguments ([#627](https://togithub.com/phpstan/phpstan-src/pull/627)), [#5072](https://togithub.com/phpstan/phpstan/issues/5072), thanks [@staabm](https://togithub.com/staabm)!
- `array_fill()`: handle negative cases, support integer ranges and `non-empty-array` ([#603](https://togithub.com/phpstan/phpstan-src/pull/603)), thanks [@staabm](https://togithub.com/staabm)!
### [`v0.12.94`](https://togithub.com/phpstan/phpstan/releases/0.12.94)
[Compare Source](https://togithub.com/phpstan/phpstan/compare/0.12.93...0.12.94)
# Improvements π§
- Added integer range PHPDoc support ([#596](https://togithub.com/phpstan/phpstan-src/pull/596)), thanks [@clxmstaab](https://togithub.com/clxmstaab)!
- Cover `non-empty-array` in `array_flip` ([#583](https://togithub.com/phpstan/phpstan-src/pull/583)), thanks [@staabm](https://togithub.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 ([#593](https://togithub.com/phpstan/phpstan-src/pull/593)), thanks [@staabm](https://togithub.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` ([#595](https://togithub.com/phpstan/phpstan-src/pull/595)), [#5296](https://togithub.com/phpstan/phpstan/issues/5296), thanks [@janedbal](https://togithub.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](https://togithub.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), [#5364](https://togithub.com/phpstan/phpstan/issues/5364)
- ResultCacheManager: read also `rules` in config `.neon` file ([#594](https://togithub.com/phpstan/phpstan-src/pull/594)), thanks [@janedbal](https://togithub.com/janedbal)!
# Function signature fixes π€
- Fixed stub types for `SplFixedArray` ([#588](https://togithub.com/phpstan/phpstan-src/pull/587)), thanks [@dktapps](https://togithub.com/dktapps)!
- Updated socket_select() signature for PHP 8.0 ([#591](https://togithub.com/phpstan/phpstan-src/pull/591)), thanks [@dktapps](https://togithub.com/dktapps)!
- `proc_open()` accepts `list` for `$command` in 7.4+ ([#590](https://togithub.com/phpstan/phpstan-src/pull/590)), thanks [@dktapps](https://togithub.com/dktapps)!
### [`v0.12.93`](https://togithub.com/phpstan/phpstan/releases/0.12.93)
[Compare Source](https://togithub.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), [#5291](https://togithub.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), [#5301](https://togithub.com/phpstan/phpstan/issues/5301)
- Fix inferring `non-empty-string` in `array_map` closure (https://github.com/phpstan/phpstan-src/commit/b864a95b4616dd62a2df48908a103179946a4589), [#5293](https://togithub.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), [#5307](https://togithub.com/phpstan/phpstan/issues/5307)
- `str_repeat()` function return type extension (https://github.com/phpstan/phpstan-src/commit/57d765f6729eee91a67e5f8b14d8601d10cde23e), [#5307](https://togithub.com/phpstan/phpstan/issues/5307)
- Cover non-empty-string in `htmlentities()` ([#574](https://togithub.com/phpstan/phpstan/issues/574)) ([#574](https://togithub.com/phpstan/phpstan-src/pull/574)), thanks [@staabm](https://togithub.com/staabm)!
- Cover non-empty-string in `substr` ([#577](https://togithub.com/phpstan/phpstan-src/pull/577)), thanks [@staabm](https://togithub.com/staabm)!
- `DateTimeImmutable` removed from `DateTimeInterface` results in `DateTime` (https://github.com/phpstan/phpstan-src/commit/5eb96f55b75ae71acaa721ab831ac4a8c9647769), [#5259](https://togithub.com/phpstan/phpstan/issues/5259)
- Cover `non-empty-array` in `array_combine` ([#578](https://togithub.com/phpstan/phpstan-src/pull/578)), thanks [@staabm](https://togithub.com/staabm)!
- Cover `non-empty-array` in `array_merge` ([#581](https://togithub.com/phpstan/phpstan-src/pull/581)), thanks [@staabm](https://togithub.com/staabm)!
- Cover `FileHelper` methods with BC promise (https://github.com/phpstan/phpstan-src/commit/4f9488eb2e710f68a15632ee4115a4314f51a6f0), [#5306](https://togithub.com/phpstan/phpstan/issues/5306)
# Bugfixes π
- `array_walk` also understands `object` ([#573](https://togithub.com/phpstan/phpstan-src/pull/573)), thanks [@niconoe-](https://togithub.com/niconoe-)!
- Fix infinite recursion (https://github.com/phpstan/phpstan-src/commit/8fd9667c73710d586e90b5f5296575a3f6c9623a), [#5231](https://togithub.com/phpstan/phpstan/issues/5231)
- Final Exception methods can never throw an exception (https://github.com/phpstan/phpstan-src/commit/f5e88ae06ed144eacd3c042d77b0d4654e6bd84c), [#5299](https://togithub.com/phpstan/phpstan/issues/5299)
- Invalidating expressions without regexes (https://github.com/phpstan/phpstan-src/commit/4220e431da3e51c7a537b0ae26a825b0f3804fa1), [#5129](https://togithub.com/phpstan/phpstan/issues/5129), [#4970](https://togithub.com/phpstan/phpstan/issues/4970)
- Filter by falsey condition after the while loop (https://github.com/phpstan/phpstan-src/commit/3166ba31a8768979a40e55f1bbfea9ba4449a3d8), [#5328](https://togithub.com/phpstan/phpstan/issues/5328), [#5322](https://togithub.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` ([#582](https://togithub.com/phpstan/phpstan-src/pull/582)), thanks [@paulbalandan](https://togithub.com/paulbalandan)!
### [`v0.12.92`](https://togithub.com/phpstan/phpstan/releases/0.12.92)
[Compare Source](https://togithub.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), [#4711](https://togithub.com/phpstan/phpstan/issues/4711), [#3981](https://togithub.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), [#5263](https://togithub.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), [#5222](https://togithub.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 ([#572](https://togithub.com/phpstan/phpstan-src/pull/572)), thanks [@PrinsFrank](https://togithub.com/PrinsFrank)!
- ` !empty() `leads to `non-empty-string` (https://github.com/phpstan/phpstan-src/commit/790a83849468a0bc9eac43cb1b9594032653e342), [#5258](https://togithub.com/phpstan/phpstan/issues/5258)
- Fix mess in `ClassReflection::getInterfaces()` (https://github.com/phpstan/phpstan-src/commit/cd02bf86a65cfe87be22ad59c35bde25b82ab700), [#4854](https://togithub.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 ([#567](https://togithub.com/phpstan/phpstan-src/pull/567)), thanks [@fluffycondor](https://togithub.com/fluffycondor)!
### [`v0.12.91`](https://togithub.com/phpstan/phpstan/releases/0.12.91)
[Compare Source](https://togithub.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), [#4902](https://togithub.com/phpstan/phpstan/issues/4902), [#3660](https://togithub.com/phpstan/phpstan/issues/3660), [#4083](https://togithub.com/phpstan/phpstan/issues/4083), [#4681](https://togithub.com/phpstan/phpstan/issues/4681)
- Use the same `php.ini` in child workers ([#559](https://togithub.com/phpstan/phpstan-src/pull/559)), thanks [@yangchaobj](https://togithub.com/yangchaobj)!
- `strval()` dynamic return type extension ([#568](https://togithub.com/phpstan/phpstan-src/pull/568)), thanks [@jlherren](https://togithub.com/jlherren)!
- Type cast fixes, add tests for `intval()`, `boolval()`, `floatval()` ([#570](https://togithub.com/phpstan/phpstan-src/pull/570)), [#4848](https://togithub.com/phpstan/phpstan/issues/4848), [#5162](https://togithub.com/phpstan/phpstan/issues/5162), thanks [@jlherren](https://togithub.com/jlherren)!
- `next()` dynamic return type extension (https://github.com/phpstan/phpstan-src/commit/599f59bbc63ad95922367f1b3f86b75f2cda5021), [#5253](https://togithub.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), [#5219](https://togithub.com/phpstan/phpstan/issues/5219), [#4829](https://togithub.com/phpstan/phpstan/issues/4829), [#4844](https://togithub.com/phpstan/phpstan/issues/4844)
- Support `object` for `ReflectionClass` and `ReflectionMethod` constructor throw types ([#566](https://togithub.com/phpstan/phpstan-src/pull/566)), [#5195](https://togithub.com/phpstan/phpstan/issues/5195), thanks [@VincentLanglet](https://togithub.com/VincentLanglet)!
- Fix for: Optional array key is not recognized with `!empty` ([#569](https://togithub.com/phpstan/phpstan-src/pull/569)), [#3784](https://togithub.com/phpstan/phpstan/issues/3784), [#3700](https://togithub.com/phpstan/phpstan/issues/3700), [#3297](https://togithub.com/phpstan/phpstan/issues/3297), thanks [@ArtemGoutsoul](https://togithub.com/ArtemGoutsoul)!
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.
[ ] If you want to rebase/retry this PR, click this checkbox.
This PR contains the following updates:
0.12.90
->0.12.99
Release Notes
phpstan/phpstan
### [`v0.12.99`](https://togithub.com/phpstan/phpstan/releases/0.12.99) [Compare Source](https://togithub.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 ([#658](https://togithub.com/phpstan/phpstan-src/pull/658)), [#5534](https://togithub.com/phpstan/phpstan/issues/5534),thanks [@Seldaek](https://togithub.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, [#5609](https://togithub.com/phpstan/phpstan/issues/5609), [#5356](https://togithub.com/phpstan/phpstan/issues/5356), [#1954](https://togithub.com/phpstan/phpstan/issues/1954) - Teach `IssetRule` everything what `VariableCertaintyInIssetRule` does (https://github.com/phpstan/phpstan-src/commit/9689fbd0ed9f8438afc8679c90df61ee48a638fe), [#970](https://togithub.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 ([#657](https://togithub.com/phpstan/phpstan-src/pull/657)), [#5584](https://togithub.com/phpstan/phpstan/issues/5584), thanks [@staabm](https://togithub.com/staabm)! - `checkExplicitMixed` - replace mixed type recursively (https://github.com/phpstan/phpstan-src/commit/b4f81dbd777f071d78ccfc453c12e82b6f950f11), [#5218](https://togithub.com/phpstan/phpstan/issues/5218) - Fixed `checkExplicitMixed` with `TemplateMixedType` (https://github.com/phpstan/phpstan-src/commit/6ba9ef29cb5ccd5b540815e899c95e6a1602ccad), [#3566](https://togithub.com/phpstan/phpstan/issues/3566) - `BaselineNeonErrorFormatter`: Sort errors by normalized relative path ([#536](https://togithub.com/phpstan/phpstan-src/pull/536)), [#5085](https://togithub.com/phpstan/phpstan/issues/5085), thanks [@dktapps](https://togithub.com/dktapps)! - Enter assignment of property fetch's var when in null coalesce operator (https://github.com/phpstan/phpstan-src/commit/7ddfa174a60a15e584c7e6f4fec82237ccd70da8), [#3283](https://togithub.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), [#5615](https://togithub.com/phpstan/phpstan/issues/5615), [#5428](https://togithub.com/phpstan/phpstan/issues/5428), [#2191](https://togithub.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` ([#669](https://togithub.com/phpstan/phpstan-src/pull/669)), thanks [@staabm](https://togithub.com/staabm)! - `array_map` - understand call with multiple arrays (https://github.com/phpstan/phpstan-src/commit/3e0ecec8fc2482e412f67f6a62bdb6542be0fe5d), [#5039](https://togithub.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` ([#665](https://togithub.com/phpstan/phpstan-src/pull/665)), thanks [@howyi](https://togithub.com/howyi)! - Make `SimpleXMLElement` stub more specific ([#666](https://togithub.com/phpstan/phpstan-src/pull/666)), thanks [@devbanana](https://togithub.com/devbanana)! ### [`v0.12.98`](https://togithub.com/phpstan/phpstan/releases/0.12.98) [Compare Source](https://togithub.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](https://togithub.com/phpstan/phpstan-symfony/issues/195) ### [`v0.12.97`](https://togithub.com/phpstan/phpstan/releases/0.12.97) [Compare Source](https://togithub.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), [#5507](https://togithub.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), [#5331](https://togithub.com/phpstan/phpstan/issues/5331) - Make `ReflectionAttribute` generic ([#640](https://togithub.com/phpstan/phpstan-src/pull/640), [#643](https://togithub.com/phpstan/phpstan-src/pull/643)), thanks [@vhenzl](https://togithub.com/vhenzl)! - Implemented math on IntegerRangeType and ConstantIntegerType ([#637](https://togithub.com/phpstan/phpstan-src/pull/637)), [#4843](https://togithub.com/phpstan/phpstan/issues/4843), thanks [@staabm](https://togithub.com/staabm)! - Support `non-empty-array` type in `[] != $arr` conditions ([#649](https://togithub.com/phpstan/phpstan-src/pull/649)), thanks [@staabm](https://togithub.com/staabm)! - Optimization - do not sort huge unions (https://github.com/phpstan/phpstan-src/commit/5a44c297adb6ded659c3206e9e9525f60a37d55b), [#5500](https://togithub.com/phpstan/phpstan/issues/5500) - Optimize calculating scalar values from huge unions (https://github.com/phpstan/phpstan-src/commit/a6ca5f7a7ef60f20ca9c2f5ec5410d28224e2db8), [#5527](https://togithub.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), [#5497](https://togithub.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), [#5517](https://togithub.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), [#5525](https://togithub.com/phpstan/phpstan/issues/5525) - Fix `?parent` in return type (https://github.com/phpstan/phpstan-src/commit/30c9b01fd12bf2a1f655b369629c3a38acff978e), [#5529](https://togithub.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), [#5536](https://togithub.com/phpstan/phpstan/issues/5536) - added `sizeof()` as alias of `count()` for Smaller/SmallerOrEqual ([#647](https://togithub.com/phpstan/phpstan-src/pull/647), [#648](https://togithub.com/phpstan/phpstan-src/pull/648)), [#4843](https://togithub.com/phpstan/phpstan/issues/4843), thanks [@staabm](https://togithub.com/staabm)! - Refactor PreInc and PreDec (https://github.com/phpstan/phpstan-src/commit/a6a23dcaf6254c182e39117cbeb9f8087c1ee22c), [#1870](https://togithub.com/phpstan/phpstan/issues/1870) - Fix inferring `TemplateUnionType` ((https://github.com/phpstan/phpstan-src/commit/1b5710a3aa87a3d475d565c8ded12de170ee6cb6), [#5562](https://togithub.com/phpstan/phpstan/issues/5562) # Function signature fixes π€ - substr_count returns non-negative integer (https://github.com/phpstan/phpstan-src/commit/8db058a52c763408f30cd914d743d930ff3e7e8e), [#5513](https://togithub.com/phpstan/phpstan/issues/5513) - mb_str_split() / str_split() always returns `non-empty-array` ([#633](https://togithub.com/phpstan/phpstan-src/pull/633)), thanks [@staabm](https://togithub.com/staabm)! - Third parameter of `sodium_base642bin()` is optional. ([#644](https://togithub.com/phpstan/phpstan-src/pull/644)), thanks [@tehbeard](https://togithub.com/tehbeard)! - Make `filter_var()` return `non-empty-string` if input is non-empty ([#642](https://togithub.com/phpstan/phpstan-src/pull/642)), thanks [@devbanana](https://togithub.com/devbanana)! - use positive-int in `iterator_count()` / `iterator_apply()` ([#646](https://togithub.com/phpstan/phpstan-src/pull/646)), thanks [@staabm](https://togithub.com/staabm)! - use positive-int in `array_count_values()` ([#645](https://togithub.com/phpstan/phpstan-src/pull/645)), thanks [@staabm](https://togithub.com/staabm)! - `filter_var()` should return non empty string only when it will not be sanitized ([#650](https://togithub.com/phpstan/phpstan-src/pull/650)), thanks [@devbanana](https://togithub.com/devbanana)! - Sync `parse_url` signature with PHP 8 (https://github.com/phpstan/phpstan-src/commit/f7c6464067e04d5fc3f11b6f624a29fee067b1be) ### [`v0.12.96`](https://togithub.com/phpstan/phpstan/releases/0.12.96) [Compare Source](https://togithub.com/phpstan/phpstan/compare/0.12.95...0.12.96) - OverridingPropertyRule - relax checking PHPDoc types (https://github.com/phpstan/phpstan-src/commit/24f6264bac7af157bb4efdd34a8536f6445c6ac3), [#5494](https://togithub.com/phpstan/phpstan/issues/5494) - Add `PHP_WINDOWS_*`Β constants to `dynamicConstantNames` (https://github.com/phpstan/phpstan-src/commit/9762d371ebb2663ada1e6947d2edc685330011ee) ### [`v0.12.95`](https://togithub.com/phpstan/phpstan/releases/0.12.95) [Compare Source](https://togithub.com/phpstan/phpstan/compare/0.12.94...0.12.95) # Improvements π§ - Support `@var` above class constants (https://github.com/phpstan/phpstan-src/commit/b932769213234a3ee78c39c7505ded5fade3568c), [#4361](https://togithub.com/phpstan/phpstan/issues/4361), [#3530](https://togithub.com/phpstan/phpstan/issues/3530) - Removed lossy type optimization: `TypeCombinator::CONSTANT_SCALAR_UNION_THRESHOLD` (https://github.com/phpstan/phpstan-src/commit/c56d866e63d6cd9eb80eecc9c7f1c989b2110cd3), [#5447](https://togithub.com/phpstan/phpstan/issues/5447), [#5454](https://togithub.com/phpstan/phpstan/issues/5454), [#4925](https://togithub.com/phpstan/phpstan/issues/4925), [#4793](https://togithub.com/phpstan/phpstan/issues/4793), [#5062](https://togithub.com/phpstan/phpstan/issues/5062), [#3366](https://togithub.com/phpstan/phpstan/issues/3366), [#3555](https://togithub.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 ([#614](https://togithub.com/phpstan/phpstan-src/pull/614)), thanks [@staabm](https://togithub.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), [#4281](https://togithub.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](https://togithub.com/phpstan/phpstan/discussions/5392) - `DateTime|DateTimeInterface` union accepts `DateTimeInterface` ([#586](https://togithub.com/phpstan/phpstan-src/pull/586)), thanks [@VincentLanglet](https://togithub.com/VincentLanglet)! - Make default `parallel.processTimeout` 10x bigger (https://github.com/phpstan/phpstan-src/commit/abb4378d635d1b8caaa2b5bd50e0304eec396f5f), [#5341](https://togithub.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 ([#613](https://togithub.com/phpstan/phpstan-src/pull/613)), thanks [@dktapps](https://togithub.com/dktapps)! - `PDOStatement` implements `IteratorAggregate` on PHP 8 (https://github.com/phpstan/phpstan-src/commit/dec054d330550d4706870b3cdbbd5c51e2880876), [#5436](https://togithub.com/phpstan/phpstan/issues/5436) - Assure GitLab error formatter have integer line properties ([#616](https://togithub.com/phpstan/phpstan-src/pull/616)), thanks [@simonhammes](https://togithub.com/simonhammes)! - Fix inferring template type from `non-empty-string` (https://github.com/phpstan/phpstan-src/commit/6a33de94e447fdfdb8a67ac374e971dc2673fc5a), [#5372](https://togithub.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), [#5372](https://togithub.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), [#2959](https://togithub.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()` ([#599](https://togithub.com/phpstan/phpstan-src/pull/599)), thanks [@AIlkiv](https://togithub.com/AIlkiv)! - Remove wrong return type of `imagejpeg` GD function ([#619](https://togithub.com/phpstan/phpstan-src/pull/619)), thanks [@mauriciofauth](https://togithub.com/mauriciofauth)! - fix return type for gzeof() ([#620](https://togithub.com/phpstan/phpstan-src/pull/620)), thanks [@forrest79](https://togithub.com/forrest79)! - Fix `openssl_seal()` `$iv` parameter ([#624](https://togithub.com/phpstan/phpstan-src/pull/624)), thanks [@jlherren](https://togithub.com/jlherren)! - fix `pg_field_name` prototype ([#626](https://togithub.com/phpstan/phpstan-src/pull/626)), thanks [@thierry-f-78](https://togithub.com/thierry-f-78)! - Fix `Phar`/`PharData::extractTo` type information ([#628](https://togithub.com/phpstan/phpstan-src/pull/628)), thanks [@Seldaek](https://togithub.com/Seldaek)! - More precise `abs()` return-type ([#629](https://togithub.com/phpstan/phpstan-src/pull/629)), thanks [@staabm](https://togithub.com/staabm)! - `str_split()` length parameter is always positive ([#631](https://togithub.com/phpstan/phpstan-src/pull/631)), thanks [@staabm](https://togithub.com/staabm)! - return `non-empty-array` from `mb_str_split`/`str_split` ([#632](https://togithub.com/phpstan/phpstan-src/pull/632)), thanks [@staabm](https://togithub.com/staabm)! - Cover `non-empty-string` in more string fuctions ([#606](https://togithub.com/phpstan/phpstan-src/pull/606)), [#5350](https://togithub.com/phpstan/phpstan/issues/5350), thanks [@staabm](https://togithub.com/staabm)! - Added `rand()` dynamic return type extension ([#606](https://togithub.com/phpstan/phpstan-src/pull/606)), thanks [@staabm](https://togithub.com/staabm)! - Added stub for `WeakMap` ([#623](https://togithub.com/phpstan/phpstan-src/pull/613)), thanks [@dktapps](https://togithub.com/dktapps)! - Add `#[ReturnTypeWillChange]` stub ([#618](https://togithub.com/phpstan/phpstan-src/pull/618)), thanks [@zonuexe](https://togithub.com/zonuexe)! - Cover `non-empty-array` in `array_map()` ([#601](https://togithub.com/phpstan/phpstan-src/pull/601)), thanks [@Lctrs](https://togithub.com/Lctrs)! - Add dynamic return type extension for `mb_substitute_character` ([#607](https://togithub.com/phpstan/phpstan-src/pull/607)), thanks [@TRowbotham](https://togithub.com/TRowbotham)! - `strlen`: cover more scalar types ([#630](https://togithub.com/phpstan/phpstan-src/pull/630)), thanks [@staabm](https://togithub.com/staabm)! - support integer-range type in `min()`/`max()` for two arguments ([#627](https://togithub.com/phpstan/phpstan-src/pull/627)), [#5072](https://togithub.com/phpstan/phpstan/issues/5072), thanks [@staabm](https://togithub.com/staabm)! - `array_fill()`: handle negative cases, support integer ranges and `non-empty-array` ([#603](https://togithub.com/phpstan/phpstan-src/pull/603)), thanks [@staabm](https://togithub.com/staabm)! ### [`v0.12.94`](https://togithub.com/phpstan/phpstan/releases/0.12.94) [Compare Source](https://togithub.com/phpstan/phpstan/compare/0.12.93...0.12.94) # Improvements π§ - Added integer range PHPDoc support ([#596](https://togithub.com/phpstan/phpstan-src/pull/596)), thanks [@clxmstaab](https://togithub.com/clxmstaab)! - Cover `non-empty-array` in `array_flip` ([#583](https://togithub.com/phpstan/phpstan-src/pull/583)), thanks [@staabm](https://togithub.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 ([#593](https://togithub.com/phpstan/phpstan-src/pull/593)), thanks [@staabm](https://togithub.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` ([#595](https://togithub.com/phpstan/phpstan-src/pull/595)), [#5296](https://togithub.com/phpstan/phpstan/issues/5296), thanks [@janedbal](https://togithub.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](https://togithub.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), [#5364](https://togithub.com/phpstan/phpstan/issues/5364) - ResultCacheManager: read also `rules` in config `.neon` file ([#594](https://togithub.com/phpstan/phpstan-src/pull/594)), thanks [@janedbal](https://togithub.com/janedbal)! # Function signature fixes π€ - Fixed stub types for `SplFixedArray` ([#588](https://togithub.com/phpstan/phpstan-src/pull/587)), thanks [@dktapps](https://togithub.com/dktapps)! - Updated socket_select() signature for PHP 8.0 ([#591](https://togithub.com/phpstan/phpstan-src/pull/591)), thanks [@dktapps](https://togithub.com/dktapps)! - `proc_open()` accepts `listConfiguration
π 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.