Toots for markusstaab@phpc.social account

Written by markus staab on 2025-01-31 at 10:53

Last few days I have built new #phpstan rules for our home grown MVC framework to detect unused view files and unused routing rules.

thanks for the inspiration Tomas Votruba - who did similar things for blade templates recently.

=> More informations about this toot | View the thread

Written by markus staab on 2025-01-30 at 05:59

PHP Annotated mentions 3 of my #PHPStan blog posts ๐Ÿ˜Ž

https://blog.jetbrains.com/phpstorm/2025/01/php-annotated-january-2025/

=> More informations about this toot | View the thread

Written by markus staab on 2025-01-14 at 16:44

new #phpstan rule of the day.

detects javascript syntax errors of scripts inlined in php source files

=> View attached media | View attached media

=> More informations about this toot | View the thread

Written by markus staab on 2025-01-09 at 11:19

named arguments in #php are unnecessary/useless in most scenarios.

use them as spare as possible.

thankfully there is a no-named-arguments-phpdoc which instruct static analysis to warn about some examples of misuse.

we discuss a new php-cs-fixer rule: https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/discussions/8359

=> More informations about this toot | View the thread

Written by markus staab on 2025-01-04 at 19:20

Its one of these days again. lets see whether we can get #phpstan a bit faster for some slow edge cases

10x Faster constant array processing ๐Ÿš€

=> View attached media

=> More informations about this toot | View the thread

Written by markus staab on 2025-01-02 at 11:59

My recent improvements to #phpstan loose-comparison already pay off :-)

=> View attached media

=> More informations about this toot | View the thread

Written by markus staab on 2024-12-30 at 12:36

Just released a new version of #phpstandba which reduces overhead in big projects up to ~ 50%

https://github.com/staabm/phpstan-dba/releases/tag/0.3.2

=> View attached media

=> More informations about this toot | View the thread

Written by markus staab on 2024-12-22 at 12:53

To speedup the #feedbackloop when contributing to #phpstan, I have added a new bash alias, which might also be useful for you.

the nsrt command will run all NodeScopeResolverTests and start with those which failled in the previous run.

copy/paste at https://github.com/staabm/dotfiles/blob/de19ac1807d0c86fcc028938b08fc068c1f6e2b3/phpstan/aliases.zsh#L1

=> View attached media

=> More informations about this toot | View the thread

Written by markus staab on 2024-12-17 at 17:35

Todays #phpstan release is loaded with improvements again.

For those extra strict people:

when strict-rules installed and bleeding-edge enabled, phpstan-phpunit will report calls to assertEquals() which can be replaced with assertSame().

(to prevent loose comparisons)

=> View attached media

=> More informations about this toot | View the thread

Written by markus staab on 2024-12-17 at 07:21

Fixed #regex type detection in #phpstan for the x-modifier when #-comments are contained in the pattern

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

=> View attached media

=> More informations about this toot | View the thread

Written by markus staab on 2024-12-16 at 21:35

My wrapped year

=> View attached media

=> More informations about this toot | View the thread

Written by markus staab on 2024-12-11 at 14:23

Summarized my #opensource #contributions of 2024 in my todays blog post..

547 merged pull requests across 80 open-source projects.. not to bad ;)

https://staabm.github.io/2024/12/11/contribution-summary-2024.html

=> More informations about this toot | View the thread

Written by markus staab on 2024-12-06 at 11:31

Just made @votrubaT unused-public #phpstan package recognize register_shutdown_function

https://github.com/TomasVotruba/unused-public/pull/139

=> More informations about this toot | View the thread

Written by markus staab on 2024-12-05 at 22:03

@jensimmons could someone at apple safari team have a look at this safari/iOS/macOs only problem with paypal?

https://github.com/paypal/paypal-js/issues/461

=> More informations about this toot | View the thread

Written by markus staab on 2024-11-30 at 14:05

need for #speed

[#]phpstan

fix was a one line change :-)

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

=> View attached media

=> More informations about this toot | View the thread

Written by markus staab on 2024-11-28 at 07:38

In my experience most projects set up PHPStan only for a few PHP versions and ignore the rest, which leaves a lot of potential errors undetected.

Let me work on PHPStan to iterate on this use-case so your next PHP version upgrade will be easier and contain less hurdles.

=> More informations about this toot | View the thread

Written by markus staab on 2024-11-28 at 07:38

If you want to cover your codebase cross several PHP versions, you need to set up a CI matrix with different PHP versions. You also need multiple PHPStan baselines to ignore errors which are only relevant for a specific PHP version. Such a setup brings additional complexity not everyone is willing to deal with.

=> More informations about this toot | View the thread

Written by markus staab on 2024-11-28 at 07:38

My new focus area will be improving the #PHPStan story around multi #php-version supporting code. This means focusing on stuff which is different between PHP versions.

I want to help you figure out the challenges of your next PHP upgrade: ๐Ÿ‘‡๐Ÿงต

https://staabm.github.io/2024/11/28/phpstan-php-version-in-scope.html

=> More informations about this toot | View the thread

Written by markus staab on 2024-11-26 at 11:30

For years I am working on improving #phpstan type inference with a focus on mixed types.

I will start to focus on a different area soon, so I thought it would be a good time to summarize the achievements made.

https://staabm.github.io/2024/11/26/phpstan-mixed-types.html

=> More informations about this toot | View the thread

Written by markus staab on 2024-11-22 at 16:23

Friday afternoon highlight:

Found the cause of our static analysis sometimes reporting super strange results because of "wrong" reflection information.

Turns out one of the dependencies had a same-named test-class and the test-classes were forgotten to be git export-ignored

=> More informations about this toot | View the thread

=> This profile with reblog | Go to markusstaab@phpc.social account

Proxy Information
Original URL
gemini://mastogem.picasoft.net/profile/109324863619385617
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
408.076496 milliseconds
Gemini-to-HTML Time
7.835281 milliseconds

This content has been proxied by September (3851b).