junichi11 opened a new pull request, #6793:
URL: https://github.com/apache/netbeans/pull/6793

   - https://github.com/apache/netbeans/issues/6701
   - https://wiki.php.net/rfc/typed_class_constants
   
   ### PHP 8.3 Support: Typed class constants (Part 1)
   
   - Fix the grammar file (parser)
   - Fix the `PHP83UnhandledError`
   - Add/Fix unit tests for the parser
   - Increment the spec version
   
   Example:
   ```php
   class Example {
       public const string CONSTANT1 = 'constant';
       public const ?int CONSTANT2 = 1;
       public const int|string CONSTANT3 = 1;
   }
   ```
   
   PHP 8.3
   
   
![nb-php83-typed-class-constants-parser](https://github.com/apache/netbeans/assets/738383/72ad9e8e-739d-4849-a7a9-43b89d5cfa6a)
   
   PHP 8.2
   
   
![nb-php83-typed-class-constants-parser-php82](https://github.com/apache/netbeans/assets/738383/597b1c92-6f02-4e12-b06f-93fc6510de5f)
   
   ### PHP 8.3 Support: Typed class constants (Part 2)
   
   - Index class constant types
   - Fix the navigator
   - Add/Fix unit tests for the indexer and the navigator
   - Increment the spec version
   
   
![nb-php83-typed-class-constants-navigator](https://github.com/apache/netbeans/assets/738383/a742d09e-1178-44da-b0ae-2bcc42fe9593)
   
   ### PHP 8.3 Support: Typed class constants (Part 3)
   
   - Fix the context sensitive lexer (Reserved keywords can be used as constant 
names)
   - Get the constant names as the `PHP_STRING` token
   - Add unit tests
   
   Example:
   ```php
   class Example {
       public const string|array array = [1, 2, 3], string = "example";
   }
   ```
   
   
![nb-php83-typed-class-constants-context-sensitive-lexer](https://github.com/apache/netbeans/assets/738383/1f0330e3-3ed2-4776-8712-4393af6305a7)
   
   ### PHP 8.3 Support: Typed class constants (Part 4)
   
   - Fix the mark occurences and the go to declaration features
   - Add unit tests
   
   ### PHP 8.3 Support: Typed class constants (Part 5)
   
   - Fix the Code Completion feature
   - Add templates for constant statements
   - Add unit tests
   
   ### PHP 8.3 Support: Typed class constants (Part 6)
   
   - Fix the formatter (don't add spaces within parens of DNF types)
   - Fix the `UnusableTypeHintError`
   - Add unit tests
   
   
![nb-php83-typed-class-constants-unusable-type-hint-error](https://github.com/apache/netbeans/assets/738383/a00b58ba-9127-477d-a178-df5ce96116e6)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to