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

PHP color coding not respecting null-safe operator #1100

Open
5 tasks done
EliW opened this issue Sep 19, 2024 · 3 comments · May be fixed by #1101
Open
5 tasks done

PHP color coding not respecting null-safe operator #1100

EliW opened this issue Sep 19, 2024 · 3 comments · May be fixed by #1101
Assignees
Labels
bug Something isn't working

Comments

@EliW
Copy link

EliW commented Sep 19, 2024

Thanks in advance for your bug report!

  • Have you reproduced issue in safe mode?
  • Have you used the debugging guide to try to resolve the issue?
  • Have you checked our FAQs to make sure your question isn't answered there?
  • Have you checked to make sure your issue does not already exist?
  • 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 EliW added the bug Something isn't working label Sep 19, 2024
@savetheclocktower
Copy link
Sponsor Contributor

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

@savetheclocktower savetheclocktower self-assigned this Sep 19, 2024
@savetheclocktower savetheclocktower linked a pull request Sep 19, 2024 that will close this issue
@savetheclocktower
Copy link
Sponsor Contributor

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
Copy link
Author

EliW commented Sep 20, 2024

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants