- Issue created by @quietone
- Merge request !11086Resolve #3503912 "Fix drupal.commenting.functioncomment.missing in Plugins" β (Closed) created by quietone
- π§πͺBelgium borisson_ Mechelen, π§πͺ
Looks good, pipelines are green
- First commit to issue fork.
- π«π·France nod_ Lille
CI is green but pre-commit checks are not, and can't commit. Getting
Running PHPStan on changed files. ------ ----------------------------------------------------------------------------------------------------------------- Line modules/filter/src/Plugin/Filter/FilterHtml.php ------ ----------------------------------------------------------------------------------------------------------------- 268 Method Masterminds\HTML5\Parser\Tokenizer@anonymous/modules/filter/src/Plugin/Filter/FilterHtml.php:265::setTextMode() has no return type specified. πͺͺ missingType.return ------ ----------------------------------------------------------------------------------------------------------------- [ERROR] Found 1 error
The Needs Review Queue Bot β tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide β to find step-by-step guides for working with issues.
- π³πΏNew Zealand quietone
I am confused by this. The baseline does have an ignore line, which is
$ignoreErrors[] = [ 'message' => '#^Method Masterminds\\\\HTML5\\\\Parser\\\\Tokenizer@anonymous/core/modules/filter/src/Plugin/Filter/FilterHtml\\.php\\:268\\:\\:setTextMode\\(\\) has no return type specified\\.$#', 'identifier' => 'missingType.return', 'count' => 1, 'path' => __DIR__ . '/modules/filter/src/Plugin/Filter/FilterHtml.php', ];
The difference is that the base line has
/core/modules/filter
but the pre-commit check has/modules/filter
.It can be fixed by adding a void return to the function, but that is out of scope.
- π³πΏNew Zealand quietone
This may be the problem, https://github.com/phpstan/phpstan/issues/12494
- π³πΏNew Zealand quietone
So, this can be enabled if the sniff is ignored for the anonymous function in FilterHtml.php. A follow up may be needed to remove that once either the PHPStan issue mentioned above is fixed or a return type is added to the function.
- π§πͺBelgium borisson_ Mechelen, π§πͺ
I agree, we can ignore this error for now. The problem in #8 is fixed and we have an explenation in #12, back to rtbc.
- π«π·France nod_ Lille
I can't commit still got an phpstan error on my end. If it's fixed for you feel free to commit @quietone
The Needs Review Queue Bot β tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide β to find step-by-step guides for working with issues.
- π³πΏNew Zealand quietone
Rebased. Restoring RTBC.
@nod_, thanks. The commit-code-check script fails locally for me as well. I think this is due to a bug in phpstan that I found in #11, https://github.com/phpstan/phpstan/issues/12494
- π¬π§United Kingdom catch
phpstan is failing for me too, we will either need to ignore that error or postpone this issue on the upstream fix.