Commit 05703f8
committed
PHP 8.4 Support: Property hooks (Part 2)
- 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
```1 parent 5e2fad5 commit 05703f8
File tree
54 files changed
+4058
-385
lines changed- php/php.editor
- nbproject
- src/org/netbeans/modules/php/editor
- api
- elements
- elements
- index
- model
- impl
- nodes
- parser/astnodes/visitors
- test/unit
- data
- goldenfiles/org/netbeans/modules/php/editor/csl
- testfiles
- index
- testPHP74TypedPropertiesClass
- testPHP74TypedPropertiesTrait
- testPHP80ConstructorPropertyPromotion
- testPHP80UnionTypesTypes
- testPHP81PureIntersectionTypes
- testPHP84PropertyHooksAbstract
- testPHP84PropertyHooksCPP
- testPHP84PropertyHooksInterface
- testPHP84PropertyHooksTrait
- testPHP84PropertyHooks
- model/php84
- src/org/netbeans/modules/php/editor
- index
- model/impl
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
54 files changed
+4058
-385
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
81 | 90 | | |
82 | 91 | | |
83 | 92 | | |
| |||
Lines changed: 24 additions & 37 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
70 | 57 | | |
71 | 58 | | |
Lines changed: 38 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | 19 | | |
21 | 20 | | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
| 30 | + | |
29 | 31 | | |
| 32 | + | |
30 | 33 | | |
| 34 | + | |
31 | 35 | | |
| 36 | + | |
32 | 37 | | |
| 38 | + | |
33 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
34 | 71 | | |
Lines changed: 80 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
0 commit comments