Problem with PHPStan
See original GitHub issueAPI Platform version(s) affected: 2.6.7
Description
After updating dependencies to last version, we get these errors in our PHPStan installation:
ParseError (syntax error, unexpected 'static' (T_STATIC)) thrown
while looking for class ApiPlatform\Core\Util\ClientTrait80.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
The PHPStan message isn’t very clear, so I’m not sure of what causes the issue as the code inside ClientTrait80
seems fine.
Or is it the static
return type on the withOptions
method that raises such an alarm?
We are running under PHP7.4
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:5
Top Results From Across the Web
Issues · phpstan/phpstan - GitHub
PHP Static Analysis Tool - discover bugs in your code without running it! - Issues · phpstan/phpstan.
Read more >Fix PHP Stan errors [#3310754] | Drupal.org
Problem/Motivation Used the PHPStan tool on level 0 and found 4 errors, need to fix them.
Read more >php - Phpstan fails with "Syntax error, unexpected T_STRING ...
I have no idea what happened here, but the code is completely wrong. It's supposed to be an array definition, not a function....
Read more >PHPStan: Find Bugs Without Writing Tests
PHPStan scans your whole codebase and looks for both obvious & tricky bugs. Even in those rarely executed if statements that certainly aren't...
Read more >PHPStan | PhpStorm Documentation - JetBrains
To use PHPStan from PhpStorm instead of command line, ... every update in the file thus making it easy to get rid of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is going to be fixed in PHPStan 1.4.2 which is going to be released soon.
Well spotted, I hadn’t found it! 😃 Closing the issue then