Closed as not planned
Description
Description
The following code:
$callers = \debug_backtrace();
// build cache key
$id = \sprintf('%s::%s', $callers[1]['class'], $callers[1]['function']);
var_dump($callers[1]['class']);
var_dump($callers[1]['function']);
exit;
Can also be reproduced with:
git clone [email protected]:sulu/sulu.git sulu
cd sulu
composer update --ignore-platform-reqs
[email protected] vendor/bin/phpunit --filter="MemoizeTest::testMemoizeFirstCall"
Resulted in this output (PHP 8.4):
string(43) "Sulu\Component\Cache\Tests\Unit\MemoizeTest"
string(80) "{closure:Sulu\Component\Cache\Tests\Unit\MemoizeTest::testMemoizeFirstCall():53}"
But I expected this output instead (PHP 8.3):
string(43) "Sulu\Component\Cache\Tests\Unit\MemoizeTest"
string(41) "Sulu\Component\Cache\Tests\Unit\{closure}"
Is this change expected when upgrading from PHP 8.3 to 8.4? I'm fine with the change but wanted to report its an unexpected change.
PHP Version
8.4.0-dev
Operating System
macOs Montery