php-stubs/generator
Generate PHP stub files from your codebase for better IDE autocomplete, static analysis, and documentation. php-stubs/generator scans sources and produces lightweight stubs suitable for packages and frameworks, helping consumers get accurate type hints without shipping full sources.
For executives: This is a low-cost, MIT-licensed developer-productivity tool, not a customer-facing feature. It can reduce manual stub work and improve IDE/static-analysis coverage for legacy or vendor PHP code, with no runtime performance impact. Because adoption signals are limited, propose a small pilot on one Laravel module and measure PHPStan/Psalm error reduction, IDE completion coverage, and onboarding friction before broader rollout.
For engineering: The package generates stub declarations from existing PHP code via CLI or PHP API, supports output files and symbol-type filtering, and can feed PHPStan, Psalm, and IDE completion. Integrate it into CI for targeted legacy/vendor directories, pin the version, define regeneration ownership, and validate generated stubs with tests. Use Laravel IDE Helper or manual stubs where framework magic is the gap; use this generator where the gap is missing declarations in ordinary PHP code.
How can I help you explore Laravel packages today?