Deprecate passing non-string parameters to \Drupal\Core\Utility\Token::scan then implement typehint

Created on 4 March 2022, about 2 years ago
Updated 16 February 2023, over 1 year ago

Problem/Motivation

When token->scan is called with null as a string, preg_match_all will throw a deprecated warning in PHP8+.

Steps to reproduce

Call token->scan(Null)

Proposed resolution

Deprecate calling token->scan with a non-string parameter. Add a string typehint in Drupal 11.

Draft change record

Remaining tasks

User interface changes

none

API changes

Deprecated loosely typed parameter in Drupal 10.
Typehint added in Drupal 11.

Data model changes

none

Release notes snippet

none

📌 Task
Status

Fixed

Version

10.1

Component
Token 

Last updated 3 days ago

No maintainer
Created by

🇧🇪Belgium kriboogh

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024