Search by

k-kinzal / deriver

kinzal

Derive PHP values, state and dependencies without executing application code

dev-main 2026-10-19 10:29 UTC

This package is auto-updated.

Last update: 2026-10-19 10:29:22 UTC


README

Packagist Downloads PHP Version License: MIT Docs Ask DeepWiki

Deriver finds candidate values of PHP expressions without executing application code. Results retain unresolved inputs and the evidence behind each candidate.

Candidates describe value alternatives without proving that their control-flow conditions hold. For example, return false ? 1 : 2 yields both 1 and 2. Conditions and loop counts are not evaluated merely to select candidates. Applications can supply evaluators or evaluate and filter the returned candidates themselves. See candidate dependencies.

Requirements

  • PHP 8.1+

Getting Started

$ composer require --dev k-kinzal/deriver
$ vendor/bin/deliver --help
Description:
  Derive candidate values from PHP source without executing it.

Usage:
  deliver [options] [--] <query>

Arguments:
  query                          Selector, for example App\answer#return.

Options:
  -c, --config=CONFIG            Load a YAML configuration file.
      --path=PATH                Search root; repeat for multiple directories. Defaults to the current directory. (multiple values allowed)
      --include=INCLUDE          Root-relative include wildcard; repeat to combine patterns. Defaults to **/*.php. (multiple values allowed)
      --exclude=EXCLUDE          Root-relative exclude wildcard; exclusions win. (multiple values allowed)
      --php-version=PHP-VERSION  Target PHP major.minor version; defaults to the library setting.
      --format=FORMAT            Report format: text or json. Defaults to text.
  -h, --help                     Display help for the given command. When no command is given display help for the deliver command
  -q, --quiet                    Do not output any message
  -V, --version                  Display this application version
      --ansi|--no-ansi           Force (or disable --no-ansi) ANSI output
  -n, --no-interaction           Do not ask any interactive question
  -v|vv|vvv, --verbose           Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

See the command line, configuration, queries, and reports.

License

MIT License. See LICENSE for details.