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 to static.
When testing locally if I use self instead of static i'm able to chain just fine.
I'm using PHPStorm 2024.1.4
Steps to reproduce
- Open up a craft installation in php storm.
- Type the following:
$entry = new Entry();
$entry->someField('value')->anotherField('value');
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
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
\$thistostatic.When testing locally if I use
selfinstead ofstatici'm able to chain just fine.I'm using PHPStorm 2024.1.4
Steps to reproduce
Expected behavior
anotherFieldshould 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