Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax highlighting fails for DNF in PHP docblocks #209758

Closed
jameswatts opened this issue Apr 7, 2024 · 2 comments
Closed

Syntax highlighting fails for DNF in PHP docblocks #209758

jameswatts opened this issue Apr 7, 2024 · 2 comments
Assignees
Labels
grammar Syntax highlighting grammar upstream Issue identified as 'upstream' component related (exists outside of VS Code) upstream-issue-linked This is an upstream issue that has been reported upstream

Comments

@jameswatts
Copy link

jameswatts commented Apr 7, 2024

Type: Bug

The syntax highlighting in docblocks for PHP code fails when a parameter has DNF in the type declaration, for example:

/**
 * An example function.
 * @param string $a The first argument.
 * @param ClassA|(ClassB&ClassC) $b The second argument.
 * @param int $c The third argument.
 * @return void
 */
function example(string $a, ClassA|(ClassB&ClassC) $b, int $c) {
  // no-op
}

In this case, text after ClassA|(ClassB&ClassC) continues to be highlighted as if it continues as the type declaration, until the end of the docblock.

Related links:

VS Code version: Code 1.88.0 (5c3e652, 2024-04-03T13:26:18.741Z)
OS version: Windows_NT x64 10.0.19045
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 x 2808)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 15.89GB (4.45GB free)
Process Argv --crash-reporter-id b7052d12-55ed-4ece-8a88-14326b3ee93e
Screen Reader no
VM 0%
Extensions (13)
Extension Author (truncated) Version
vscode-intelephense-client bme 1.10.4
composer-php-vscode DEV 1.45.15192
copilot Git 1.178.0
copilot-chat Git 0.14.0
vscode-pull-request-github Git 0.86.0
vscode-docker ms- 1.29.0
remote-containers ms- 0.354.0
remote-wsl ms- 0.88.0
vscode-speech ms- 0.8.0
vscode-php-codesniffer obl 3.0.1
vscode-thunder-client ran 2.20.3
code-spell-checker str 3.0.1
php-debug xde 1.34.0
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805:30301674
binariesv615:30325510
vsaa593:30376534
py29gd2263:30899288
c4g48928:30535728
azure-dev_surveyone:30548225
a9j8j154:30646983
962ge761:30959799
pythongtdpath:30769146
welcomedialog:30910333
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
h48ei257:31000450
pythontbext0:30879054
accentitlementsc:30995553
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
d34g3935:30971562
fegfb526:30981948
bg6jg535:30979843
ccp1r6:30993540
dsvsc020:30976470
pythonait:31006305
gee8j676:31009558
dsvsc021:30996838
g1icg217:30999571

@jameswatts
Copy link
Author

Adding a screenshot as a reference:

php_dnf

@alexr00
Copy link
Member

alexr00 commented Apr 8, 2024

I can repro. Moved to KapitanOczywisty/language-php#16, which is where we get our PHP syntax highlighting grammar from.

@alexr00 alexr00 closed this as completed Apr 8, 2024
@alexr00 alexr00 added upstream Issue identified as 'upstream' component related (exists outside of VS Code) grammar Syntax highlighting grammar upstream-issue-linked This is an upstream issue that has been reported upstream and removed new release labels Apr 8, 2024
@microsoft microsoft locked and limited conversation to collaborators Jun 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
grammar Syntax highlighting grammar upstream Issue identified as 'upstream' component related (exists outside of VS Code) upstream-issue-linked This is an upstream issue that has been reported upstream
Projects
None yet
Development

No branches or pull requests

4 participants