-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Non existent attribute types #97
Comments
Same problem here. My initial guess is that this map needs to be expanded: vs-code-extension/src/support/docblocks.ts Line 211 in 9b69eea
The invalid type that I encountered is |
Okay, so I think there are multiple issues at play here:
Besides adding more of the common data types, perhaps it would be beneficial that |
How is this looking in v0.1.19? |
I'm having the same problem with final class RoleData extends Data
{
public function __construct(
#[Max(50)]
public string $name,
/** @var Lazy|Collection<int, PermissionData> */
public Lazy|Collection $permissions
) {}
public static function fromModel(Role $role): self
{
return new self(
$role->name, // Expected type 'string'. Found 'App\Models\varchar'.intelephense(P1006)
Lazy::create(fn () => PermissionData::collect($role->permissions))
);
}
} // _model_helpers.php
/**
* App\Models\Role
*
* @property \Illuminate\Support\Carbon|null $updated_at
* @property \Illuminate\Support\Carbon|null $created_at
* @property varchar $guard_name
* @property varchar $name
* @property int $id
* ...
*/
class Role extends \Illuminate\Database\Eloquent\Model
{
//
} |
Extension Version
0.1.14
PHP Binary
Sail
Operating System
Windows
What happened?
When the extension is running, some of the model attributes are typed with non-existent types. In my particular case, with an "App\Models\date" and "App\Models\smallint" types.
I use
bmewburn.vscode-intelephense-client
in addition to Laravel extension.Mimimal Code Sample
The text was updated successfully, but these errors were encountered: