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
[NETBEANS-5599] PHP 8.1 Support: Enumerations #3940
Conversation
- https://issues.apache.org/jira/browse/NETBEANS-5599 - https://wiki.php.net/rfc/enumerations - Fix the parser, the lexer, and `PHP81UnhandledError` - Add and fix unit tests
- https://issues.apache.org/jira/browse/NETBEANS-5599 - https://wiki.php.net/rfc/enumerations - Fix the indexer - Add elements for an enum and an enum case - Add unit tests
- https://issues.apache.org/jira/browse/NETBEANS-5599 - https://wiki.php.net/rfc/enumerations - Fix the Navigator - Add unit tests
- https://issues.apache.org/jira/browse/NETBEANS-5599 - https://wiki.php.net/rfc/enumerations - Fix the `SemanticAnalysis` and the `PHPBracesMatcher` - Add unit tests for the SemanticAnalysis, the FoldingScanner, and the PHPBrace Matcher
- https://issues.apache.org/jira/browse/NETBEANS-5599 - https://wiki.php.net/rfc/enumerations - Fix the parser (e.g. Name::CASE1->method(), $i::CASE1->method(), Name:::CASE1::staicMethod(), Name::CASE1::CONSTANT) - Add unit tests
- https://issues.apache.org/jira/browse/NETBEANS-5599 - https://wiki.php.net/rfc/enumerations - Fix the formatter - Add unit tests
@tmysik Could you please have a look at this when you have time? Sorry for the huge changes... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really nice (and huge, of course :) patch! Thanks for it!
@junichi11 My only comment - it would be nice to have a different icon for enum, but I can imagine that there is nobody who could draw it... |
@tmysik Thank you for your review!
Yes, I think so. class ExampleClass {
const CONSTANT = 1;
}
enum ExampleEnum: string {
case ENUM_CASE = "";
const CONSTANT = 1;
} |
@junichi11 Exactly... |
Part 1:
PHP81UnhandledError
PHP 8.1:
PHP 8.0:
Part 2:
Part 3:
Part 4:
SemanticAnalysis
and thePHPBracesMatcher
Part 5:
Name::CASE1->method()
,$i::CASE1->method()
,Name:::CASE1::staicMethod()
,Name::CASE1::CONSTANT
)Part 6:
NOTE:
CC, GotoDeclaration, MarkOccurrences, Hints etc. are not fixed yet.