The 0.9.0 release notes say the authenticated user resolves to the model configured in config/auth.php. On a Laravel 13 / PHP 8.5 project with a stock auth configuration ('model' => env('AUTH_MODEL', User::class), default web guard with the session driver and users provider), none of the spellings resolve to the configured model:
auth()->user() → Method 'user' not found on class 'Illuminate\Contracts\Auth\Factory' (unknown_member)
Auth::user()-><modelMethod>() → Method '…' not found on class 'Illuminate\Contracts\Auth\Authenticatable'
$request->user() → types as mixed (silent, but no model members available)
To reproduce: run phpantom_lsp analyze routes/web.php against any file containing auth()->user(). The same diagnostics appear via the LSP in Zed (PHP extension, phpantom 0.9.0). Writing the model as a fully qualified class name in the config makes no difference, and there is no .phpantom.toml present.
Possibly relevant: Laravel 13's auth() helper has a native AuthFactory|Guard return type in addition to the conditional @return docblock. The diagnostic naming Factory suggests the conditional docblock's null branch is being resolved correctly, but the configured-model special case never engages.
The 0.9.0 release notes say the authenticated user resolves to the model configured in
config/auth.php. On a Laravel 13 / PHP 8.5 project with a stock auth configuration ('model' => env('AUTH_MODEL', User::class), defaultwebguard with thesessiondriver andusersprovider), none of the spellings resolve to the configured model:auth()->user()→Method 'user' not found on class 'Illuminate\Contracts\Auth\Factory' (unknown_member)Auth::user()-><modelMethod>()→Method '…' not found on class 'Illuminate\Contracts\Auth\Authenticatable'$request->user()→ types asmixed(silent, but no model members available)To reproduce: run
phpantom_lsp analyze routes/web.phpagainst any file containingauth()->user(). The same diagnostics appear via the LSP in Zed (PHP extension, phpantom 0.9.0). Writing the model as a fully qualified class name in the config makes no difference, and there is no.phpantom.tomlpresent.Possibly relevant: Laravel 13's
auth()helper has a nativeAuthFactory|Guardreturn type in addition to the conditional@returndocblock. The diagnostic namingFactorysuggests the conditional docblock's null branch is being resolved correctly, but the configured-model special case never engages.