Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: phpstan/phpstan-src
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2.2.x
Choose a base ref
...
head repository: phpstan/phpstan-src
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: create-pull-request/patch-voz76k1
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 4 files changed
  • 2 contributors

Commits on Feb 22, 2026

  1. Fix array_key_exists false positive on list types with optional trail…

    …ing keys
    
    When `ConstantArrayType::unsetOffset()` removed an optional trailing key
    from a list type, it unconditionally set `isList` to `No`. This caused
    `TypeCombinator::remove()` to produce `NeverType` when re-intersecting
    with `AccessoryArrayListType`, since the list accessor rejects non-list
    arrays. The `NeverType` falsy branch then collapsed scope merging after
    conditionals like ternaries, propagating the narrowed (truthy) type
    beyond the conditional and triggering false "always true" reports on
    subsequent `array_key_exists()` calls.
    
    The fix preserves the original `isList` value when unsetting an optional
    key whose removal leaves the remaining keys as consecutive integers
    starting from 0.
    
    Fixes phpstan/phpstan#14177
    ondrejmirtes authored and phpstan-bot committed Feb 22, 2026
    Configuration menu
    Copy the full SHA
    1711885 View commit details
    Browse the repository at this point in the history
  2. Fix CI failures [claude-ci-fix]

    Automated fix attempt 1 for CI failures.
    phpstan-bot committed Feb 22, 2026
    Configuration menu
    Copy the full SHA
    0de7eb6 View commit details
    Browse the repository at this point in the history
Loading