Skip to content

Conversation

@staabm
Copy link
Owner

@staabm staabm commented Nov 14, 2024

phpstan bug repro

  • clone the repository
  • checkout this PR
  • composer install

vendor/bin/phpstan analyze src/SqlAst/ParserInference.php --debug

leads to

➜  phpstan-dba git:(staabm-patch-3) ✗ vendor/bin/phpstan analyze src/SqlAst/ParserInference.php --debug
Note: Using configuration file /Users/staabm/workspace/phpstan-dba/phpstan.neon.dist.
/Users/staabm/workspace/phpstan-dba/src/SqlAst/ParserInference.php
 ------ ---------------------------------------------
  Line   ParserInference.php
 ------ ---------------------------------------------
  51     Cannot call method getCondition() on mixed.
         🪪  method.nonObject
  55     Cannot call method getLeft() on mixed.
         🪪  method.nonObject
 ------ ---------------------------------------------

-> why does $from in src/SqlAst/ParserInference.php turn into mixed?

--> don't look at the file-diff of this repro or commits of the PR, it doesn't matter
--> I already tried to extract the case at hand and reduce it even further, but this didn't work

@staabm staabm closed this Nov 17, 2024
@staabm staabm deleted the repro branch November 17, 2024 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants