Commit 70adb48
committed
perf(build): remove vendor/ from PHAR — no production PHP dependencies
The project has zero PHP production dependencies (requires only php>=8.4).
All tools (PHPStan, Psalm, Rector, CS-Fixer, PHPUnit) are require-dev and
are called via the target project's vendor/bin/, not bundled in the PHAR.
The old build-phar.php was iterating the entire vendor/ tree (thousands
of files from PHPStan, Psalm, Rector, PHPUnit, CS-Fixer), causing ~50s
build times and a massive PHAR (~30 MB).
New approach: include only the 8 Composer autoload files needed to
bootstrap the classloader, plus src/ (38 files).
Result:
Before: ~50s build, ~30 MB PHAR
After: 0.07s build, 0.14 MB PHAR1 parent e86f018 commit 70adb48
1 file changed
Lines changed: 19 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
43 | 47 | | |
44 | 48 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
56 | 54 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | 55 | | |
67 | | - | |
| 56 | + | |
| 57 | + | |
68 | 58 | | |
69 | 59 | | |
70 | 60 | | |
| |||
0 commit comments