pulsar-edit / pulsar

A Community-led Hyper-Hackable Text Editor
https://pulsar-edit.dev
Other
3.32k stars 139 forks source link

PHP color coding not respecting null-safe operator #1100

Closed EliW closed 3 weeks ago

EliW commented 1 month ago

Thanks in advance for your bug report!

What happened?

I noticed recently that color coding gets messed up whenever I use a null-safe operator in PHP. Pulsar doesn't seem to actually understand that it is an operator, nor therefore that what follows is a property nor method.

Pulsar version

1.120.0

Which OS does this happen on?

🍎 macOS

OS details

15.0 (24A335)

Which CPU architecture are you running this on?

Apple M-series

What steps are needed to reproduce this?

  1. Be editing a PHP file
  2. Write a line of code showing the use of normal arrow operators, to see the color coding, such as:
    $property->addresses()->first()->city;
  3. Replace each of those (or any of those) with nullsafe operators, and see the color coding disappear:
    $property?->addresses()?->first()?->city;

Additional Information:

Screenshot showing the top line with normal color coding, and each subsequent one with 'greyed out' sections of the line due to this:

Screenshot 2024-09-19 at 4 37 41 PM
savetheclocktower commented 1 month ago

Yeah, didn't know this was even a thing. I'll get this fixed for 1.122. Thanks for the report!

savetheclocktower commented 1 month ago

OK, it'll go out in mid-October. (You're unlucky in that respect; if it's a hardship, you might be able to get by with a CI build of Pulsar until then, depending on your platform.) Thanks again!

EliW commented 1 month ago

Not a hardship at all, in fact I've been dealing with it for ... well, a long time. Just finally had the "hey I should report this" moment. Thanks for fixing it!