#phpstan

21 posts · Last used 4d

Back to Timeline
markus staab @markusstaab@phpc.social · 4d ago
running different #PHPStan versions on #shopware 6 2.1.43: 1m 33s - takes 8.79GB memory 2.2.8: 1m 25s - takes 7,46 GB memory
0
0
0
markus staab @markusstaab@phpc.social · 4d ago
Anyone out there with a open source codebase, running #phpstan in CI takes more than 5 minutes? I would love looking into what makes it slow for you Send me a link to your CI logs RT
0
1
1
markus staab @markusstaab@phpc.social · Aug 06, 2026
@OndrejMirtes@phpc.social handed me over a list of #php-src commits to verify and contribute to the php runtime. So I started opening pull requests on the php project to improve performance of #phpstan. Lets see how it goes - wish me luck :-)
1
1
0
Daniel Badura @danielbadura@phpc.social · Aug 05, 2026
I wrote a small blog post about the new release of patchlevel/event-sourcing-phpstan-extension, 1.3.0 adds three new rules. They report aggregate properties that no event ever fills, state that nothing ever reads, and state that changes outside an apply method. Also, every rule can be turned off individually. Feel free to check it out! https://patchlevel.dev/blog/what-is-new-in-the-event-sourcing-phpstan-extension-1-3-0 #TechBlog #PHP #DDD #EventSourcing #PHPStan #StaticAnalysis
0
0
0
markus staab @markusstaab@phpc.social · Aug 03, 2026
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
0
1
0
markus staab @markusstaab@phpc.social · Jul 26, 2026
Since April 2026 we fixed ~280 issues on #phpstan. We implemented lots of new features and improvements along the way and made it even faster at the same time. be prepared for the next release which will do another big leap in #performance 🚀
0
0
0
patchlevel @patchlevel@phpc.social · Jul 20, 2026
We released 1.3.0 of event-sourcing-phpstan-extension! See here for the changelog: https://github.com/patchlevel/event-sourcing-phpstan-extension/releases/tag/1.3.0 #PHP #DDD #EventSourcing #PHPStan #StaticAnalysis
0
0
0
markus staab @markusstaab@phpc.social · Jul 20, 2026

In case you think #phpstan is running too slow, have a look at the result of running phpstan analyze command with -vv and check whether it utilizes the result cache

When the result cache is warm, it should be wicked fast

in CI you likely need to persist the cache manually

see https://phpstan.org/user-guide/result-cache#setup-in-continuous-integration

0
0
0
Zuri (he/him) ❌️👑 | 🕐 CET @shaedrich@mastodon.online · Jul 17, 2026

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.0% (3)
something else (please comment)
0.0% (0)
intersection: array<string, int>&array<int, bool>
40.0% (2)
5 votes Poll closed
View on mastodon.online
0
0
3
markus staab @markusstaab@phpc.social · Jul 13, 2026
#phpstan 2.2.3+ is able to detect package updates based on composer.lock. utilizing the pre-existing dependency graph, we need to re-analyze only affected files. Previously we had todo a full project analysis. contributed by @sander_scode
0
0
0
markus staab @markusstaab@phpc.social · Jul 12, 2026
We have a few really cool perf experiments running atm to get #phpstan even faster.. some of them look really promising. 🫰
0
0
0
markus staab @markusstaab@phpc.social · Jul 08, 2026

contributed to #phpstan by @zonuexe@phpc.social: PHPStan will have a better idea about purity of callables taking a callback argument.

for example will array_map($pureCb, $arr) be considered pure:

  • less false positives
  • better dead code detection
0
0
0