qossmic / deptrac

Keep your architecture clean.
https://qossmic.github.io/deptrac
MIT License
2.59k stars 136 forks source link

Does `functionName` only support functions with namespaces? #1412

Open ngmy opened 3 months ago

ngmy commented 3 months ago

Thanks for a good tool.

Does functionName only support functions with namespaces?

I want to detect Laravel request helper defined in the global namespace with the following configuration:

- type: functionName
  value: request

However, no request() is detected. When I write \request() it is detected.

I am using 2.0.0.beta.

developerstudservis commented 3 weeks ago

I'm reproduce this issue today ( +1

With

deptrac -V
deptrac 1.0.2-211-g72caeb5

PS: only if calling context (e.g. class) has namespace. In global namespace class function call detected at both cases. PPS: oops, my problem with function_call analyser, but looks like related bug.