Skip to content

Removed static from callables because it's deprecated since PHP 8.2#1642

Merged
vladvildanov merged 1 commit intopredis:mainfrom
staegi:main
Feb 20, 2026
Merged

Removed static from callables because it's deprecated since PHP 8.2#1642
vladvildanov merged 1 commit intopredis:mainfrom
staegi:main

Conversation

@staegi
Copy link
Copy Markdown
Contributor

@staegi staegi commented Feb 19, 2026

No description provided.

@staegi staegi requested a review from a team as a code owner February 19, 2026 23:32
@vladvildanov vladvildanov merged commit 7fd23db into predis:main Feb 20, 2026
37 checks passed
@predakanga
Copy link
Copy Markdown
Contributor

This PR seems to be based on a misunderstanding - the code changes are all examples of static anonymous functions, not the static callables which have been deprecated.

For reference, here is the deprecation notice, and here is the documentation of static anonymous functions - note that they're not deprecated as of the current version.

@talkinnl
Copy link
Copy Markdown

talkinnl commented Mar 2, 2026

This PR seems to be based on a misunderstanding - the code changes are all examples of static anonymous functions, not the static callables which have been deprecated.

For reference, here is the deprecation notice, and here is the documentation of static anonymous functions - note that they're not deprecated as of the current version.

Yes. This PR just out of the blue removed a small optimization for no real benefit. Marking closures static certainly isn't deprecated. Most of the time it's a micro-optimization, but sometimes it really help in preventing cycles.

@tillkruss
Copy link
Copy Markdown
Member

tillkruss commented Mar 2, 2026

@talkinnl Wanna open a PR to add them back in?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants