laravel-ide-helper
laravel-ide-helper copied to clipboard
New Laravel attributes are not correctly recognized when method is protected
Versions:
- ide-helper Version: 2.12.3
- Laravel Version: 9.29.0
- PHP Version: 8.1
Description:
Only public and type casted get/set methods attributes are detected.
But, according to https://laravel.com/docs/9.x/eloquent-mutators mutator method should be protected.
Also, it would be nice if ide helper supported the generic attribute declaration, like that:
/**
* Name attribute.
*
* @return \Illuminate\Database\Eloquent\Casts\Attribute<string, never>
*/
protected function name(): Attribute
{
return Attribute::make(
get: fn () => 'foo',
);
}
if the get/set methods do not have a return type specified.