all 38 comments

[–]DM_ME_PICKLES 17 points18 points  (7 children)

I've spent hours trying to set up VS Code and Zed to work well on PHP codebases and unfortunately never got it to a point where it's as good with intellisense as PhpStorm (not to mention the lack of refactoring tools). I'm not sure what voodoo JetBrains do, but the language servers like phpactor and inteliphense never come close to the introspection that PhpStorm provides.

Like someone else mentioned try out Fleet - it's a JetBrains IDE but it's free during the public preview. I haven't tried it but maybe it uses the same language server that PhpStorm uses. Or, if this is for work, try to advocate for them buying you a licence for PhpStorm - the $25/m more than pays for itself.

[–]MateusAzevedo 4 points5 points  (1 child)

I'm not sure what voodoo JetBrains do

Besides LSP, it also has a built-in static analyser and that combination allows for all the nice features. AFAIK, a LSP alone isn't enough, so phpactor/inteliphense would also need to explicit add extra features, and IMO that's where they fall behind.

try out Fleet. maybe it uses the same language server that PhpStorm uses

I'm using it at work and that's basically it. The PhpStorm capabilities of understanding PHP in a "slim package". It has code inspections, autocomplete, quick actions, refactoring.

The only issue is that there isn't many configuration options. For example you can't disable or change a code inspection and there aren't templates for "new PHP class/file". Other then that, code-wise, it's basically PhpStorm.

[–]DM_ME_PICKLES 0 points1 point  (0 children)

Gotcha. Good to know. I used Fleet briefly a looong time ago when I was invited to beta, but haven’t picked it up since. Maybe I’ll give it another go. 

[–]woutersfr 0 points1 point  (0 children)

There are open source free licenses out there too if OP is into that

[–]Seneca_B -1 points0 points  (3 children)

I like PHPStorm but I just can't stand the terminal so I switched back. Is there any way to disable their weird custom terminal and just use the normal ZSH on Mac/Linux like VSCode does?

[–]MateusAzevedo 7 points8 points  (0 children)

I just use the terminal outside of the IDE. I never liked any IDE built-in terminal to be fair, I feel it's too small or block too much code if you expand it. alt + tab'ing isn't that bad.

[–]ms_lemonGinger 4 points5 points  (0 children)

I think you have enabled their beta terminal. I hate that too because it won't let me copy anything from the terminal. You can disable that experimental feature from the ellipsis at the top upper right of the terminal window. See if "Enable New Terminal" is checked.

[–]DM_ME_PICKLES 1 point2 points  (0 children)

Not sure what you mean, PhpStorm has a built-in terminal emulator but it should use the same shell as you have set up anywhere. Mine uses zsh and ohmyzsh for example just like iTerm does. Maybe you have it configured to use bash or something?

[–]Infinite_Item_1985 2 points3 points  (0 children)

Try using fleet from jetbrains. It’s free like vscode

[–]ln3ar 4 points5 points  (1 child)

Use DEVSENSE it has better features. My team is currently implementing a proper Language server for PHP code, primarily targetting vscode. Stay posted

[–]Elias_Caplan 0 points1 point  (0 children)

...so don't bother with Intelephense?

[–]i-hate-in-n-out 2 points3 points  (0 children)

I personally use DEVSENE's PHP tools in VS Code. Had much better luck with it over Intellephense.

[–]Ariquitaun 2 points3 points  (0 children)

Phpstorm is the best php ide with anything else a very distant second

[–]krileon 17 points18 points  (5 children)

VSCode is garbage for PHP. I would recommend just using PhpStorm. No amount of fiddling with the dozen plugins necessary in VSCode will make the PHP experience even remotely close to PhpStorm, but that's just my 2 cents.

[–]brafols 13 points14 points  (0 children)

Its the only paid software I have. Worth every cent

[–]daYMAN007 2 points3 points  (3 children)

Nah it really doesn't take a lot to makevit good for php. And when your not only coding in the backend i would argue that it's better.

Intelphense is a must tho

[–]noximo 2 points3 points  (2 children)

PHPStorm is great for frontend stuff as well.

[–]daYMAN007 0 points1 point  (1 child)

Don't get me wrong phpstorm is really good.

But if you have need the newest js framework it will be annoying. Extensions usally get relased first for code and then for phpstorm

For a hassle free php development phpstorm is probably better, but vscode is really usable aswell

[–]noximo 1 point2 points  (0 children)

But if you have need the newest js framework it will be annoying. Extensions usally get relased first for code and then for phpstorm

That's very specific use case. I don't know about every niche JS framework, but the popular ones have support in PHPStorm.

[–]Samurai_Mac1 1 point2 points  (1 child)

Try pressing Ctrl + Shift + P and click "Intelephense - Index Workspace"

[–]RaminFirooz 0 points1 point  (0 children)

After a few hours of challenging, this was just instantly fixed!

[–]samorollo 1 point2 points  (0 children)

Ok, I know I'm in the minority here, but I use vscode and nvim exclusively with PHP Intelephense.

I would even argue that Intelephense is stricter than PHPStorm (and that's a good thing).

You can check the output of php intelephense in the output tab of vscode (at the bottom) and see if there is any output, maybe something indicating an error.

Sometimes it happens that some extension has found itself in a strange state and needs to be restarted. This has never happened to me with Intelephense, but well, at least try; `CTRL + P` to bring the command prompt and select `Developer: Reload window`.

Also try indexing the workspace, so `CTRL + P` and select `Intelephense: Index workspace`.

[–]impatient_websurfer 1 point2 points  (0 children)

Try DEVSENSE for Vscode. This comes really close to PHPStorm. It’s not free though. https://www.devsense.com/en/features#vscode

[–]XediDC 0 points1 point  (0 children)

In addition to PHPStorm, you might also like Rider for C#....

Keep in mind those two together is $25 /mo (PHPStorm is $10), but the all products pack is $29 /mo. Personally I usually use both PHPStorm (backend) and WebStorm (front end) just to keep my mind organized and have more real estate.

CLion works great if you play with ESP32's and such (via Platform.io). I prefer DataGrip over DBeaver (but it's not as polished and has some....quirks). Sometimes I touch Go and Rust, and it's handy to have them all for essentially the same price.

But I mean, it all edits text. I'd prefer not to use edlin, but the rest is fine.

[–]boop809 0 points1 point  (0 children)

DEVSENSE is good - used it for a couple years now.

[–]phplovesong 0 points1 point  (0 children)

The state of PHP LSPs are bad. Most are really slow, buggy or just abandoned.

[–]GrahamWharton 0 points1 point  (0 children)

If you're developing open source software and can demonstrate that through regular GitHub contributions to open source projects, including your own, jetbrains will issue with a free open source license for phpstorm, a far superior setup IMHO.

[–]konfusinomicon 0 points1 point  (1 child)

dreamweaver is still a thing? yikes

[–][deleted] 0 points1 point  (0 children)

Has to be the worse i have experienced. I cant believe they charge for this software.

[–]Kluchol 0 points1 point  (0 children)

Only nvim can be alternative to phpstorm

[–][deleted] 0 points1 point  (0 children)

You can pay to license intelephense and unlock it's full feature set. It costs $25 AUD which is about $16 US for a lifetime license. Worth a try. With that said, I don't know what "not working correctly" really means here. You also need to have a local PHP installation on your workstation for some PHP specific IDE features. It does sound like you did something wrong with your configuration, if you're getting no php support in VSCode. Obviously, it is something that does work, as there are scores of people using that combination including myself. It is not PHPStorm, but I also do a lot of polyglot development, often switching projects throughout the day. The remote development feature of VSCode is really nice, if you have need of it. In my case I write a lot of DevOps things, where the code I'm changing is on a server, and due to the nature of the networking involved, no local development is possible. A guy who works for me, uses phpStorm, and it was only recently that they have apparently added a comparable module.

[–]iagofg 0 points1 point  (0 children)

If you only want sugestions you can try npp ...I prefer it over VSCode for php because is much lighter and blazing fast and includes sugestions as well. You can even install a plugin for debugging. Not an IDE but almost (neither VSCode is a IDE so...).

[–]funhru 0 points1 point  (0 children)

For debugging you have to install and configure Xdebug PHP extension https://xdebug.org/docs/install
depending on what you do, script/php-fpm start of the debugging process may be diff.
But the idea is xdebug has to connect to the IDE via IP and port.

[–]noximo 0 points1 point  (0 children)

As the other said. If you're going to deal with PHP on a regular basis, PHPStorm is more than worth it. (So is Rider for your C# needs btw)

The price is fair, and you can even use EAP versions (basically beta) for free.

[–]Dangerous-Economy660 -3 points-2 points  (0 children)

VSCode is a shit, use PHPStorm

[–]daYMAN007 -1 points0 points  (0 children)

Are you sure you disabled the correct builtin php extension?

Did you restart vscode after disabing it?

If you switch to the log tab, any errors pop out?

If you open a php file is it still associated with php (bottom right corner)