Search by

orisai / phpstan-trace

mabar

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

Statistics

Installs: 97

Dependents: 2

Suggesters: 0

Stars: 0

Open Issues: 0

v1.x-dev 2026-11-29 19:03 UTC

This package is auto-updated.

Last update: 2026-11-29 19:04:07 UTC


README

Orisai
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