#phpstan

26 posts · Last used 9d

Hi Fediverse 👋 I'm Kevin, a PHP/Symfony developer and team lead from Germany. Lately one question keeps me busy: how do you let AI coding agents write PHP without lowering the bar? My answer so far: quality gates first. PHPStan at max, Rector, ECS, tests, architecture rules, Infection. I write about it at https://blog.tony-stark.xyz and share my templates on GitHub. Happy to swap notes! #introduction #PHP #Symfony #PHPStan
0
0
1
0
For the best experience you should install #phpstan using #composer! when downloading the phpstan.phar with curl/wget or via package managers like e.g. homebrew or phive, chances are high you will miss necessary PHPStan Turbo files. Analysis will be a lot slower without Turbo!
5
0
6
0
Last week I had an idea on how we can improve efficency when #phpstan needs to work with big unions of constant types (e.g. enum with lots of caes). this had a nice impact on some example of our benchmark suite
5
3
4
0
What is this? – if key is string, then value must be int – if key is int, then value must be bool It should allow for ['foo' => 1, true] #AskFedi #FollowerPower #amCoding #amProgramming #softwareDevelopment #softwareEngineering #PHP #PHPStan #computerScience #dataTypes #typeSystem #typeTheory #typeVariance #compositeDataTypes #dataTypeComposition

What is this? – if key is string, then value must be int – if key is int, then value must be bool It should allow for ['foo' => 1, true] #AskFedi #FollowerPower #amCoding #amProgramming #softwareDevelopment #softwareEngineering #PHP #PHPStan #computerScience #dataTypes #typeSystem #typeTheory #typ

union: array<string, int>|array<int, bool> 60%
something else (please comment) 0%
intersection: array<string, int>&array<int, bool> 40%

5 people · Closed

1
2
3
1