phptools-docs icon indicating copy to clipboard operation
phptools-docs copied to clipboard

No errors, showing error messages.

Open AliceSync opened this issue 1 year ago • 6 comments

I've been encountering a lot of error messages recently, but in reality, there are no issues, which is very frustrating for me. demo:

Use of unknown class: 'class_1\class_2\class_3'

Actually my code runs correctly and can be traced in the IDE, I don't know why the error is reported, this problem is very common in my environment, I tried to create a single replica code file without success

There are some other questions,the extension generated some files,but there is a syntax error They will always prompt errors in the IDE

// Generated code

/**
 * See Booleans .
 * @var bool
 */
const true = true;
[{
	"resource": "/tmp/$Metadata$/5209E165$manual/true.php",
	"owner": "_generated_diagnostic_collection_name_#0",
	"code": "PHP2002",
	"severity": 8,
	"message": "Cannot redeclare constant 'true'",
	"source": "PHP",
	"startLineNumber": 7,
	"startColumn": 7,
	"endLineNumber": 7,
	"endColumn": 11
}]

There are many other error messages that should not exist. I will add them later.

AliceSync avatar Oct 19 '23 10:10 AliceSync

Thank you for reporting that.

  • Is the reported class in a file included in your workspace?
  • Is it in a composer package, under the /vendor/ folder?

jakubmisek avatar Oct 19 '23 13:10 jakubmisek

Thank you for reporting that.

  • Is the reported class in a file included in your workspace?
  • Is it in a composer package, under the /vendor/ folder?

Is the reported class in a file included in your workspace? yes Is it in a composer package, under the /vendor/ folder? no

use ctrl+mouse target can be opened ,no error when using other files, but an error message appears on a specific file. In the file that reported the error, no error message appeared when using other class under the same namespace.

I can't try to create a stable repro code for this problem, I can only provide this information

AliceSync avatar Oct 19 '23 16:10 AliceSync

Thank you for reporting that.

  • Is the reported class in a file included in your workspace?
  • Is it in a composer package, under the /vendor/ folder?

There is a syntax error in md. I modified the issuse to display it completely.

AliceSync avatar Oct 19 '23 16:10 AliceSync

Thank you for reporting that.

  • Is the reported class in a file included in your workspace?
  • Is it in a composer package, under the /vendor/ folder?

I tried adding a static function and calling it in the same error file without any error prompts, but the constants called still prompt that the class does not exist.

AliceSync avatar Oct 19 '23 18:10 AliceSync

Same problem here. It seems to get worse after reloading VS Code

armellin avatar Oct 31 '23 09:10 armellin

@armellin @AliceSync

  • There was a bug in pre-release 1.40.14169; if you're on this version, please update.
  • May I ask for a sample code? a small reproducible test case which we can try.

jakubmisek avatar Oct 31 '23 12:10 jakubmisek