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

CommentFileSizeAuthor
#3 profile_deprecation_errors_php_8.patch853 bytesjoseminosa

Issue fork profile-3192517

Command icon 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

dwkitchen created an issue. See original summary.

dwkitchen’s picture

Issue summary: View changes
joseminosa’s picture

StatusFileSize
new853 bytes
geomax’s picture

Status: Active » Reviewed & tested by the community

Patch fixes the error – PHP 8.0.3, Drupal 9.1.5, Profile 8.x-1.2.

Thanks!

agoradesign’s picture

Although 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

edurenye’s picture

RTBC +1

  • mglaman committed 75a37da on 8.x-1.x authored by Joseminosa
    Issue #3192517 by Joseminosa, dwkitchen, geomax, agoradesign, edurenye:...
mglaman’s picture

Status: Reviewed & tested by the community » Fixed

Committed, tagging a PHP8 compatible release.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.