@markusstaab@phpc.social avatar

markusstaab

@markusstaab@phpc.social

software development with passion - open-source lover, creator of staabm/phpstan-dba, freetime https://phpc.social/@phpstan and @rectorphp contributor

This profile is from a federated server and may be incomplete. Browse more on the original instance.

markusstaab, to random German
@markusstaab@phpc.social avatar

Todays #phpstan release contains numerous fixes and improvements.

Please consider supporting my open source work:
https://github.com/sponsors/staabm

markusstaab, to random German
@markusstaab@phpc.social avatar

Todays #phpstan #todoby release adds support for full github urls as a out-of-the box format.

In contrast to previously supported issue trackers, it works without additional configuration right after extension was installed.

Additionally we now support XXX and FIXME comments.

see https://github.com/staabm/phpstan-todo-by/releases/tag/0.1.26

markusstaab, (edited ) to random German
@markusstaab@phpc.social avatar

My #phpstan extension #todoby recently crossed 150 stars.

it allows you to put expiration on your code comments.
a comment can expire by e.g. a github, jira or youtrack issue-url. expiration dates and composer version constraints also work.

give it a shot :)

https://github.com/staabm/phpstan-todo-by

markusstaab,
@markusstaab@phpc.social avatar
markusstaab,
@markusstaab@phpc.social avatar

@weirdan sure, please create a issue so it is not forgotten

markusstaab,
@markusstaab@phpc.social avatar

@ramsey @shochdoerfer its made like this because I am a long time phpstan contributor and therefore it was easy to implement for me. having the functionality in PHPStan was also a perfect fit for my CI setup

markusstaab,
@markusstaab@phpc.social avatar
markusstaab, (edited ) to random German
@markusstaab@phpc.social avatar

I am working on some really cool type improvements for preg_match() in #phpstan for a few days.

Fingers crossed the changes are acceptable 😅

markusstaab, (edited ) to random German
@markusstaab@phpc.social avatar

Todays #phpstan 1.11.0 release alone contains 11 contributions of mine:

  • some new side-effect rules
  • type narrowing improvements
  • signature improvements
  • internal cleanups

If this tool is vital for your daily job, please sponsor my freetime work or spread the word (tell your boss).

markusstaab, (edited ) to Laravel German
@markusstaab@phpc.social avatar

Today I collaborated with ondrey on a fix for #phpstan which improves a previous performance fix, which caused perf regressions in a #laravel edge-case.

The new fix allows a 2-3 seconds instead of 2-3 minutes analysis in all mentioned cases.

Reported issue was https://github.com/phpstan/phpstan/issues/10979

markusstaab, to random German
@markusstaab@phpc.social avatar

its profilling time again. try to squeeze out more in edge-case.

most annoying part is that running in this cases means you need to wait 10-15 minutes until the recording is done.

Already found a way to make it 37% faster: https://github.com/phpstan/phpstan-src/pull/3059

still investigating

herndlm, to random
@herndlm@phpc.social avatar

We'll be moving to #Frankfurt. I'll be a regular guest of @phpugffm for sure then 😊

Shameless cry for help: If anybody knows about a semi-central 3 or 4 room apartment becoming available - I'm all ears :) #fedipower #followerpower

markusstaab,
@markusstaab@phpc.social avatar

@herndlm @phpugffm hopefully we can meet there

markusstaab, to random German
@markusstaab@phpc.social avatar

In the next @rectorphp release I have implemented a fast path for null-safe-method-calls.

In case you are using this language feature in a modern codebase, rector is likely getting faster for you starting with the next release.

markusstaab, to NextLevel German
@markusstaab@phpc.social avatar

In the next #PHPStan release, type inference for #mysqli fetch-object will be improved:

https://phpstan.org/r/e39f231d-b5b2-438c-a355-cf3c4ee8fbce

If you need #nextlevel database access static analysis try #phpstandba

overview: https://staabm.github.io/talks/phpstan-

markusstaab, to random German
@markusstaab@phpc.social avatar

Build a small tool today, which scans all our git repositories and detects classes which are not used anywhere (across repository unused classes)

markusstaab,
@markusstaab@phpc.social avatar

@danrot atm its pretty specific to our own setup.

I might reconsider if we find someone sponsoring it ;)

markusstaab, to random German
@markusstaab@phpc.social avatar

Today I implemented support for NullsafePropertyFetch and NullsafeMethodCall in @rectorphp #deadcode removal features.

Before this fixes code might have been considered unused even if it was used by one of these null-safe language constructs.

markusstaab, to random German
@markusstaab@phpc.social avatar

Improved memory consumption in #ECS - easy-coding-standards CS tool of @votrubaT a bit

https://github.com/easy-coding-standard/easy-coding-standard/pull/192

markusstaab, to random German
@markusstaab@phpc.social avatar

I have a feeling, the #phpstan 1.11.x will be pure gold (pun intended)

markusstaab, to random German
@markusstaab@phpc.social avatar

Someone is trying to hack one of our apps.. today reporting detected edge-side-include attacks via session-id cookies and sql injection attempts via http-referer header

image/png

markusstaab, to random German
@markusstaab@phpc.social avatar

Todays #PHPStan release contains my fixes regarding a few "uninitialized readonly property" false positives.

Additionally I contributed type improvements on increment/decrement operator usage with numeric-string

markusstaab, to random German
@markusstaab@phpc.social avatar

I am working on improving typing in nikic/PHP-Parser so static analysis tooling can assist you better when working directly with the AST.

Also fixing CI while at it.

I started this because we ran into a edge-case fatal error in #PHPStan.

https://github.com/nikic/PHP-Parser/pull/993

ocramius, to random
@ocramius@mastodon.social avatar

This is gonna be fun

❯ dot -Tsvg taint-graph.dot > taint-graph.dot.svg  
Error: taint-graph.dot: memory exhausted in line 288998 near '"'  
^C^C  
^C^C

Segmentation fault (core dumped)  
markusstaab,
@markusstaab@phpc.social avatar

@ocramius how do you generate the taint graph? With psalm?

ocramius, to github
@ocramius@mastodon.social avatar

Is there a trick to make this an expanded section, instead of a fixed size section that I have to scroll within?

markusstaab,
@markusstaab@phpc.social avatar

@ocramius with refined github this list gets sorted so actions in non-successfull state will be on the top

maks_rafalko, to random
@maks_rafalko@mastodon.social avatar

Is there a rector / php-cs-fixer rule that automatically adds #[CoversClass(ClassName::class)] to a new test and guesses ClassName based on a test class name?

I'm aware of https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/v3.14.4/doc/rules/php_unit/php_unit_test_class_requires_covers.rst but this is not what is needed.

What I need is on the screeshot

markusstaab,
@markusstaab@phpc.social avatar

@maks_rafalko I will look into it when time allows

  • All
  • Subscribed
  • Moderated
  • Favorites
  • anitta
  • thenastyranch
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • ngwrru68w68
  • megavids
  • magazineikmin
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • provamag3
  • tester
  • Leos
  • JUstTest
  • All magazines