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

phpugmrn, to random German
@phpugmrn@phpc.social avatar
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

ramsey,
@ramsey@phpc.social avatar

@shochdoerfer @markusstaab I am curious, though, why it’s a #PHPStan extension and not a #phpcs sniff (or something of the code style sort).

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 😅

OndrejMirtes, to random
@OndrejMirtes@phpc.social avatar

When I find an easy fix for a bug I thought was unfixable for 3 years… #phpstan

Vibing White Cat GIF

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

PHPCSFixer, to random
@PHPCSFixer@phpc.social avatar

📢 NEW RELEASE!

Fixer v3.55 brings brand new ordered_attributes rule that extends our support for #PHP8 😁. There are also multiple internal improvements, as we bumped #PHPStan level to 7 and fixed several reported issues.

https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/releases/tag/v3.55.0

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-

ultimike, to drupal
@ultimike@drupal.community avatar

Upgrading existing Drupal 10 sites to PHP8.3 is a really, really, really good idea at this point in time. Luckily, the #drupal community has great tools like #phpstan to help us along.

https://buff.ly/49EjGQR

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

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

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

Do you need help with #PHPStan in some form?

I have plenty of experience in contributing changes to PHPStan core, or implementing custom extensions.

https://staabm.github.io/2024/01/01/phpstan-customizing.html

plz RT

stefanzweifel, to php
@stefanzweifel@phpc.social avatar

While making my PHP packages compatible with Laravel 11 the last few weeks, I've also spent some time and added PHPStan to all of them.

The more simpler ones are already on level 9. The more complex are still on level 5 or 6. I'm still a novice when it comes to proper type documentation. Goal is to increase levels throughout the year.

Links to all packages:
https://stefanzweifel.dev/projects

#php #phpstan

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

Worked on reducing overhead of #betterreflection to improve performance of #phpstan and #rector for projects which register a custom autoloader.

Our legacy projects autoloader which works in a include-path like fashion triggered lots of IO before.

Should be gone in next release

si, to drupal

Belated deep dive on #phpstan, my overview of getting started with a #drupal site https://youtu.be/8al0GVuYwYY

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

Sometimes the difference between a >2 minute and a 2 second running #phpstan analysis can just be a tiny change

https://github.com/phpstan/phpstan-src/pull/2985

OndrejMirtes, to random
@OndrejMirtes@phpc.social avatar

Sometimes I like to write silly commit messages. #phpstan

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

While #PHPStan 1.10.60 shipped with deprecations handilng for global constants, with 1.10.62 I made sure that we only report errors depending on the used php version to improve DX.

https://twitter.com/markusstaab/status/1765984217937154473

ctietze, to php
@ctietze@mastodon.social avatar

In #PHP, a language without a compiler, static checking via #PHPStan is really neat. I'm running this on the command line ever now and then to see whether I messed something up during a rename or refactoring. That's not as convenient as a type checker in an IDE like Xcode which is constantly running in the background, but it's bridging a lot of the gaps.

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

Working with global constants missed some essential parts in #PHPStan.

Starting with 1.10.60 I have implemented deprecations handling.

One less weak spot on your next php-src or userland library version upgrade.

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