Description
Symfony version(s) affected: 3.x, 4.x
Description
NativeSessionStorage
uses a mechanism to suppress errors/warnings from handers and states that:
The default PHP error message is not very helpful, as it does not give any information on the current save handler. Therefore, we catch this error and trigger a warning with a better error message
While it is true, that the handler is not mentioned, throwing away the error/warning is not desirable, because it may contain really useful information for debugging, which cannot be obtained anywhere else if it is silenced.
Possible Solution
I think either the messages should be combined - the message from the handler should be appended to the current one for example.
Or we might inject a logger (if available as other components do it) and log the message instead of throwing it away.
I will be happy to provide a PR, if a solution is agreed upon here.
Additional context
In our case it was hiding this message which I believe you cannot see anywhere else otherwise and was crucial to solve a problem which occured after upgrading to Symfony 3.4:
Memcached::touch(): using touch command with binary protocol is not recommended with libmemcached versions below 1.0.18, please use ascii protocol or upgrade libmemcached