#PhpStan

Emanuele Panzthepanz@phpc.social
2025-12-13

Found @sebastian 's article phpunit.expert/articles/path-c very informative on presenting both approaches, well done!

About performances: in my experience Path-Coverage required less time than running the mutation test suite (which includes #phpstan to kill mutants, thanks to @markusstaab IIRC).

Excluding some mutations (ex: on logging methods) never got to a point where Infection was faster than phpunit+coverage.

Maybe I missed something? How do you configure Infection?
#php #infectionPHP #phpunit

2025-12-09

#phpunit code coverage xml report generation .. phpunit 11.5.x vs phpunit 12.5.x on the #phpstan codebase.

My recent work comes to fruition

2025-12-04

Oh PHPStan!

array<non-empty-string, array<Header>>
does not accept
non-empty-array<string, array<Header>>

It's almost all the right words! Just in a slightly different order....

C'm on!

πŸ™ˆ

#php #phpstan

2025-12-04

We released 1.1.0 of event-sourcing-phpstan-extension! See here for the changelog: github.com/patchlevel/event-so
#PHP #DDD #EventSourcing #PHPStan

Emanuele Panzthepanz@phpc.social
2025-11-27

@brammm on "You don't need LLM to refactor your code, use #rectorphp"

Notable mention for #Phpstan too! :elephpant:

#symfonycon #symfonycon2025 #php

2025-11-27

Projects using #composerphp "autoload-files" in their composer.json will see some speedup when analzed with #phpstan, starting with the next phpstan release.

2025-11-25

#Achievement unlocked.

Used a feature in #phpstan, even @OndrejMirtes did not know it exists :-)

2025-11-21

Irgendwie befriedigend dieses GefΓΌhl von #phpstan

threadithreadi
2025-11-20

Kleines aber wichtiges Update des von mir betreuten Plugins ProvenExpert: es ist nun voll mit WordPress 6.9 kompatibel. Zudem hat es Level 8 bestanden. de.wordpress.org/plugins/prove

2025-11-15

I just put togehter a brief article which describes everthing new and noteworthy we shipped with the recent #phpstan #phpunit 1st party integration package

staabm.github.io/2025/11/15/ph

2025-11-14

Do you use constant-arrays in array_merge() in a mix with dynamic arrays (e.g. user input) to enforce certain offsets exist?

#PHPStan did not realize offsets will always be contained in the result.
Proposed a fix today, so PHPStan remembers the offset keys.

jpoesen | πŸ‡ͺπŸ‡Ί | πŸ³οΈβ€πŸŒˆjpoesen@drupal.community
2025-11-09

Happy Sunday, #Drupal and #PHPStan friends.

Question: when trying to get past PHPStan rule level 5, I get complaints about arrays when used as param or return type.

➑️ phpstan.org/blog/solving-phpst

Is there a Drupally consensus for typehinting these?

e.g this makes PHPStan happy but what do I know?

/**
* Implements hook_form_alter().
*
* @param $form string[]
*/
mymodule_form_alter(&$form, FormStateInterface $form_state, $form_id) { ... }

Bernhard Schmittnezaniel@neos.social
2025-11-02

Integration passes #PHPStan level 9, writing #Behat tests for rendering and caching is a breeze...

Next steps:
* documentation
* improved transpilation error handling
* extension point for the delegation mechanism for #NeosCMS , e.g. for the future OPGM (Object-Propery Graph-Mapper)
* transpilation from .cpx to TypeScript for isomorphic rendering
* a language server for #PHPStorm etc.
* you name it

2025-10-29

I kind of envy the java world. They have the alternatives on the IDE landscape and also the static analysis that are built-in are way better. In #php we still get #phpstan #psalm that do excelent job, but there are some corner scenarios that "the other kids toys" are better.

2025-10-27

This usually means my #phpstan contribution will make your life a lot easier

quote: BTW I love this, it's genius :) - Ondrej Mirtes
2025-10-17

In the near future #phpstan will error about your invalid #phpunit dataproviders data πŸ₯°

A PHPStan rule erroring about problems in PHPUnit dataprovider data
2025-10-15

As soon as your #phpstan pull request fixes a 4-digit bug, you know you made someone happy waiting for this thing for a few years already.

just a tiny change for a more recent bug, but issue-bot told me it will make more people happy :)

2025-10-14

Started cooking a new #phpstan builtin rule which detects problems in #phpunit dataprovider data. πŸ‘¨β€πŸ³

I am already in love with it πŸ˜…

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst