-
Notifications
You must be signed in to change notification settings - Fork 886
PHP 8.4 Support #8035
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
Labels
Milestone
Comments
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Jan 6, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/todo/php84 - Add PHP 8.4 - Fix the available periods
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Jan 6, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/new_without_parentheses - Fix the gramar file(`ASTPHP5Parser.cup`) - Add the `PHP84UnhandledError` - Add unit tests for the parser Example: ```php new Example()->method(); new $class()?->method(); new Example()::staticMethod1()::CONSTANT; new (trim(' Example '))()::staticMethod1()->field; new Example()::{'CONSTANT'}; new Example()(); new $class()(); new Example()['key']; new $class()['key']; new (trim(' Example '))()['key']; // anonymous classes echo new class { const CONSTANT = 'constant'; }::CONSTANT; new class { public function method() {} }->method(); new class () implements ArrayAccess { }['key']; ```
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Jan 6, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/new_without_parentheses - Fix the formatter - Add `Other` to spaces within parentheses option e.g. `($a + $b);`, `new (trim(' Example '))()->field;` - Add/Fix unit tests
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Jan 6, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/new_without_parentheses - Fix "Go to Declaration" & "Mark Occurrences" - Add unit tests
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Jan 6, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/new_without_parentheses - Fix the `UnusedVariableHint` - Add a unit test
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Jan 6, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/new_without_parentheses - Fix Code Completion feature - Add unit tests Note: The following case is not supported yet. The statement is broken. (it has a syntax error.) So, the anonymous class is not parsed correctly. i.e. We can't get members. We have to sanitize an error part. ```php echo new class() { public const string CONSTANT = "constant"; }::^ ```
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Jan 6, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/new_without_parentheses - Add a unit test for the navigator
jhorvath
pushed a commit
to jhorvath/netbeans
that referenced
this issue
Jan 10, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/todo/php84 - Add PHP 8.4 - Fix the available periods
jhorvath
pushed a commit
to jhorvath/netbeans
that referenced
this issue
Jan 10, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/new_without_parentheses - Fix the gramar file(`ASTPHP5Parser.cup`) - Add the `PHP84UnhandledError` - Add unit tests for the parser Example: ```php new Example()->method(); new $class()?->method(); new Example()::staticMethod1()::CONSTANT; new (trim(' Example '))()::staticMethod1()->field; new Example()::{'CONSTANT'}; new Example()(); new $class()(); new Example()['key']; new $class()['key']; new (trim(' Example '))()['key']; // anonymous classes echo new class { const CONSTANT = 'constant'; }::CONSTANT; new class { public function method() {} }->method(); new class () implements ArrayAccess { }['key']; ```
jhorvath
pushed a commit
to jhorvath/netbeans
that referenced
this issue
Jan 10, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/new_without_parentheses - Fix the formatter - Add `Other` to spaces within parentheses option e.g. `($a + $b);`, `new (trim(' Example '))()->field;` - Add/Fix unit tests
jhorvath
pushed a commit
to jhorvath/netbeans
that referenced
this issue
Jan 10, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/new_without_parentheses - Fix "Go to Declaration" & "Mark Occurrences" - Add unit tests
jhorvath
pushed a commit
to jhorvath/netbeans
that referenced
this issue
Jan 10, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/new_without_parentheses - Fix the `UnusedVariableHint` - Add a unit test
jhorvath
pushed a commit
to jhorvath/netbeans
that referenced
this issue
Jan 10, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/new_without_parentheses - Fix Code Completion feature - Add unit tests Note: The following case is not supported yet. The statement is broken. (it has a syntax error.) So, the anonymous class is not parsed correctly. i.e. We can't get members. We have to sanitize an error part. ```php echo new class() { public const string CONSTANT = "constant"; }::^ ```
jhorvath
pushed a commit
to jhorvath/netbeans
that referenced
this issue
Jan 10, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/new_without_parentheses - Add a unit test for the navigator
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Jan 11, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/deprecated_attribute - Fix/Improve `SemanticAnalysis` - Get deprecated attributes or phpdoc tags from ASTNodes(Attributes and PHPDoc comments) instead of getting deprecated flags from an index. That way, it should also improve performance. - Add the `IncorrectDeprecatedAttributeHintError` because "Deprecated" attribute cannot target type and field - Add unit tests for the navigator, hints, and semantic analysis
PHP 8.4 is partially supported in NetBeans 25. |
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Jan 21, 2025
- apache#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 - 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 pulbic 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 } ```
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Jan 21, 2025
- apache#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 - 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
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Jan 21, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/asymmetric-visibility-v2 - Fix hints - `IncorrectConstructorPropertyPromotionHintError` - `UnusedVariableHint` - Add/Fix unit tests
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Jan 21, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/asymmetric-visibility-v2 - 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 } ```
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Jan 21, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/asymmetric-visibility-v2 - Add unit tests for formatter - set visibility (`private(set)` int $i;) - final property (`final public string $s = "string";`)
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Jan 21, 2025
- apache#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 - 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 } ```
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Jan 21, 2025
- apache#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 - 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
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Jan 21, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/asymmetric-visibility-v2 - Fix hints - `IncorrectConstructorPropertyPromotionHintError` - `UnusedVariableHint` - Add/Fix unit tests
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Jan 21, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/asymmetric-visibility-v2 - 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 } ```
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Jan 21, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/asymmetric-visibility-v2 - Add unit tests for formatter - set visibility (`private(set) int $i;`) - final property (`final public string $s = "string";`)
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Jan 23, 2025
- apache#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 - 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 - Change `javac.source=1.8` to `javac.release=17` - Increment spec vesions
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Jan 23, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/asymmetric-visibility-v2 - Fix hints - `IncorrectConstructorPropertyPromotionHintError` - `UnusedVariableHint` - Add/Fix unit tests
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Jan 23, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/asymmetric-visibility-v2 - 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 } ```
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Jan 23, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/asymmetric-visibility-v2 - Add unit tests for formatter - set visibility (`private(set) int $i;`) - final property (`final public string $s = "string";`)
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Feb 9, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/property-hooks - Fix the lexer and parser(grammar) - Add `PropertyHookDeclaration` as an `ASTNode` - Fix `PHP5ErrorHandlerImpl` (handle missing tokens) - Fix/Add unit tests for the lexer and parser - Remove `ArrayDimensionSyntaxSuggestionHint` because this no longer works. Example: ```php class PropertyHooksClass { public int $backed = 100 { get { return $this->backed; } set { $this->backed = $value; } } public $doubleArrow { // virtual get => $this->test(); set => $this->test() . $value; } public $attributes { #[Attr1] get {} #[Attr2] set ($value) { $this->attributes = $value; } } public $reference { &get => $this->reference; } public $final { final get => $this->final; } // constructor property promotion public function __construct( public $prop { get { return $this->prop; } set { $this->prop = $value; } } ) {} } class Child extends PropertyHooksClass { public $prop { get => parent::$prop::get(); set { parent::$prop::set($value); } } } interface PropertyHooksInterface { public string $prop1 { get; } final public int $prop2 { set; } public $prop3 { get; set; } public $ref { &get; } } ``` Note: Curly braces array access (`{}` e.g. `$array{1}`, `$array{'key'}`) can use no longer. Because a conflict occurs in the following case: ```php "string"{1}; public string $prop = "string" { get => $this->prop; set {} } ```
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Feb 9, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/property-hooks - Fix the indexer and the model - Use JSON format as a signature for property hooks - Current format is semicolon separated but it's hard to add hooks to a field signature without JSON format ```json [ { "name":"set", "start":3651, "end":3690, "mod":1, "isRef":false, "isAttr":false, "hasBody":true, "paramSig":"$value::0::1:1:0:0:0:0::" } ] ``` - Add interface methods - `FieldElemnt.isHooked()` - `FieldElement.HookedFieldElemnt.isHooked()` - `FieldElement.HookedFieldElemnt.getPropertyHooks()` - `IndexScope.PHP84IndexScope.findFields()` - `TypeScope.FieldDeclarable.getDeclaredFields()` - `TypeScope.FieldDeclarable.getInheritedFields()` - `PropertyHookScope.isReference()` - `PropertyHookScope.hasBody()` - `PropertyHookScope.isAttributed()` - `PropertyHookScope.getParameterNames()` - `PropertyHookScope.getParameters()` - `PropertyHookScope.getOffsetRange()` - `PropertyHookElement.isReference()` - `PropertyHookElement.hasBody()` - `PropertyHookElement.isAttributed()` - `PropertyHookElement.getParameters()` - `PropertyHookElement.getOffsetRange()` - Add/Fix unit tests for the index and the model
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Feb 9, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/property-hooks - Fix the navigator - Fix/Add unit tests - Add SVG icons for a property hook, a trait, and an enum case
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Feb 10, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/property-hooks - Fix the indexer and the model - Use JSON format as a signature for property hooks - Current format is semicolon separated but it's hard to add hooks to a field signature without JSON format - Use the "JSON simple". If we use "Jackson", problems(timeout, java.lang.NoClassDefFoundError) occurs in CI for Windows ```json [ { "name":"set", "start":3651, "end":3690, "mod":1, "isRef":false, "isAttr":false, "hasBody":true, "paramSig":"$value::0::1:1:0:0:0:0::" } ] ``` - Add interface methods - `FieldElemnt.isHooked()` - `FieldElement.HookedFieldElemnt.isHooked()` - `FieldElement.HookedFieldElemnt.getPropertyHooks()` - `IndexScope.PHP84IndexScope.findFields()` - `TypeScope.FieldDeclarable.getDeclaredFields()` - `TypeScope.FieldDeclarable.getInheritedFields()` - `PropertyHookScope.isReference()` - `PropertyHookScope.hasBody()` - `PropertyHookScope.isAttributed()` - `PropertyHookScope.getParameterNames()` - `PropertyHookScope.getParameters()` - `PropertyHookScope.getOffsetRange()` - `PropertyHookElement.isReference()` - `PropertyHookElement.hasBody()` - `PropertyHookElement.isAttributed()` - `PropertyHookElement.getParameters()` - `PropertyHookElement.getOffsetRange()` - Add/Fix unit tests for the index and the model Log: ``` FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 14 ms. FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 1 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms ```
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Feb 10, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/property-hooks - Fix the navigator - Fix/Add unit tests - Add SVG icons for a property hook, a trait, and an enum case
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Feb 12, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/property-hooks - Fix the indexer and the model - Use JSON format as a signature for property hooks - Current format is semicolon separated but it's hard to add hooks to a field signature without JSON format - Use the "JSON simple". If we use "Jackson", problems(timeout, java.lang.NoClassDefFoundError) occurs in CI for Windows ```json [ { "name":"set", "start":3651, "end":3690, "mod":1, "isRef":false, "isAttr":false, "hasBody":true, "paramSig":"$value::0::1:1:0:0:0:0::" } ] ``` - Add interface methods - `FieldElemnt.isHooked()` - `FieldElement.HookedFieldElemnt.isHooked()` - `FieldElement.HookedFieldElemnt.getPropertyHooks()` - `IndexScope.PHP84IndexScope.findFields()` - `TypeScope.FieldDeclarable.getDeclaredFields()` - `TypeScope.FieldDeclarable.getInheritedFields()` - `PropertyHookScope.isReference()` - `PropertyHookScope.hasBody()` - `PropertyHookScope.isAttributed()` - `PropertyHookScope.getParameterNames()` - `PropertyHookScope.getParameters()` - `PropertyHookScope.getOffsetRange()` - `PropertyHookElement.isReference()` - `PropertyHookElement.hasBody()` - `PropertyHookElement.isAttributed()` - `PropertyHookElement.getParameters()` - `PropertyHookElement.getOffsetRange()` - Add/Fix unit tests for the index and the model Log: ``` FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 14 ms. FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 1 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms ```
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Feb 12, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/property-hooks - Fix the navigator - Fix/Add unit tests - Add SVG icons for a property hook, a trait, and an enum case
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Feb 12, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/property-hooks - Fix the folding feature - Add unit tests
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Feb 13, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/property-hooks - Fix the indexer and the model - Use JSON format as a signature for property hooks - Current format is semicolon separated but it's hard to add hooks to a field signature without JSON format - Use the "JSON simple". If we use "Jackson", problems(timeout, java.lang.NoClassDefFoundError) occurs in CI for Windows ```json [ { "name":"set", "start":3651, "end":3690, "mod":1, "isRef":false, "isAttr":false, "hasBody":true, "paramSig":"$value::0::1:1:0:0:0:0::" } ] ``` - Add interface methods - `FieldElemnt.isHooked()` - `FieldElement.HookedFieldElemnt.isHooked()` - `FieldElement.HookedFieldElemnt.getPropertyHooks()` - `IndexScope.PHP84IndexScope.findFields()` - `TypeScope.FieldDeclarable.getDeclaredFields()` - `TypeScope.FieldDeclarable.getInheritedFields()` - `PropertyHookScope.isReference()` - `PropertyHookScope.hasBody()` - `PropertyHookScope.isAttributed()` - `PropertyHookScope.getParameterNames()` - `PropertyHookScope.getParameters()` - `PropertyHookScope.getOffsetRange()` - `PropertyHookElement.isReference()` - `PropertyHookElement.hasBody()` - `PropertyHookElement.isAttributed()` - `PropertyHookElement.getParameters()` - `PropertyHookElement.getOffsetRange()` - Add/Fix unit tests for the index and the model Log: ``` FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 14 ms. FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 1 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms ```
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Feb 13, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/property-hooks - Fix the navigator - Fix/Add unit tests - Add SVG icons for a property hook, a trait, and an enum case
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Feb 13, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/property-hooks - Fix the folding feature - Add unit tests
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Feb 15, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/property-hooks - Fix the indexer and the model - Use JSON format as a signature for property hooks - Current format is semicolon separated but it's hard to add hooks to a field signature without JSON format - Use the "JSON simple". If we use "Jackson", problems(timeout, java.lang.NoClassDefFoundError) occurs in CI for Windows ```json [ { "name":"set", "start":3651, "end":3690, "mod":1, "isRef":false, "isAttr":false, "hasBody":true, "paramSig":"$value::0::1:1:0:0:0:0::" } ] ``` - Add interface methods - `FieldElemnt.isHooked()` - `FieldElement.HookedFieldElemnt.isHooked()` - `FieldElement.HookedFieldElemnt.getPropertyHooks()` - `IndexScope.PHP84IndexScope.findFields()` - `TypeScope.FieldDeclarable.getDeclaredFields()` - `TypeScope.FieldDeclarable.getInheritedFields()` - `PropertyHookScope.isReference()` - `PropertyHookScope.hasBody()` - `PropertyHookScope.isAttributed()` - `PropertyHookScope.getParameterNames()` - `PropertyHookScope.getParameters()` - `PropertyHookScope.getOffsetRange()` - `PropertyHookElement.isReference()` - `PropertyHookElement.hasBody()` - `PropertyHookElement.isAttributed()` - `PropertyHookElement.getParameters()` - `PropertyHookElement.getOffsetRange()` - Add/Fix unit tests for the index and the model Log: ``` FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: getSignatureFromScopes() took: 0 ms INFO [org.netbeans.ui.indexing]: Indexing finished, indexing took 14 ms. FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 1 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms FINE [org.netbeans.modules.php.editor.model.impl.PropertyHookSignatureItem]: fromSignature() took: 0 ms ```
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Feb 15, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/property-hooks - Fix the navigator - Fix/Add unit tests - Add SVG icons for a property hook, a trait, and an enum case
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Feb 15, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/property-hooks - Fix the folding feature - Add unit tests
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Feb 15, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/property-hooks - Fix the formatter and `PhpTypedBreakInterceptor` - New Formatting Options - Braces - Field Declaration (Same Line by default) - Property Hook (Same Line by default) - Blank Lines - Between Property Hooks (0 by default) - Empty Property Hook Body (Unchecked by default) - Spaces - Before Left Braces - Field Declaration (Checked by default) - Property Hook Declaration (Checked by default) - Add unit tests
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Mar 6, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/property-hooks - Fix the indentation that is inserted when a new line is added - Fix an existing bug for a lambda function - Add unit tests Existing bug: ```php // example test( function(): void {^ ); ``` ```php // before test( function(): void { ^ } ); // after test( function(): void { ^ } ); ```
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Mar 18, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/property-hooks - Fix `ModifiersCheckHintError` - Add unit tests Example: ```php class PropertyHooksClass { private $invalidPrivateFinal { final get{} // cannot use final } private $invalidPublic01 { public get; // cannot use public } public $invalidStatic01 { static get {} // cannot use static } public static $invalidStatic02 { // cannot use static get{} set{} } public $invalidNonAbstract { get; // need a body set; // need a body } public readonly int $invalidReadonly { get{} set{} } // cannot use readonly } interface PropertyHookInterface { abstract public $invalid01 { get; set; } // cannot use abstract protected $invalid02 {get; set;} // cannot use protected private $invalid03 { // cannot use private get; set; } public $invalid04 { final get; // cannot use final } final public $invalid05 { // cannot use final get; set; } public $invalid06 { get {} // cannot has a body } public private(set) int $invalid07 { // cannot use private(set) set; } final public int $invalid08 { // cannot use final set; } public readonly int $invalid09 { // cannot use readonly get; } } ``` - Fix a formatting issue Example: ``` interface TestInterface { public int $prop1 {get; set;} public int $prop2 {} ^^^^^^^ selected here } // before interface TestInterface { public int $prop1 {get; set;} public int $prop2 {} } // after interface TestInterface { public int $prop1 {get; set;} public int $prop2 {} } ```
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Mar 21, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/property-hooks - Fix `WrongOrderOfArgsHint` - Add/Fix unit tests Example: ```php public function __construct( private ?int $optional = 1 { get { return $this->optional; } set { $this->optional = $value; } }, $mandatory, ) {} // apply fix public function __construct( $mandatory, private ?int $optional = 1 { get { return $this->optional; } set { $this->optional = $value; } }, ) {} ```
junichi11
added a commit
to junichi11/netbeans
that referenced
this issue
Mar 25, 2025
- apache#8035 - https://wiki.php.net/rfc#php_84 - https://wiki.php.net/rfc/property-hooks - Fix `ImmutableVariablesHint` - Add unit tests Example: ```php class PropertyHooksClass { public int $backed = 100 { set(int $value) { $this->backed = $value; } } public $attributes { #[Attr2] set ($value) { $this->attributes = $value; } } } // before: class PropertyHooksClass { public int $backed = 100 { set(int $value) { // a hint is shown $this->backed = $value; } } public $attributes { #[Attr2] set ($value) { // a hint is shown $this->attributes = $value; } } } // after: no hint ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Description
https://wiki.php.net/rfc#php_84
Use case/motivation
No response
Related issues
No response
Are you willing to submit a pull request?
Yes
The text was updated successfully, but these errors were encountered: