Problem/Motivation
When trying to install on PHP 8 with Drupal 9.1.0, I see the following errors:
Deprecated: Required parameter $bubbleable_metadata follows optional parameter $data in /app/web/modules/contrib/profile/profile.tokens.inc on line 32
Steps to reproduce
Use PHP 8 to install Drupal 9.1 with the required patches
Proposed resolution
From @Berdir on Token: The fix is to make all arguments "required". These are hooks, hooks don't have optional arguments, it's up to the caller to pass default values. See hook_tokens()/system_tokens().
Remaining tasks
- Write the patch and commit
User interface changes
None
API changes
None
Data model changes
None
Comments
Comment #2
dwkitchen commentedComment #3
joseminosa commentedComment #4
geomax commentedPatch fixes the error – PHP 8.0.3, Drupal 9.1.5, Profile 8.x-1.2.
Thanks!
Comment #5
agoradesign commentedAlthough it's only a tiny change, it would be great to see this committed and released soon, as we don't have to patch the module in every new project
Comment #6
edurenye commentedRTBC +1
Comment #8
mglamanCommitted, tagging a PHP8 compatible release.