Download the PHP package revund/php-worker without Composer
On this page you can find all versions of the php package revund/php-worker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download revund/php-worker
More information about revund/php-worker
Files in revund/php-worker
Package php-worker
Short Description Revund's PHP AST sidecar — implements the universal revund.worker.v1.Worker gRPC contract using nikic/PHP-Parser.
License Apache-2.0
Homepage https://revund.dev
Informations about the package php-worker
revund/php-worker
The PHP AST sidecar for Revund. A gRPC server that
implements revund.worker.v1.Worker — the universal contract every
Revund worker speaks. Built on
nikic/PHP-Parser.
Install
You also need the grpc PECL extension and the revund
CLI itself. The CLI discovers revund-php-worker on PATH and spawns it
on demand.
Usage
The worker is normally launched by the Revund CLI. To run it standalone (for debugging or to share a single instance across reviews):
Point the CLI at it via the REVUND_WORKERS env var (plain
host:port — the CLI calls Describe to learn the worker's
languages and capabilities):
What it does
The worker advertises one capability via the Describe RPC:
| Capability | RPC | Purpose |
|---|---|---|
parse |
Parse |
Returns the universal ParsedFile shape — use imports, top-level decls (class / interface / trait / enum / function), method+function bodies (with cyclomatic complexity, hash, canonical hash, blocks), and concern evidence (Presentation/State/Network/IO/Config/Business/DataAccess/Transport). |
ResolveSymbols and RunDiagnostics are not implemented yet — the Revund CLI checks the capability list from Describe and skips RPCs the worker hasn't advertised.
Environment
| Variable | Default | Purpose |
|---|---|---|
REVUND_PHP_WORKER_PORT |
50052 |
Bind port. Use 0 for OS-assigned (recommended when the CLI spawns the worker). |
Contract
The wire contract is defined in
proto/worker.proto, vendored inside the
package. Generated PHP stubs land under proto/Revund/Worker/V1/
(built from the .proto via the composer proto script).
License
Apache-2.0
All versions of php-worker with dependencies
nikic/php-parser Version ^5.0
grpc/grpc Version ^1.57
google/protobuf Version ^4.33.6