Skip to content

[12.x] Allow naming queued closures #55634

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: 12.x
Choose a base branch
from

Conversation

willrowe
Copy link
Contributor

@willrowe willrowe commented May 2, 2025

This allows a queued closure to be given a name in order to be more easily identified. The name is prefixed to the display name so that it still denotes that it is a closure and where it is located.

@willrowe willrowe force-pushed the feature/name-queued-closures branch from 403714d to 5da65f2 Compare May 2, 2025 18:01
Comment on lines +116 to +118
if (! is_null($this->name)) {
$prefix = "{$this->name} - ";
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$prefix = is_null($this->name) ? '' : "{$this->name} - ";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants