-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Typed property Symfony\Component\Cache\Adapter\TraceableAdapterEvent::$end must not be accessed before initialization #48910
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
Comments
I'm not able to reproduce either. Can you confirm that
|
@alamirault Yes, a breakpoint shows it does get created by that adapter. It runs
We're also 3 requests deep by this point, if you count the number of |
might be worth reporting this to PHP itself instead, at least this does not look like the expected behaviour to me |
Appeared to me also. Noticed, that this happens then PHP memory is limited. |
…ns (nicolas-grekas) This PR was merged into the 5.4 branch. Discussion ---------- [Cache] fix collecting cache stats when nesting computations | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #48910 | License | MIT | Doc PR | - Commits ------- 52a0e43 [Cache] fix collecting cache stats when nesting computations
Symfony version(s) affected
6.2.4
Description
When an exception is thrown in debug mode in the callback passed to
Symfony\Contracts\Cache\CacheInterface::get(string $key, callable $callback)
, Symfony will end up masking the exception with its own asCacheDataCollector
throws the following exception:symfony/src/Symfony/Component/Cache/DataCollector/CacheDataCollector.php
Line 118 in 6f75529
How to reproduce
Probably something like the following should get it to trigger, although in my testing, it does not.
I am not sure what it is about my app in particular that triggers it, but the exception is actually thrown from a fiber, in case that matters. Here's a snapshot of
$calls
.Possible Solution
No response
Additional Context
This does not happen on Symfony 5.4; the correct userland exception message and trace is shown, instead of one coming from Symfony's components.
The text was updated successfully, but these errors were encountered: