Skip to content

Consequest scope with the same condition #4173

Closed

Description

@mvorisek

Bug report

Variable $value might not be defined.

Code snippet that reproduces the problem

https://phpstan.org/r/5749c17c-76ca-40ac-9374-d94ae8510652

Expected output

no phpstan error

Activity

  1. mergeable commented on Dec 2, 2020

    @mergeable

    This bug report is missing a link to reproduction on phpstan.org.
    It will most likely be closed after manual review.

  2. mvorisek commented on Dec 2, 2020

    @mvorisek
    ContributorAuthor

    reproduceable example/link added

  3. added this to the Dependent types milestone on Dec 2, 2020
  4. phpstan-bot commented on Nov 18, 2022

    @phpstan-bot
    Collaborator

    @mvorisek After the latest push in 1.9.x, PHPStan now reports different result with your code snippet:

    @@ @@
    -24: Variable $cond might not be defined.
     28: Variable $value might not be defined.
    Full report
    Line Error
    28 Variable $value might not be defined.
  5. phpstan-bot commented on Nov 18, 2022

    @phpstan-bot
    Collaborator

    @mvorisek After the latest push in 1.9.x, PHPStan now reports different result with your code snippet:

    @@ @@
    -24: Variable $cond might not be defined.
     28: Variable $value might not be defined.
    Full report
    Line Error
    28 Variable $value might not be defined.
  6. phpstan-bot commented on Nov 18, 2022

    @phpstan-bot
    Collaborator

    @mvorisek After the latest push in 1.9.x, PHPStan now reports different result with your code snippet:

    @@ @@
    -24: Variable $cond might not be defined.
     28: Variable $value might not be defined.
    Full report
    Line Error
    28 Variable $value might not be defined.
  7. added a commit that references this issue on Mar 30, 2026
    b73b0f5
  8. phpstan-bot commented on Mar 30, 2026

    @phpstan-bot
    Collaborator

    Closed via merging phpstan/phpstan-src#5056

  9. added 2 commits that reference this issue on Mar 30, 2026
    b73b0f5
    4cbde15
  10. added a commit that references this issue on Apr 7, 2026
    c0e0cae
  11. github-actions commented on May 1, 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.

  12. locked as resolved and limited conversation to collaborators on May 1, 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

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions