Claas Augner
Claas Augner
@clientenq A fix has landed and should be in the next Nightly release., see: https://bugzilla.mozilla.org/show_bug.cgi?id=1783542
> i.e. you would just remove the "buildng type" quest @kmpoppe Unfortunately, that is/was not an option in the situation I found myself in. I *was* answering "building type" quests,...
Seems to be a known issue: https://github.com/psalm/psalm-plugin-laravel/blob/723221a6c28676717adc53f02136790de1c4a161/tests/acceptance/EloquentRelationTypes.feature#L335-L348
And here's the related commit by @mr-feek: 71360de9cb12cd63a968d32c27e95b001097664e
According to a local `git bisect`, 71a93c472c398fe62bf0d3c0d6ad1e281320f87f is the culprit: ``` 71a93c472c398fe62bf0d3c0d6ad1e281320f87f is the first bad commit commit 71a93c472c398fe62bf0d3c0d6ad1e281320f87f Author: Matthew Brown Date: Mon Oct 19 20:24:26 2020 -0400 Support...
It looks like the `MethodReturnTypeProviderInterface` is called with different parameters: **Previously**, the `$method_name_lowercase` was `__call`, but now it's `orderby` which causes these `->methodExists` to both return `false`: https://github.com/psalm/psalm-plugin-laravel/blob/723221a6c28676717adc53f02136790de1c4a161/src/Handlers/Eloquent/RelationsMethodHandler.php#L60-L61 Accordingly, the...
Here's the current (failing) output: ```php array:3 [ "stmt" => PhpParser\Node\Expr\MethodCall^ {#446775 +var: PhpParser\Node\Expr\Variable^ {#446776 +name: "relationship" #attributes: array:3 [ "startLine" => 30 "startFilePos" => 1235 "endFilePos" => 1247 ]...
I dumped a bit and found that the `Psalm\Internal\Analyzer\Statements\Expression\Call\Method\AtomicMethodCallAnalysisResult` actually has two `existent_method_ids`: ``` 0 => "Illuminate\Database\Eloquent\Relations\HasOne::orderby" 1 => "Illuminate\Database\Eloquent\Relations\HasOne::__call" ``` So maybe Psalm thinks that `orderby` actually exists, so...
@deleugpn I'm wondering if you still have this issue? If so, I would recommend checking if you could declare your request attributes as `@property`s (that's how I do it): ```php
I'm sorry to hear that, but maybe you might want to give it another try in about one month? These days, I have resolved a couple of annoying issues, and...