This repository was archived by the owner on Dec 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 124
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Coloring/Highlighting Issues for Exceptions and Constants in PHP #390
Copy link
Copy link
Closed
Description
Prerequisites
- Put an X between the brackets on this line if you have done all of the following:
- Reproduced the problem in Safe Mode: https://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
- Followed all applicable steps in the debugging guide: https://flight-manual.atom.io/hacking-atom/sections/debugging/
- Checked the FAQs on the message board for common solutions: https://discuss.atom.io/c/faq
- Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Aatom
- Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
Description
Steps to Reproduce
- Multiple Exception types in a catch block separated by a single pipe '|' highlights only the class name of the last class (see item1.png):
example: catch (\Namespace\Exception1 | \Namespace\Exception2 | \Namespace\Exception3 $e) {...}
- only Exception3 would have correct class coloring/highlighting
- When using a namespaced constant as a default value for a parameter in a function definition is colored red incorrectly (see item2.png).
example: public static function redirect(string $locationUri, array $responseCode = \Http\Response\Code::SEE_OTHER, array $additionalRedirectHeaders = []): void
- \Http\Response\Code::SEE_OTHER is colored red even though there is no error. changing this to a [] colors correctly, but the other does not
- When using an Uppercase constant name that is the same as a PHP primitive (in my example: STRING vs string, the coloring is incorrect. It is colored as a type instead of the constant name (see item3.png)
example: public const STRING = 2;
- String is colored as if it were a data type primitive instead of the color of constant declared names.
Expected behavior:
Actual behavior:
Reproduces how often:
Versions
Version 0.44.4 from commit 882f6c0
Additional Information
- VSCode Version: 1.44.1
- OS Version: Windows 10 (on dev machine), Centos 7 & php7.4 (on server)
Originally from @eeasoftware in microsoft/vscode#95559
Metadata
Metadata
Assignees
Labels
No labels