1

Visual Sudio Code does not resolve Laravel Facades even with PHP Intelephense extension and _ide-helper.php file generated by laravel-ide-helper. When I add _ide-helper.php while the workspace is open, Facades are resolved, however it won't be resolved when I reopen the workspace later.

Any of below I tried did not solve this issue.

  • Put _ide-helper.php at the root of the workspace.
  • Restart VSCode.
  • Add _ide-helper.php path to Intelephense "Include Path" settings.
    • Tried with both relative and absolute paths, also in both User and Workspace settings.
    • Tried with the directory path where _ide-helper.php is located.

1 Answer 1

6

You might get some hints to find the cause by opening Intelephense output. Open OUTPUT by selecting Output menu under View menu, then select "intelephense" to see its output.

intelephense output example

In my case, as seen in the screenshot, the cause was Max Size settings of Intelephense. It was set to 1,000,000 bytes, while my _ide-helper.php was 1.1MB.

Intelephsen Mas Size setting

After I set Max Size settings to more than 1.1MB, _ide-helper.php was properly loaded and Facades were resolved.

Hope this helps someone.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.