Open driesvints opened 3 years ago
I now notice that this happening with most of the annotated classes from the Stripe PHP SDK. I'm guessing it's more wide spread of a problem.
there are "simple" bugs like
when I use something like this in my tests
/** @var CEClient $ceClient */
$ceClient = $this->mock(CEClient::class);
everything works
but if I use
/** @var CEClient $ceClient */
$ceClient = $this->mock(CEClient::class, function (MockInterface $mock) {
$mock->shouldReceive('createFulfillment')
->andThrow(new Exception('Exception occurred'));
});
It doesn't recognize the type correctly,
Describe the bug I have a method which returns an instance of
Stripe\StripeClient
. This class has several property annotations on it that indicate types returned by its magic__get
method. When I call this method it won't indicate these property types.To Reproduce
Subscription
class, hover over->subscriptionItems
and notice that no type is indicated meaning subsequent calls like the->create(
method are also not properly indicated/clickable.Expected behavior I'd expect Intelephense to indicate the proper type on the magic property and the ability to click-through to the typed object because it's annotated on the class.
Screenshots
The
stripe
method that I'm calling:And the subsequent
Cashier::stripe
method:The Stripe client is properly typed and I'm able to click-through:
But nothing appears when I hover over
subscriptionItems
:Platform and version macOS Big Sur 11.5.1 VS Code Intelephense v1.7.1