pulsar icon indicating copy to clipboard operation
pulsar copied to clipboard

PHP color coding not respecting null-safe operator

Open EliW opened this issue 5 months ago • 3 comments

Thanks in advance for your bug report!

  • [X] Have you reproduced issue in safe mode?
  • [X] Have you used the debugging guide to try to resolve the issue?
  • [X] Have you checked our FAQs to make sure your question isn't answered there?
  • [X] Have you checked to make sure your issue does not already exist?
  • [X] Have you checked you are on the latest release of Pulsar?

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

EliW avatar Sep 19 '24 20:09 EliW