orisai / phpstan-trace
Path-sensitive tracing of PHP code for PHPStan extensions
Package info
github.com/orisai/phpstan-trace
Language:Shell
Type:phpstan-extension
pkg:composer/orisai/phpstan-trace
Requires
- php: 7.4 - 8.6
- phpstan/phpstan: ^2.3.6
Requires (Dev)
- brianium/paratest: ^6.3.0
- nikic/php-parser: ^5.9.0
- orisai/coding-standard: ^3.0.0
- phpstan/extension-installer: ^1.4.0
- phpstan/phpstan-deprecation-rules: ^2.0.5
- phpstan/phpstan-phpunit: ^2.0.6
- phpstan/phpstan-strict-rules: ^2.1.1
- phpunit/phpunit: ^9.5.0
- staabm/annotate-pull-request-from-checkstyle: ^1.7.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-29 19:04:07 UTC
README
PHPStan Trace
Path-sensitive tracing of PHP code for PHPStan extensions
💸 If you like Orisai, please make a donation. Thank you!
Not released yet. The code was extracted from orisai/phpstan-nette on 2026-11-29. Nothing is released, everything may change.
The framework-neutral core for PHPStan extensions which follow what code does across methods and files: a path-sensitive, interprocedural walk over method bodies and file-level scripts, with hooks through which an extension says what matters for its domain, and stores of the traced answers with the files they depend on. It is shared by orisai/phpstan-nette and orisai/phpstan-spaghetti; it knows nothing of a framework.
Installation
An extension built on the core requires it; once released:
composer require orisai/phpstan-trace
Configuration
The extensions built on the core include its extension.neon. Its options, with their defaults:
parameters: orisai: trace: packageType: null # project or library; null reads the type of the root composer.json testPaths: null # your test code; null reads the root composer.json's autoload-dev paths traceModelledBodies: false # trace the bodies a model replaces instead of running the models buildWorkers: null # processes of the build before the analysis; null as many as PHPStan's own
Your code (first-party, traced) is the paths of your configuration.
Development
make update # install the dependencies make profile PROFILE=php74 # install a dependency profile of tools/profiles into vendor-<name> make cs # coding standard (make csf fixes) make lint # parse src and tests on PHP 7.4 make phpstan # static analysis make tests # tests, make tests PROFILE=<name> with a profile make tests-profiles # tests with every profile make gates && make gates-check # run and record every gate on HEAD, see docs/internals/gates.md