How to fix SublimePHPCompanion not working in Sublime Text 4

Photo by Joshua Aragon on Unsplash

If you have recently updated to Sublime Text 4, and that you are using SublimePHPCompanion, you may have already noticed how many features such as Find User, Expand Fully Qualified Class Name, Import Namespace etc stopped working.

At first I thought maybe the package needed updating before it can support Sublime Text 4… Turns out that the fix is super simple!

So the reason SublimePHPCompanion stopped working is due to this new setting added in ST4 index_exclude_gitignore. By default it’s set to true, which means the editor would look into our .gitignorefiles and decide whether to index them or not.

Most of us would keep our vendor directory listed in .gitignore as that is a default in most framework-based projects like Laravel or Symfony.

Without indexing the vendor folder, SublimePHPCompanion can’t tell what are the PHP packages that we have installed, and so all its features do not work as expected anymore.

To fix that, simply open up the Preferences > Settings page, and add this line:

"index_exclude_gitignore": false,

Now, ST4 would ignore the paths listed in our .gitignore files, and started indexing vendor again. With that, SublimePHPCompanion would work again!




I write about Laravel, PHP, and web development related articles.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Using with R and dbplyr

Understanding Android Fragments back stack by delinquent examples

Yes We Kanban — Getting the Most out of your SaaS Development Sprints

Golang — Building Blocks

Protect Personally Identifiable Information (PII) in Your Apps Using RudderStack

Lesson 4 — User Interaction

Automated Deployments Using CircleCI

Troubleshooting CSS

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Jian Jye

Jian Jye

I write about Laravel, PHP, and web development related articles.

More from Medium

DWM Tile Window Manager Keyboard short cut keys Issue

Top 10 Email Tracking Software and Extensions for Gmail in 2022

What happens when you type in your browser and press Enter

Patrick Reed on Green Etiquette for Beginners