Skip to content

Commit e69dcb5

Browse files
ondrejmirtesclaude
andcommitted
Lead turbo-ext README with user-facing installation notes
Most users get the extension automatically from the phpstan/phpstan Composer package; PIE is only for running phpstan.phar manually outside of Composer. The existing content moves under a Developer notes headline. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vuNxwtFCEJYsooPPgidPp
1 parent 905142c commit e69dcb5

1 file changed

Lines changed: 35 additions & 5 deletions

File tree

‎turbo-ext/README.md‎

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,40 @@
11
# phpstan_turbo — native acceleration extension for PHPStan
22

3-
**Experimental.** A plain Zend C++ extension (no framework dependencies)
4-
that reimplements PHPStan's hottest code paths natively. It is entirely optional:
5-
PHPStan behaves identically without it, just slower. With the extension
6-
loaded, analysis output is bit-for-bit identical — only faster (~25% on
7-
PHPStan's own single-threaded self-analysis).
3+
**Experimental.** A native extension that reimplements PHPStan's hottest
4+
code paths in C++. It is entirely optional: PHPStan behaves identically
5+
without it, just slower. With the extension loaded, analysis output is
6+
bit-for-bit identical — only faster (~25% on PHPStan's own single-threaded
7+
self-analysis).
8+
9+
## Installation
10+
11+
**Most users do not need to install anything.** The
12+
[phpstan/phpstan](https://github.com/phpstan/phpstan) Composer package ships
13+
prebuilt binaries for the most common platforms — Linux (glibc and musl,
14+
x86_64 and arm64), macOS, and Windows (x86_64), for PHP 8.3 and newer — and
15+
PHPStan automatically loads the one matching your runtime into its worker
16+
processes.
17+
18+
Installing the extension with [PIE](https://github.com/php/pie) is only
19+
needed when you download and run `phpstan.phar` manually, outside of
20+
Composer (the prebuilt binaries ship next to the phar in the Composer
21+
package, not inside it):
22+
23+
```bash
24+
pie install phpstan/turbo
25+
```
26+
27+
Useful to know:
28+
29+
- `vendor/bin/phpstan diagnose` reports the extension's status.
30+
- `PHPSTAN_TURBO=0` turns it off.
31+
- The extension only activates when its version matches the one your PHPStan
32+
release expects — on a mismatch PHPStan prints a note and runs without it,
33+
so an outdated extension can never affect results, only speed.
34+
35+
# Developer notes
36+
37+
A plain Zend C++ extension, no framework dependencies.
838

939
## How it works — the stub-shadowing pattern
1040

0 commit comments

Comments
 (0)