Anyone can help with a #phpstan issue?
I've got strange errors when running it.
"Internal error: PhpParser\Lexer::getNextToken(): Return value must be of type int, null returned while analysing file /application/src/Form/DataTransformer/Core/LanguageToStringTransformer.php"
The given class wasn't changed since years now and when I'm removing it (for testing reasons) phpstan argues about other files.
Does anyone know what's going on? I'm on the latest stable version 1.12.28
The next #phpstan release will be able to detect dead code after immediately-invoked closures and arrow functions.
we utilize `@param-immediately-invoked-callable`-phpdoc of callable-typed parameters.
New release: PHPStan 2.1.21 https://github.com/phpstan/phpstan/releases/tag/2.1.21 #phpstan
New release: PHPStan 2.1.20 https://github.com/phpstan/phpstan/releases/tag/2.1.20 #phpstan
PHP is when you spend eight hours mapping a dynamic OOP query structure into an array structure so that an external library can read it. However, today, PHPStan 1.12.28 required me to specify the array value EXACTLY. Yet it doesn't support the necessary circular dependencies by its `@phpstan-type`...
This is why I sometimes need a three-week vacation from PHP; otherwise, I'll burn out.
What remains? Delete all type definitions, and then exclude each resulting phpstan error individually. Awesome! More wasted time!
And of course some after-work Golang to keep me sane.
New release: PHPStan 2.1.19 https://github.com/phpstan/phpstan/releases/tag/2.1.19 #phpstan
We recently hit a production problem because dead code detection did not work like expected
until now #phpstan only saw unreachable code after always terminating statements
took me a while, but fixed dead code detection to check expressions - available in the upcoming release
New release: PHPStan 2.1.18 https://github.com/phpstan/phpstan/releases/tag/2.1.18 #phpstan
Ampache 7.7.0: 995 errors, 1987 files
The lowest issue count we've ever had and massive increase in quality all thanks to #phpstan
„Static Typing for the AWS SDK for PHP“ #phpstan
https://chrastecky.dev/programming/static-typing-for-the-aws-sdk-for-php
#phpstan rule of the day:
implemented a very naive rule which just checks the content of files and counts single quotes, double quotes and parenthesis.
in 98% of the files this should be a even number.
if not you likely found invalid html, sql, javascript, php, strings,.. :)
The #PHPStan #Elephpant has joined the herd. Love the attention to detail! Thanks @OndrejMirtes
Another one for the herd! Welcome to your new home, Stan.
Thanks for the adoption opportunity @OndrejMirtes !
https://phpstan.org/r/6b9bdd7e-8fc3-4200-9dfa-ed7b29f6e41e
Any idea what #phpstan is complaining about here? #php
I don't get it.
And thank you @OndrejMirtes for such a fantastic tool! #php #phpstan
New addition to the #elephpant herd! Many Thanks @OndrejMirtes ! #phpstan
thanks #phpstan @OndrejMirtes for the new #elephpant member to my herd #php
I got this today #phpstan #elephpant