tenma / stubs
Stubs of Tenma's PHP API (Http\Server, Threading\Task, FileSystem, Data, ...) for IDEs and PHPStan
Requires
- php: >=8.5
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-31 19:24:13 UTC
README
Stubs of Tenma's PHP API for IDEs and PHPStan.
Tenma embeds its PHP API (Http\Server, Http\Request, Threading\Task, FileSystem\FileInfo, Data\Postgres, ...) 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, PHP Tools: pick up
src/fromvendor/, nothing else to do. One file per class, in folders by namespace. -
PHPStan: with
phpstan/extension-installerthe package'sextension.neonis 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 they are missing. Code that runs under both checks with class_exists(\Http\Server::class, false).
Updating
src/ is generated, don't edit it. Every Tenma release regenerates it. By hand, with a Tenma binary of the version you want:
rm -rf src && tenma --stubs src
License
MIT or Apache-2.0, at your option: LICENSE-MIT, LICENSE-APACHE.