Skip to content

Conversation

@staabm
Copy link
Contributor

@staabm staabm commented Dec 21, 2025

No description provided.

/**
* @return Node\Stmt[]
*/
public function parseString(string $sourceCode): array
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm I wonder whether/why we need this parseString function. it seems its only used from tests and everywhere else we read a file to pass the contents into parseString.

I think we could remove some unnecessary file-read operations by dropping parseString and just use parseFile everywhere with PHPStan 3.x ... wdyt?

@ondrejmirtes
Copy link
Member

I have to remember the reason for this but I think there is one. The currently failing test testParseTheSameFileWithDifferentMethod might be showing precisely that.

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