Problem/Motivation
When installed on PHP 8, the following deprecation notice is present:
Deprecated: Required parameter $bubbleable_metadata follows optional parameter $data in /var/lib/tugboat/web/modules/contrib/publication_date/publication_date.tokens.inc on line 26
Steps to reproduce
- Install PHP 8.
- Install publication_date module.
Proposed resolution
Make all parameters required. See related issue in token: #3173359: Deprecation errors when trying to install the module on PHP 8
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | publication_date-3220692.patch | 1001 bytes | awm |
Issue fork publication_date-3220692
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
markdorisonComment #4
jozzy_a commented@markdorison can confirm this is working on PHP8.
Comment #5
fengtanComment #6
smustgrave commentedCan confirm this fixes the warning.
Comment #7
awm commentedComment #8
smustgrave commented@awm that's the same as the diff from what I can tell?
Comment #9
awm commentedsmustgrave yup just needed the patch file to safely reference it from composer.json instead of referencing gitlab code patch. Feel free to hide it.
Comment #10
anacolautti commentedHi! I didn't know this, and I love it now that I do. You can get a patch from a merge request in Drupal's gitlab by adding
.patchat the end of the URL. For example: https://git.drupalcode.org/project/publication_date/-/merge_requests/3.patchAna
Comment #12
webflo commentedThanks!