Skip to content

feat: add ide helper for better type checks#20

Open
glitchedmob wants to merge 6 commits into
mainfrom
levi/ide-helper
Open

feat: add ide helper for better type checks#20
glitchedmob wants to merge 6 commits into
mainfrom
levi/ide-helper

Conversation

@glitchedmob
Copy link
Copy Markdown
Member

@glitchedmob glitchedmob commented May 2, 2026

Add laravel-ide-helper so facades, fluent helpers, and Eloquent models have proper type annotations for both IDE autocompletion and static analysis.

  • Add barryvdh/laravel-ide-helper for generating docblocks
  • Generate _ide_helper.php with facade/fluent/Eloquent helpers (committed)
  • Generate model PHPDocs directly into source files with all properties nullable
  • Create ForceNullablePropertiesHook to auto-nullify model properties on generation
  • Run rector + pint after ide-helper regeneration to keep generated code lint-clean
  • Fix DropboxAuthController for nullable model properties (?? '', ?? null)
  • Exclude _ide_helper.php from phpstan and pint

@ThingEngineer
Copy link
Copy Markdown
Contributor

ThingEngineer commented May 13, 2026

This was all I could find: adding @composer ide-helper to post-update-cmd might cause surprise failures during composer update, especially on machines/CI where the app DB/env isn’t fully ready yet. It also means dependency updates can rewrite model docs/helper files and leave a dirty working tree unexpectedly. Maybe keep IDE helper generation opt-in (or at least gated to local/dev) so composer update stays predictable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants