barryvdh/laravel-ide-helper
66.4
Adequate · 26 September 2026
5k
lines of production code
PHP
primary language
3
measurements over time
What this system is
This system is a Laravel IDE helper package that generates PHPDoc blocks and metadata to provide autocompletion and type hints for Eloquent models, facades, and other framework components. It operates via console commands that scan the application to produce static helper files and IDE-specific meta data, supporting features like custom casts, relations, and dynamic method resolution. The tool is designed to integrate with various editors, including VS Code and PhpStorm, by outputting structured documentation that enhances developer productivity.
How it got here
2013–2020 — Laravel 11-13 modernization and test expansion
58 changes.
The project modernized its codebase by upgrading to PHP 8.2 and supporting Laravel 11 through 13, while refactoring to PSR-4 namespaces and standardizing code style with php-cs-fixer. New features included configurable IDE helper settings, Eloquent mixin generation, and meta file support, accompanied by the removal of legacy IDE helper components. A massive expansion of the test suite was conducted, introducing comprehensive snapshot testing for model generation, custom casts, relations, and various configuration options.
2021–2024 — Comprehensive test coverage and PHP template integration
22 changes.
This period focused on expanding test coverage for the ModelsCommand to support modern PHP features such as union types, enums, and advanced Eloquent casts, while also adding tests for pivot models and query scopes. Additionally, it introduced a new PHP templates module to provide IDE metadata for routes, views, and policies, enhancing autocompletion and navigation in VS Code.
2025–2026 — ModelsCommand test coverage expansion
6 changes.
This period focused on expanding test coverage for the ModelsCommand, specifically targeting PHPDoc generation for Eloquent scopes, relationships, and query methods. The work included adding regression tests for PHP 8 attributes and verifying correct handling of PHPStan imported types and soft-delete relations.
Features
Initial release of PHP templates for IDE integration
This change introduces a new set of PHP scripts in the php-templates directory designed to provide metadata for IDE tooling (specifically VS Code). These scripts scan the Laravel application to generate structured data for routes, middleware, configuration values, translations, views, and authorization policies, enabling features like go-to-definition and autocompletion. The package also includes MIT licensing and documentation noting its basis on the official Laravel VS Code extension.
php-templates · high confidence
Initial release of configurable IDE helper settings
Introduces a new \config/ide-helper.php\ file that allows users to customize the behavior of the IDE helper package. Key configuration options include setting custom filenames for the generated helper and models files, enabling or disabling the generation of fluent helpers, query methods, magic methods, and external builder methods, and controlling whether relation count/exists properties are written to model DocBlocks. Users can also specify model locations, ignore specific models, define model hooks for custom information, and configure extra classes and magic methods for IDE auto-completion support.
config · high confidence
New IDE helper and meta view templates for enhanced autocomplete
The package now ships with new \resources/views/helper.php\ and \resources/views/meta.php\ templates to improve IDE autocomplete. The helper view generates PHP classes for aliases, extended classes, and real-time facades, while also conditionally including a \Fluent\ class definition for migration helpers when the \include\_fluent\ config option is enabled. The meta view generates PhpStorm-specific metadata using the \override\ and \registerArgumentsSet\ functions to provide type hints for container bindings, config values, and specific method arguments, including support for testing mocks.
resources · high confidence
New console commands for Eloquent mixin and IDE generation
The \src/Console\ directory now includes \EloquentCommand\, \GeneratorCommand\, and \MetaCommand\ alongside the existing \ModelsCommand\. \EloquentCommand\ (ide-helper:eloquent) adds the \\Eloquent helper to the base Eloquent model. \GeneratorCommand\ (ide-helper:generate) produces the main IDE helper file, supporting options to include helper files, use an in-memory SQLite driver, generate only Eloquent methods, and optionally write Eloquent model mixins. \MetaCommand\ (ide-helper:meta) generates PhpStorm metadata files containing container bindings, configuration values, and expected arguments.
src/Console · high confidence
Removals
Removal of IDE helper configuration file
The configuration file for the IDE helper functionality (\src/config/config.php\) and its placeholder file (\.gitkeep\) have been removed from the project. This means the default settings for generating IDE helper files, such as the output filename and class alias mappings for Laravel facades, are no longer managed via this configuration file.
src/config · high confidence
Removal of legacy IDE Helper generator command
The \src/Barryvdh/IdeHelper/GeneratorCommand.php\ file, which previously provided the \ide-helper:generate\ console command for creating IDE helper files, has been removed. This eliminates the legacy functionality that generated static method stubs for Laravel aliases to support IDE autocompletion.
src/Barryvdh · high confidence
Behavioural changes
Refactored to PSR-4 namespace and added post-migration model helper generation
The library has been restructured to use the \Barryvdh\\LaravelIdeHelper\ namespace (PSR-4), moving the service provider to \src/IdeHelperServiceProvider.php\. A new \Eloquent\ helper generation command and listener have been added, allowing the IDE helper to automatically regenerate Eloquent model docblocks after database migrations via the \post\_migrate\ configuration option.
src · high confidence
Standardize code style with php-cs-fixer and unify repository configuration
The project replaces its previous coding standards tooling with php-cs-fixer, introducing \.editorconfig\ for consistent editor settings and \.php-cs-fixer.dist.php\/\.php-cs-fixer.tests.php\ for enforcing PSR-12 and custom style rules. Repository hygiene is improved by adding \.gitattributes\ to exclude development artifacts (tests, CI, config) from exports, updating \.gitignore\ to track cache files, and migrating the test runner to PHPUnit 10.5 via \phpunit.xml.dist\. Documentation is consolidated into a new \README.md\ (replacing the old \readme.md\), and the generated \\_IDE\_helper.php\ file is removed from the repository.
(repo-wide) · high confidence
Test coverage
Added base test class for ModelsCommand tests; Added regression tests for PHP 8 attributes before class declarations; Added snapshot test for Eloquent Model interface generation; Added snapshot test for FQCN generation in external Eloquent builder files; Added snapshot test for Laravel custom casts command; Added snapshot test for SoftDeletes model generation; Added snapshot tests for CustomDate and Ignored model commands; Added snapshot tests for Eloquent model getter type inference; Added snapshot tests for ModelsCommand reset behaviors; Added snapshot tests for PHPStorm inspection handling; Added snapshot tests for dynamic relationship model generation; Added snapshot tests for enum default arguments in PHPDoc generation; Added snapshot tests for union type handling in ModelsCommand; Added snapshot-based test for ModelsCommand getter functionality; Added test coverage for aliases, macros, DNF types, and real-time facades; Added test coverage for generating PHPDoc on final Eloquent models; Added test coverage for glob pattern support in model directory scanning; Added test fixture for Laravel 11 Authenticatable interface; Added test fixture for attribute getter type inference; Added test fixture for reset and smart-reset options; Added test fixtures for MagicWhere and RelationCountProperties; Added test fixtures for ModelsCommand migration scenarios; Added test fixtures for ModelsCommand scenarios; Added test fixtures for advanced collection casting; Added test fixtures for custom relation types; Added test fixtures for ignored model filtering; Added test for FQN generation in external files; Added test for ModelsCommand interface handling; Added test for SoftDeletes command; Added test for camelCase property generation in phpDoc blocks; Added test for custom PHPDoc tag preservation; Added test helper trait for custom relation types; Added test model for Laravel custom cast scenarios; Added test model for advanced Eloquent casts; Added test models for Eloquent relation variations; Added test models for mixin generation; Added tests for Eloquent Attribute handling in ModelsCommand; Added tests for Eloquent model cast type inference; Added tests for Eloquent query scope detection; Added tests for GeneratorCommand behavior and configuration; Added tests for Laravel custom cast type detection; Added tests for MagicWhere and RelationCountProperties command configurations; Added tests for Model Hooks; Added tests for Model Hooks functionality; Added tests for ModelsCommand basic and custom date scenarios; Added tests for ModelsCommand comment parsing and generics syntax configuration; Added tests for MorphTo intersection type handling; Added tests for MorphTo relationship phpDoc generation; Added tests for PHP 8 union types in ModelsCommand; Added tests for PHPStan imported type handling; Added tests for PHPStorm noinspection tag generation; Added tests for array cast comments in ModelsCommand; Added tests for custom collection support and FQN phpDoc generation; Added tests for custom relation types and nullable relationship enforcement; Added tests for disabling model query methods generation; Added tests for dynamic relationship resolution in ModelsCommand; Added tests for enum default arguments in PHPDoc generation; Added tests for external Eloquent builder PHPDoc generation; Added tests for factory name resolution and PHPDoc generation; Added tests for forced FQN phpDoc generation; Added tests for pivot model generation with custom pivot classes and accessors; Added tests for soft-deleted relationship phpDoc generation; Added tests for the --write-eloquent-helper command option; Added tests for the --write-mixin command output; Added tests for the Eloquent command; Added tests for the MetaCommand; Added tests for the ModelsCommand reset behavior; Added tests for the ignored\_models configuration option; Added tests for typed scope parameters in ModelsCommand; Added tests for variadic parameter support in the Models command; Snapshot test added for ModelsCommand relation count properties; Snapshot test for MagicWhere model generation; Snapshot tests added for Laravel custom cast type resolution; Snapshot tests for PHPDoc generation with FQCNs and new column types; Snapshot tests for advanced Eloquent cast types; Snapshot tests for basic PHPDoc generation; Updated snapshot tests for Eloquent relation nullability and composite keys.
Dependencies
Upgrade to Laravel 11-13 and PHP 8.2 with modernized tooling
The package now requires PHP 8.2 and supports Laravel 11.15, 12, and 13, dropping compatibility with older versions. It replaces the previous docblock library with \barryvdh/reflection-docblock\ and uses \composer/class-map-generator\ for autoloading, while switching static analysis from Psalm to Larastan and adopting PHPUnit snapshot assertions for testing.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.
Score
- CAI 44 → 66 (+22.8)
- Rubric changed (rubric-2026.08.15 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 90 → 80 (-9.6)
- Architecture 94 → 96 (+2.1)
- Maturity 55 → 55 (-0.7)
- Readiness 32 → 90 (+58.1)
- Security 35 → 68 (+32.3)
Resolved (20)
- Coverage not measured — test suite did not build
- Dimension evaluation failed
- Duplicated block (8 lines × 2) (src/Console/ModelsCommand.php)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- No exposed public API
- No tests found
- Test reliability not included
New (55)
- Alias.detectMethods (cognitive 34) (src/Alias.php)
- Dependency hygiene PARTLY measured — Composer dependencies read, no committed lock to grade for currency
- Documentation: no architecture or design documentation (README.md)
- Documentation: no usage examples (README.md)
- FileTooLong: Console/ModelsCommand.php (src/Console/ModelsCommand.php)
- Generator.detectDrivers (cognitive 16) (src/Generator.php)
- Generator.detectDrivers (cyclomatic 17) (src/Generator.php)
- Generator.getValidAliases (cognitive 16) (src/Generator.php)
- GeneratorCommand.handle (cognitive 19) (src/Console/GeneratorCommand.php)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- …and 35 more
Changes since last survey
- 3 commits — 2 feature/other, 1 fixes
By area
- tests/Console — 2 commits
- (root) — 1 commit
Notable commits
- fix: fix: resolve scope builder class against the model being documented (#1796)
- change: Add phpstan files to export-ignore in .gitattributes (#1799)
- change: Keep imported phpstan/psalm types unqualified (#1797)
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
barryvdh/laravel-ide-helper was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 26 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit f9521af2a0ed5ff1d70386cac3fae547a96be947 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-a9cd699f3cd5.