blindcoder,
@blindcoder@toot.berlin avatar

Just spent TWO HOURS debugging PHP code because I relied on my IDE and github Copilot which both didn't catch the bug in the code below:

<?php
if (array_key_exists("error", $response){
$return_value = [];
}
?>

Error message was: PHP Parse error: syntax error, unexpected token ";" in <file> on line 3

Yes, it's on me, but I'm supposed to test this tech for my employer and results are not looking favorably.

Edit: added proper line number for my example

Sdfendor,
@Sdfendor@chaos.social avatar

@blindcoder If you cut out the code and paste it in again, does anything change? I have problems with myself with the more recent versions, sometimes their (code highlighting, error reporting, warnings, refactorings etc.) seems to get stuck in a certain state, false positives or false negatives are the consequence. So I fix a problem which is underlined red and afterwards the underline stays in.
I as well tinker around with the plugin.

michael,
@michael@thms.uk avatar

@Sdfendor

This is happening so so much these days. It’s really getting beyond annoying. Today I had to actually quit phpstorm twice, because it was stuck in a false negative state.

I wish they’d just spend some time improving/fixing this, instead of inventing ‘new terminals’, AI, or whatever else

cabbey,
@cabbey@phpc.social avatar

@michael @Sdfendor I reduced the frequency of this to basically zero by disabling a bunch of built in plugins for stuff I don’t use. Laravel and symphony and behat and like 10 other things. Haven’t had any hiccups since.

michael,
@michael@thms.uk avatar

@cabbey hm. I’ll go through my plugin list and see what I can disable. Thanks for the tip!
@Sdfendor

derickr,
@derickr@phpc.social avatar

@blindcoder I'd like to know which IDE to avoid here.

blindcoder,
@blindcoder@toot.berlin avatar

@derickr I tested this on intellij idea community edition with the github copilot plugin.

derickr,
@derickr@phpc.social avatar

@blindcoder It surprises me that it can't count braces. Did it not warn you at all about it? I'd say it's orth submitting a bug report if that's the case.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • php
  • kavyap
  • InstantRegret
  • ethstaker
  • DreamBathrooms
  • mdbf
  • magazineikmin
  • thenastyranch
  • Youngstown
  • tacticalgear
  • slotface
  • Durango
  • khanakhh
  • rosin
  • everett
  • Leos
  • vwfavf
  • normalnudes
  • osvaldo12
  • cubers
  • GTA5RPClips
  • cisconetworking
  • ngwrru68w68
  • anitta
  • provamag3
  • tester
  • modclub
  • megavids
  • JUstTest
  • All magazines