Search by

tenma / stubs

LentoLeisenfeld

Stubs of Tenma's PHP API (Tenma::serve(), Tenma\Http, Tenma\Fs, ...) for IDEs and PHPStan

0.1.3 2026-10-12 20:21 UTC

This package is auto-updated.

Last update: 2026-10-12 20:51:51 UTC


README

Stubs of Tenma's PHP API for IDEs and PHPStan.

Tenma embeds its PHP API (Tenma::serve(), Tenma::async(), Tenma\Http\Request, Tenma\Fs, ...) in its binary, so IDEs and static analysis don't know it on their own. This package describes it: signatures and doc comments, empty bodies.

composer require --dev tenma/stubs
  • PhpStorm, Intelephense: pick up tenma.php from vendor/, nothing else to do.

  • PHPStan: with phpstan/extension-installer the package's extension.neon is included automatically. Without it:

    includes:
        - vendor/tenma/stubs/extension.neon

The stubs are never autoloaded, so nothing changes at runtime: under Tenma the real classes are there, under FPM there is no Tenma class. Code that runs under both checks with class_exists(Tenma::class).

Updating

tenma.php is generated, don't edit it. With a Tenma binary of the version you want:

tenma --stubs > tenma.php

License

MIT or Apache-2.0, at your option: LICENSE-MIT, LICENSE-APACHE.