-
-
Notifications
You must be signed in to change notification settings - Fork 39
PHPStorm (Meta) Issues
Mark Sch edited this page Jan 6, 2021
·
6 revisions
Maybe those will be solved soon...
- SOLVED https://youtrack.jetbrains.com/issue/WI-52799 Trait issues
- https://youtrack.jetbrains.com/issue/WI-52508 Quoting issues
// behaviors() = BehaviorRegistry class (extending ObjectRegistry which has that method)
$foo = $this->behaviors()->get('Foo');
// returns mixed instead of \App\Model\Behavior\Foo
I would expect the meta file to be valid, as extension allows us to use the parent's "get" method.
Here is the non-working meta file:
override(
\Cake\ORM\BehaviorRegistry::get(0),
map([
'Foo' => \App\Model\Behavior\FooBehavior::class,
])
);
Using \Cake\Core\ObjectRegistry::get(0)
directly works, by the way.
But since that is too generic, we have collisions here for the "Foo" string, so this is not applicable.
Property access works because of the CodeCompletion file:
$foo = $this->behaviors()->Foo;
// Correct return type