Problem/Motivation
When running phpstan-drupal on PHP 8.0.7 I get the following error:
PHP Deprecated: Required parameter $bubbleable_metadata follows optional parameter $data in /data/app/modules/contrib/comment_notify/comment_notify.tokens.inc on line 34
Steps to reproduce
Run phpstan-drupal
Proposed resolution
Remove the optional values and make them required. We are checking for empty anyway.
Remaining tasks
n/a
User interface changes
n/a
API changes
n/a
Data model changes
n/a
Issue fork comment_notify-3220471
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
kim.pepperRemoves the optional params.
Comment #4
dca123 commentedHas this fix been applied to dev? I've updated my install to the latest dev and still get the issue.
Comment #5
greggles@dca123: This has not been added to the module. The issue status is "Needs review" and there are no commits associated with this issue in git. Can you test out the changes?
Here it is as a patch https://git.drupalcode.org/project/comment_notify/-/merge_requests/3.diff Since it's just one line it should be easy to make the change manually if you want to help test.
Would love to hear any feedback you have. Thanks!
Comment #6
dca123 commentedTested the patch and the errors do not happen.
composer.json
Not sure what else I need to do?
Comment #8
gregglesThat's great, thanks for the feedback. I've now merged it and will give credit to you as a reviewer and kim.pepper as the author.
Comment #9
dca123 commented@greggles
Great!
Comment #10
gregglesThis is now available in the dev release. I guess in a few months we'll make a new stable release and include this.