yiisoft / injector

PSR-11 compatible injector
https://www.yiiframework.com/
BSD 3-Clause "New" or "Revised" License
43 stars 18 forks source link

Fix callable call #98

Closed xepozz closed 3 months ago

xepozz commented 3 months ago
Q A
Is bugfix? ✔️
New feature?
Breaks BC?

Reflections and other internal functions don't provide necessary information such as line or file if they're used during trace. So changing callable call to a regular $callable(...$args) solves this. There're proves:

Current version

image image

Fixed version

image image
roxblnfk commented 3 months ago

Could you add a test case?

vjik commented 3 months ago

@roxblnfk @samdark What does tests you ask about? Already exists many tests of Injector::invoke(): https://github.com/yiisoft/injector/blob/master/tests/Common/InjectorTest.php

samdark commented 3 months ago

@vjik these are about trace improvements.