-
Notifications
You must be signed in to change notification settings - Fork 855
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
PHP 8.3 Support: Marking overridden methods (#[\Override]) #6701 #6873
PHP 8.3 Support: Marking overridden methods (#[\Override]) #6701 #6873
Conversation
- Don't handle private methods as overridden/overriding methods - Handle also methods of Enum - Improve results of unit tests - Add/Fix unit tests
php/php.editor/src/org/netbeans/modules/php/editor/completion/PHPCodeCompletion.java
Show resolved
Hide resolved
php/php.editor/src/org/netbeans/modules/php/editor/elements/IndexQueryImpl.java
Show resolved
Hide resolved
.../org/netbeans/modules/php/editor/csl/NavigatorTest/structure/anonymousClassInClassScope.pass
Show resolved
Hide resolved
...ndex/testPHP80ConstructorPropertyPromotion/testPHP80ConstructorPropertyPromotion.php.indexed
Show resolved
Hide resolved
@tmysik I may have missed something, but I've added as many unit tests as possible. |
Will fix failed tests later. |
- apache#6701 - https://wiki.php.net/rfc/marking_overriden_methods - Add the `hasOverrideAttribute()` method to the `PhpVersion` - Add the `AddOverrideAttributeHint` - Add unit tests - Increment spec versions Note: If some trait methods have `#[\Override]`, we should also check wheter the parent class has them. However, attributes are not indexed at the moment. So, we should improve the indexer. (Currently, the following case is not supported.) e.g. ```php trait T { #[\Override] public function traitMethod(): void {} } class C { // Fatal error: C::traitMethod() has #[\Override] attribute, but no matching parent method exists use T; } ```
- apache#6701 - https://wiki.php.net/rfc/marking_overriden_methods - Fix the code generator, code completion, and `ImplementAbstractMethodsHintError` - Add/Fix unit tests
9a45ad2
to
fd64377
Compare
php/php.editor/src/org/netbeans/modules/php/editor/completion/PHPCodeCompletion.java
Outdated
Show resolved
Hide resolved
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.
The number of tests is amazing, we should be safe here 🙂
@junichi11 Thanks for your perfect work!
@tmysik Thank you for your review and your time :) |
…the `getInterfaes()`
Fix the Overriding Methods feature
PHP 8.3 Support: Marking overridden methods (#[\Override]) (Part 1)
hasOverrideAttribute()
method to thePhpVersion
AddOverrideAttributeHint
Note:
If some trait methods have
#[\Override]
, we should also check wheter the parent class has them.However, attributes are not indexed at the moment. So, we should improve the indexer.
(Currently, the following case is not supported.)
e.g.
PHP 8.3 Support: Marking overridden methods (#[\Override]) (Part 2)
ImplementAbstractMethodsHintError
Code Generator:
Code Completion:
Hint: