On 24/11/2025 16:06, Edmond Dantes wrote:
Then, if SDK Susie’s code creates a coroutine and uses LoggerInterface
inside it…
1. …an error will occur.
2. …an error will occur.
3. PHP will not allow the same LoggerInterface object to be used in
different coroutines without changes to the code.
An error will occur for whom? SDK Susie when unit testing her library?
Or Legacy Les when he tries to run his working code with the new library?
If it is an error for SDK Susie, what is her solution to allow users to
pass in a logger to her library?
If it is an error for Legacy Les, how does he fix it? Does he have to
audit his entire 20-year-old application for cases which might cause an
error he doesn't understand?
--
Rowan Tommins
[IMSoP]