This article is based on the GitHub repository READMEs and source code. All three packages are still in Beta ahead of a formal release (as of April 2026).
Latest release status (April 2026)
Overview
Entering 2026, Laravel has published three packages related to code analysis. Each can be used on its own, but together they form a code analysis ecosystem.
Let’s look at each package in detail.
laravel/surveyor — the static analysis engine
laravel/surveyor is a static analysis tool that parses PHP files and provides detailed metadata about classes, methods, properties, return types, and more in a structured form. It’s specialized in extracting information in a form other tools and packages can consume.Installation
Basic usage
Analyze a file
Analyze a class directly
Information available from ClassResult
Type system
Surveyor has a rich type system that structures PHP types.Cache configuration
You can cache analysis results to improve performance on repeated runs.Eloquent model analysis
Surveyor treats Eloquent models specially by trying to connect to the database. Model relationships, attributes, accessors, and casts are also detected.Because Surveyor attempts to connect to the database when analyzing Eloquent models, it’s not purely static analysis. Performance and memory usage are also under active improvement, and contributions are welcome.
laravel/ranger — high-level introspection
laravel/ranger wraps surveyor to provide a high-level library that walks through your entire Laravel application and collects information on routes, models, enums, broadcast events, environment variables, Inertia components, and more.Installation
Basic usage
Use callbacks to describe what should happen when each component is discovered.Components Ranger collects
laravel/roster — a package detection tool
laravel/roster is a tool that detects which Laravel ecosystem packages are installed in a project. Package developers and tool authors can easily answer questions like “does this project use Inertia?” and “which Livewire version is installed?”Installation
Basic usage
Real-world use cases
AI guideline generation tool (Boost)
Laravel Boost uses roster to understand the installed package layout and automatically tune the guidelines and skills it generates for AI agents (like GitHub Copilot and Claude). Based on facts such as “does this project use Inertia?” and “is Livewire installed?”, it selects the appropriate guideline files and supplies them to the AI agent.Building a package compatibility checker
If you’re developing a package that behaves differently depending on which packages are installed in the user’s project, roster is very useful.Automatic application documentation generation
With ranger, you can build a tool that automatically collects routes, models, and enums from a Laravel app and generates documentation.Summary
surveyor, ranger, and roster provide a new foundation for programmatic code analysis in the Laravel ecosystem. These packages are aimed primarily at package developers and tool authors—they aren’t intended for direct use by end users. Even so, they’re actively used inside official Laravel tools like Laravel Boost, and ecosystem adoption is expected to grow.laravel/surveyor
Static analysis engine for PHP code
laravel/ranger
High-level introspection library
laravel/roster
Package detection tool