Skip to content

add another flag on SpecifiedTypes to not imply the opposite case #14705

Closed
phpstan/phpstan-src
#5769

Description

@staabm

Bug report

... instead of generating weird faux functions calls, as we currently do (and a few 1st party extensions)

This is basically what https://phpstan.org/writing-php-code/narrowing-types#equality-assertions solves

So maybe instead of generating weird faux functions calls, we might add another flag on SpecifiedTypes to not imply the opposite case?
Also research how the equality assertion is currently implemented

(citing ondrej)

Code snippet that reproduces the problem

No response

Expected output

no more faux calls

Did PHPStan help you today? Did it make you happy in any way?

No response

Activity

  1. mergeable commented on May 26, 2026

    @mergeable

    This bug report is missing a link to reproduction at phpstan.org/try.

    It will most likely be closed after manual review.

  2. phpstan-bot commented on Sep 20, 2026

    @phpstan-bot
    Contributor

    Closed via merging phpstan/phpstan-src#5769

  3. github-actions commented on Oct 22, 2026

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  4. locked as resolved and limited conversation to collaborators on Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions