markus staab | @[email protected]

10.2K posts

markus staab | @markusstaab@phpc.social banner
markus staab | @markusstaab@phpc.social

markus staab | @[email protected]

@markusstaab

open-source lover, creator of staabm/phpstan-dba, extensive freetime @phpstan, @rectorphp and #phpunit contributor #sabredav, #amphp, #redaxo

germany Katılım Aralık 2011
139 Takip Edilen888 Takipçiler
markus staab | @[email protected] retweetledi
Jan Tvrdík
Jan Tvrdík@JanTvrdik·
🔑 New OSS from ShipMonk: Passkeys (WebAuthn) for PHP 8.4+ with zero dependencies. High-level flow API, conditional mediation, a fake authenticator for easy testing, 100% code coverage and phpstan max level with no ignores. github.com/shipmonk-rnd/p…
English
0
2
16
1.1K
markus staab | @markusstaab@phpc.social
#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
markus staab | @markusstaab@phpc.social tweet media
English
0
4
14
1.2K
Marc
Marc@MarcJSchmidt·
I wanted to play Black Flag Resynced since it came out but my gaming machine's GPU is used nonstop for ML experiments/unit tests/compilers/benchmarks. Would need a second machine which my wife would not approve. help?
English
1
0
0
374
markus staab | @markusstaab@phpc.social
Its implemented in the upcoming release and will ship with a new phpdoc @pure-unless-callable-is-impure which allows you to achieve the same thing on your own code
English
0
1
1
390
markus staab | @markusstaab@phpc.social
contributed to #phpstan by @zonuexe: 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
markus staab | @markusstaab@phpc.social tweet media
English
1
2
5
580
markus staab | @markusstaab@phpc.social
@VotrubaT Seeing php_ast extension beeing so fast, makes me wonder whether a new php extension could be implemented which is API compatibe with nikoc/php-parser but as fast as the ast extension I
English
1
0
1
77
Tomas Votruba
Tomas Votruba@VotrubaT·
Someone asked about memory consumption of Go parser... so I've added a new column to see how it runs compared to other parser ⬇️ (z7zmey-Go being the least hungry on multi cores)
Tomas Votruba tweet media
English
2
1
16
1.3K
markus staab | @markusstaab@phpc.social
@VotrubaT I tried running mago on some projects which use phpstan atm. My experience until now is, that mago is very fast in delivering a huge amount of false positives
English
4
0
5
179
Tomas Votruba
Tomas Votruba@VotrubaT·
This is my experience so far as well. PHP compilation architecture was never meant to handle processing whole codebases at once. Anyone using Mago in my circles?
Tseng@TsengSR

@OndrejMirtes Meanwhine in Rust, Go und .NET you'd only use under 200 MB lol. Man, only PHP and Python crowd feel themselves proud if they lower 2.8 to 2.1 GB w/o ever questioning why the crap uses 2.8 in the first place for something that shouldn't be more than a 100 or 200 MB lol

English
5
0
5
2.9K
Tomas Votruba
Tomas Votruba@VotrubaT·
@markusstaab @wilsenhc It's not a bug, it's feature :). Goal is to make simpler, and faster tool that delivers more value, not 1:1 clone in different language. Same way FrankenPHP is not nginx, iPhone is not a homephone.
English
1
0
1
107
Tomas Votruba
Tomas Votruba@VotrubaT·
Basically, Rector-like tool written in Go is finished before Rector (in PHP) start to process a 1st file. How can it be so far? Maybe I use it wrong, I'll keep you posted 😉
English
5
2
31
7.5K
Tomas Votruba
Tomas Votruba@VotrubaT·
@wilsenhc No idea yet. I'm in very early stage of testing. Considering paid products, less rules, but more practical, running in loop as standalone agent, instead of manually triggering... Open to explore.
English
1
0
0
292
Alexandre Daubois
Alexandre Daubois@alexdaubois·
@markusstaab An excellent idea! I think yes. It will require some parsing but it’s pretty deterministic so my guess is that it’s totally doable 🙂
English
1
0
3
114
Alexandre Daubois
Alexandre Daubois@alexdaubois·
One regex can freeze your whole #PHP process. So I capped it in #Symfony latest releases. JSONPath's match() and search() run user-supplied patterns. Feed (a+)+ a long non-matching string and PCRE backtracks exponentially: classic ReDoS. I bounded pcre.backtrack_limit around those calls, so a pathological pattern fails fast instead of hanging.
Alexandre Daubois tweet media
English
2
0
19
1.6K
markus staab | @[email protected] retweetledi
Ondřej Mirtes
Ondřej Mirtes@OndrejMirtes·
PHPStan 2.2.4 addresses the RAMpocalypse! It now consumes a lot less memory. See for yourself by running "analyse -v". Running PHPStan itself used to consume 2,8 GB, now it consumes 2,1 GB. On a big real-world project, the consumption went down from 17,45 GB to 14,1 GB.
English
2
11
74
5.6K
Nick e/code
Nick e/code@nicksdot·
Mago parsing PHP 30-58 times faster than PHP Parser is actually insane. 😅
Nick e/code tweet media
English
5
0
31
2.4K
Mishaa ☢️🚀
Mishaa ☢️🚀@Sir_Mishaa·
@nicksdot Could it be used to increase performance of PHPStan ? In big codebase, this quite take some time to run and would be nice if it could be improved
English
2
0
0
173
markus staab | @markusstaab@phpc.social
just reviewing a #phpstan PR which fixes a old feature request with a 3 digit issue number... nearly 10 years old. seems we can consider it implemented in the near future =)
English
0
0
7
206