junichi11 opened a new pull request, #8177: URL: https://github.com/apache/netbeans/pull/8177
- #8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/asymmetric-visibility-v2 - https://www.php.net/manual/en/language.oop5.final.php ### PHP 8.4 Support: Asymmetric Visibility v2 (Part 1) - Fix the lexers and the parser(grammar file) - Support for the `final` field(property) - Don't handle modifier errors for methods, constants, and fields in the parser. Instead, handle them in the hint error. Writing all valid cases for each member is very hard and complicated because the current PHP has many modifiers. - Fix the `PHP84UnhandledError` - Add/Fix unit tests for the navigator, lexer, and parser Example: ```php class AsymmetricVisibilityClass { // Constructor Property Promotion public function __construct( public(set) string $field1, // implicit public public private(set) int $field2, public protected(set) readonly int $field3, ) {} // valid fields public(set) string $example1; // implicit public public private(set) int $example2 = 1; public protected(set) readonly int $example3; final private private(set) readonly string|int $example4; // final is available as of PHP 8.4 // invalid cases but the parser doesn't handle them as errors // e.g. public public string $invalid1 = "invalid"; // multiple same modifiers final private private(set) string|int $invalid2; // cannot use both final and private public public(set) $invalid3; // need type private public(set) string $invalid4; // visibility(private) must not be weaker than set visibility } ``` PHP 8.4   PHP 8.3   Navigator  ### PHP 8.4 Support: Asymmetric Visibility v2 (Part 2) - Fix `ModifiersCheckHintError` - Move final modifier errors from the `FinalModifierHintError` to `ModifiersCheckHintError` - Add useful methods to the `PhpVersion` - `hasFinalConst()` - `hasDeprecatedAttribute()` - `hasFinalField()` - `hasAsymmetricVisibility()` - Add methods and constants for set visibility to the `PhpModifiers` - Add unit tests for hints - Increment spec vesions   ### PHP 8.4 Support: Asymmetric Visibility v2 (Part 3) - Fix hints - `IncorrectConstructorPropertyPromotionHintError` - `UnusedVariableHint` - Add/Fix unit tests ### PHP 8.4 Support: Asymmetric Visibility v2 (Part 4) - Fix Code Completion - Fix/Add unit tests Note: CC does not work correctly on the following caret position because set visibility keywords contain a brace. ```php class Example { public private(se^ // ^: caret } ``` ### PHP 8.4 Support: Asymmetric Visibility v2 (Part 5) - Add unit tests for formatter - set visibility (`private(set) int $i;`) - final property (`final public string $s = "string";`) -- 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
