[GH-8334] PHP do not display override hint for constructors#8338
[GH-8334] PHP do not display override hint for constructors#8338junichi11 merged 1 commit intoapache:masterfrom
Conversation
|
I am receiving a mail "PR run failed" regarding this. What is the meaning of this? It seems to be related to github actions, which I am not familiar with.
|
|
@NReib the unittests are not fully stable, so some of them run with retries. You see the fallout of this. If you have commit rights on the repo you can rerun checks from the "Checks" page of the corresponding PR, else you can at least see what failed. When you look at the checks page right now, it shows, that all tests ran clean (now). |
|
@NReib please check if you can add a unittest for this (I bet @junichi11 would/will say the same). Have a look at The unittests is just a call to For the referenced case, look at:
You can experiment by removing the |
622032d to
f8fb770
Compare
|
@NReib you'll need to run the test locally, run it twice, on the first run it will fail (generating the |
|
@matthiasblaesing thank you for the detailed description. Luckily I already knew how to do that from my first pull request here :) Just struggled to include the generated file to the commit... |
junichi11
left a comment
There was a problem hiding this comment.
Please add screenshots before and after. Thanks!
php/php.editor/src/org/netbeans/modules/php/editor/verification/AddOverrideAttributeHint.java
Outdated
Show resolved
Hide resolved
.../data/testfiles/verification/AddOverrideAttributeHint/testNoOverrideHintOnConstructor_01.php
Outdated
Show resolved
Hide resolved
.../data/testfiles/verification/AddOverrideAttributeHint/testNoOverrideHintOnConstructor_01.php
Show resolved
Hide resolved
|
@NReib Please use 4 spaces for the example of the commit message and remove the PHPDoc if unnecessary. |
The following leads to a compile error in PHP - so we should not display the Add Override hint for constructors.
```php
<?php
class newPHPClass {
public function __construct() {
}
}
class newPHPClass1 extends newPHPClass {
#[\Override]
public function __construct() {
parent::__construct();
}
}
$anon = new class extends newPHPClass {
#[\Override]
public function __construct() {
parent::__construct();
}
};
```
|
Please add screenshots to not a comment but the description. Thanks! |
The following leads to a compile error in PHP - so we should not display the Add Override hint for constructors.
Before:

After:

^Add meaningful description above
Click to collapse/expand PR instructions
By opening a pull request you confirm that, unless explicitly stated otherwise, the changes -
Please make sure (eg.
git log) that all commits have a valid name and email address for you in the Author field.If you're a first time contributor, see the Contributing guidelines for more information.
If you're a committer, please label the PR before pressing "Create pull request" so that the right test jobs can run.
PR approval and merge checklist:
If this PR targets the delivery branch: don't merge. (full wiki article)