Skip to content

Commit

Permalink
Adjust pretty name of closures on PHP 8.4
Browse files Browse the repository at this point in the history
related to php/php-src#13550

see analog symfony change: symfony/symfony#54614
  • Loading branch information
staabm authored May 25, 2024
1 parent d14e93e commit e55ba57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Job/CallbackJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function getName(): string
$ref = new ReflectionFunction($this->callback);
$refName = $ref->getName();

if (str_ends_with($refName, '{closure}')) {
if (str_contains($refName, '{closure')) {

Check failure on line 32 in src/Job/CallbackJob.php

View workflow job for this annotation

GitHub Actions / Coding standard (ubuntu-latest, 8.1)

Function str_contains() should not be referenced via a fallback global name, but via a use statement.
$name = sprintf(
'%s:%s',
str_replace(getcwd() . DIRECTORY_SEPARATOR, '', $ref->getFileName()),
Expand Down

0 comments on commit e55ba57

Please sign in to comment.