You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure if this is a bug per se, but would be nice to address. Been noticing that custom fields won't autocomplete after the first call even though they have a "static" return type in the CustomFieldBehavior.
I noticed this commit switched the method return types back from \$this to static.
When testing locally if I use self instead of static i'm able to chain just fine.
I’m able to reproduce this. Even $this isn’t working quite right though – PhpStorm thinks the CustomFieldBehavior instance will be returned in that case, rather than the element.
What happened?
Description
Not sure if this is a bug per se, but would be nice to address. Been noticing that custom fields won't autocomplete after the first call even though they have a "static" return type in the
CustomFieldBehavior
.I noticed this commit switched the method return types back from
\$this
tostatic
.When testing locally if I use
self
instead ofstatic
i'm able to chain just fine.I'm using PHPStorm 2024.1.4
Steps to reproduce
Expected behavior
anotherField
should show up in the method completion window.Actual behavior
after typing
someField
, nothing else shows up in the completion window.Craft CMS version
5.2.4.1
PHP version
8.2
The text was updated successfully, but these errors were encountered: