markus staab

@markusstaab@phpc.social
257 Followers
31 Following
1,079 Posts
software development with passion - open-source lover, creator of staabm/phpstan-dba, excessive freetime @phpstan, @rectorphp and @phpunit contributor
Bloghttps://staabm.github.io/
GitHubhttps://github.com/staabm
Twitterhttps://twitter.com/markusstaab

#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

#Achievement unlocked.

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

Looks like @phpunit xml-report code-coverage generation could get nearly twice as fast in the future.

this would for example considerably reduce overhead of the necessary "initial-test" step when running @infection_php on your project.

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.

For a few days I am using the vacation from my primary job to improve @phpunit code coverage performance.

After a few micro optimizations I finally found something substantial.

Proof of concept is 33% faster

https://github.com/sebastianbergmann/php-code-coverage/pull/1105

@derickr is it possible to implement a method in php userland, so xdebug will pickup the string returned and use it in the debugger ?

I would love customizing this string representation as it would save me from constantly expand/collaps this elements in the phpstorm panel

in case you want to debug-log information for source code which is not easily accessible (e.g. because it is contained in a .phar-file), put your logging statement into a always-false conditional-break-point from within your IDE.

#debugging #protip #php

This usually means my #phpstan contribution will make your life a lot easier
A recent collaboration with @Romm on a slow case when mapping big amounts of data with #valinor sparked some nice discussions and a todays release which is ~50% faster on said example.
In the near future #phpstan will error about your invalid #phpunit dataproviders data 🥰