Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Cache] Fix strlen(null) deprecation on RelayCluster path in RedisTrait::doClear()#64330

Merged
nicolas-grekas merged 1 commit into
symfony:7.4symfony/symfony:7.4from
signor-pedro:fix-cache-redistrait-null-prefix-strlen-deprecationsignor-pedro/symfony:fix-cache-redistrait-null-prefix-strlen-deprecationCopy head branch name to clipboard
May 23, 2026
Merged

[Cache] Fix strlen(null) deprecation on RelayCluster path in RedisTrait::doClear()#64330
nicolas-grekas merged 1 commit into
symfony:7.4symfony/symfony:7.4from
signor-pedro:fix-cache-redistrait-null-prefix-strlen-deprecationsignor-pedro/symfony:fix-cache-redistrait-null-prefix-strlen-deprecationCopy head branch name to clipboard

Conversation

@signor-pedro
Copy link
Copy Markdown
Contributor

Q A
Branch? 7.4
Bug fix? yes
New feature? no
Deprecations? no
Issues Fix #64329
License MIT

Add the ?? '' null guard already used on every other branch of RedisTrait::doClear(). Relay::OPT_PREFIX can be null, which triggers a PHP 8.1+ strlen(): Passing null... deprecation.

@signor-pedro signor-pedro marked this pull request as ready for review May 22, 2026 10:03
@carsonbot carsonbot added this to the 7.4 milestone May 22, 2026
@signor-pedro
Copy link
Copy Markdown
Contributor Author

There are many CI failures but frankly, I don't see how these could relate to my change.

I at least fixed some formatting as suggested by fabbot, but the only meaningful change is

$prefixLen = \strlen($prefix ?? '');

Am I supposed to fix the rest of the failing jobs?

@symfony symfony deleted a comment from carsonbot May 23, 2026
@nicolas-grekas nicolas-grekas force-pushed the fix-cache-redistrait-null-prefix-strlen-deprecation branch from 8ae5ccc to 68021d6 Compare May 23, 2026 15:19
@nicolas-grekas
Copy link
Copy Markdown
Member

Thank you @signor-pedro.

@nicolas-grekas nicolas-grekas merged commit b14d5ac into symfony:7.4 May 23, 2026
5 of 14 checks passed
This was referenced May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.