PHPStan 2.3.3

2.3.3
Added 2
  • Support PHP 8.2 in the Turbo extension
  • Infer literal types for word date format characters
Changed 2
  • Replace Hoa with a regex parser generated by phplrt
  • Update phpdoc-parser, so a PHPDoc is no longer walked to its end for every generic
Fixed 17
  • Lexer reads underscore in a tag name in phpdoc-parser
  • Printer indents a new tag like the other tags in phpdoc-parser
  • Printer puts back asterisks in multi-line texts and descriptions in phpdoc-parser
  • Printer keeps Doctrine annotation name and missing parentheses in phpdoc-parser
  • Do not let a bootstrap autoloader's exception abort the analysis
  • Do not delete a container that another process has not journaled yet

From PHPStan

Improvements 🔧

Bugfixes 🐛

  • Do not let a bootstrap autoloader's exception abort the analysis (#6294), thanks @SanderMuller!
  • Do not delete a container that another process has not journaled yet (#6797), thanks @SanderMuller!
  • Ignore FILTER_THROW_ON_FAILURE bit when the PHP version range only maybe includes PHP 8.5 and the runtime FILTER_FLAG_GLOBAL_RANGE shares it (#6779), #15481, thanks @VincentLanglet and @staabm!
  • Resolve type arguments of generic static types inside the class, in properties and in class constants (#6826), #15378, #12680
  • Do not cache isGeneric() or the class PHPDoc while the class name scope is created (#6726), #15448, thanks @GErpeldinger!
  • Do not reuse name scopes built from the simplified AST for an analysed file (#6833), #15475
  • Unmatched optional group followed by a matched one is '' in preg_match_all() with PREG_SET_ORDER (#6851)
  • MARK in preg_match_all() with PREG_PATTERN_ORDER is an array of marks keyed by match index (#6851)
  • Treat regex assertions as zero-width and groups in negative assertions as never set (#6851)
  • Do not infer preg_match() shapes for duplicate group names outside of separate alternation branches (#6851)
  • Quantified atom that can match empty string does not make the match non-empty (#6851)
  • Parse backreferences and subroutine calls in regexes, do not infer shapes for patterns with subroutine calls (#6851)
  • Do not infer preg_match() shapes for branch reset groups outside of the only top level alternation (#6851)
  • Groups in conditional regex subpatterns are optional and conditional subpatterns might match an empty string (#6851)
  • Fix PHAR scoping of trigger_deprecation(), remove stale scoper patchers (#6857)
  • Keep the expression result alive in the native ReturnHandler (#6852), thanks @SanderMuller!
  • Fix global constant discovery after class name tokens (#6756), #15482, thanks @LubuSeb!
  • Do not use PHPDoc type of overridable class constants as their native type (#6859)
  • Walk catch blocks that no throw point reaches (#6859)
  • Walk attribute groups of closures and arrow functions (#6859)
  • Use tentative return types of built-in methods as native return types (#6859)

Performance 🏎️

  • Keep the restart ini out of the container key (#6834), thanks @SanderMuller!

Internals 🔍

  • Add regression test (#6836), #12820, thanks @Amoifr!
  • Keep paragraphs apart in ApiGen descriptions (#6849)
  • Use code fences for code samples in PHPDocs (#6849)
  • Added regression test (#6848), #11359, thanks @staabm!
  • Remove unreachable wasMatched check in branch reset guard (#6851)
View original

Upgraded? How did it go?

Discussion