microsoft / microsoft/monaco-editor
[Bug] Code validation (syntax error) does not work for php language
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 46.8k
- Forks
- 4.1k
- Avg merge
- 17h 58m
- Merged PRs (30d)
- 1
Description
Reproducible in vscode.dev or in VS Code Desktop?
- Not reproducible in vscode.dev or VS Code Desktop
Reproducible in the monaco editor playground?
- Not reproducible in the monaco editor playground
Monaco Editor Playground Link
No response
Monaco Editor Playground Code
<?php
// The next line contains a syntax error:
if () {
return "The parser recovers from this type of syntax error"
}
?>
Reproduction Steps
Write a syntax error, like missing condition in if statement or missing a ;
Actual (Problematic) Behavior
Code validation (syntax error) does not work for php language
It does not work in demo either (microsoft.github.io/monaco-editor)
If you select PHP language, the first comment is "the next line contains a syntax error". But the "next line" (which has a syntax error) is not highlighted
Expected Behavior
Code validation works
Additional Context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the PHP snippet in the Monaco Editor Playground and the Monaco Editor demo, then trace how PHP syntax errors are validated and highlighted. Done means errors such as an empty if condition or missing semicolon are detected and visibly reported in both reproduction environments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100