question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PhpStorm Autocomplete not working in closures

See original GitHub issue

The biggest hurdle preventing me from using PEST everywhere is that PhpStorm doesn’t seem to know what $this is inside pest test closures.

Is this an issue with my configuration?

Check: image

Because of the issue, I cannot autocomplete assertions on responses either. image

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
ostarkcommented, Jul 26, 2022

I noticed the same when using uses(class)->in(__DIR__).

uses(class)->in('./') fixed it for me.

1reaction
scheMeZacommented, Jul 31, 2022

That worked for me, thank you 😃

I had mine set to: uses(TestCase::class)->in('./Features'); uses(TestCase::class)->in('./Unit');

Switching to uses(TestCase::class)->in('./'); fixed IntelliSense for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

phpStorm 7 Code completion stopped working - Stack Overflow
I closed phpstorm and removed the .idea folder in the filesystem. I then renamed the project folder and reopened it. Autocomplete was now...
Read more >
PHP autocomplete not working – IDEs Support (IntelliJ Platform)
Using PHPStorm 10.0.3 and my PHP code completion has stopped working. For exmaple, if I start typing out a `foreach()` loop, nothing...
Read more >
Autocomplete no longer working on PHPStorm 2018.3 #1266
Hi, Since the latest release of PHPStorm it seems the autocomplete for repository methods, entity manager methods seems to no longer be ...
Read more >
How to setup code completion in Phpstorm? - FuelPHP forums
Hello! Could you explain me how to setup phpstorm settings for code completion? With netbeans not problems, CC correctly working, but with ...
Read more >
IntelliJ IDEA. Code Completion - YouTube
Code completion allows you to speed up your coding process. In this screencast we're going to look at different types of code completion...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found