http-factory icon indicating copy to clipboard operation
http-factory copied to clipboard

Detection based on stack back trace

Open drealecs opened this issue 6 years ago • 1 comments

In big projects where there are installed more than one framework, we could detect the needed library at runtime based on stack back trace. The result could be cached statically or per factory class instance that will be cached in framework's DI container. Detection could be configured or overridden by construct parameters.

drealecs avatar Jul 23 '18 02:07 drealecs

What problem would this fix or what would be the use case? I did not do any testing but I guess parsing stack trace would be slower than a call to class_exists().

tuupola avatar Aug 17 '18 08:08 tuupola