-
Notifications
You must be signed in to change notification settings - Fork 69
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
Uncaught throwable caused by PHP 8.1 Deprecated warning #737
Comments
Update: We do not seem to have this problem in the latest release of our internal php image, with updated PHP and APM versions. Meaning, when I run the exact image, from our registry, we had the problems with and run the code immediately afterwards - Then only the PHP warning appears. If I then let the image idle for a few minutes, and then rerun the exact same code, without even exiting the image, then the APM error appears consistently.
|
I was too fast on the trigger. I went back and gave it another shot... I have now identified the setting which causes the problem, which is file opcache. If I add/remove the following from our php.ini file:
Without, then only the PHP warning appears. With then APM error also appears. I will try to produce a minimal docker image which can replicate the issue. |
Minimal reproducible docker image can be found at: SergeyKleyman/elastic_apm_php_agent_aux#1 The timing aspect was related to clearing of opcache happening. Which is why the attached example code must be executed twice. |
Describe the bug
Uncaught exception from unknown class triggered by Deprecation warning in php 8.1
To Reproduce
Steps to reproduce the behavior:
JsonSerializable
jsonSerialize
method with no defined return typehinting ->public function jsonSerialize() {return 'test';}
Expected behavior
I would expect APM to not crash, and break the flow of the application because of deprecation warnings.
The text was updated successfully, but these errors were encountered: