deptrac icon indicating copy to clipboard operation
deptrac copied to clipboard

Cannot find reset function with functionName collector

Open vudaltsov opened this issue 3 years ago • 4 comments

Hi! Thank you for the library.

It seems that

        -   name: reset
            collectors:
                -   type: functionName
                    regex: ^reset$

cannot find a reset function.

Am I doing smth wrong?

vudaltsov avatar Feb 22 '22 13:02 vudaltsov

Don't quote me on this, but I think I remember that we do not have support default PHP functions yet.

patrickkusebauch avatar Feb 22 '22 19:02 patrickkusebauch

Yes, we only search for function definitions available to us. Maybe using something like JetBrains/phpstorm-stubs could be used to provide them.

dbrumann avatar Mar 06 '22 08:03 dbrumann

Looked into it and we don't even support internal PHP classes either based on the code. The only thing we do is ignore them when they are the target of dependency. But they cannot be collected by a collector either.

patrickkusebauch avatar Jun 09 '22 15:06 patrickkusebauch

I think a reasonable solution would be something like a PHPInternalCollector. WDYT?

patrickkusebauch avatar Jun 12 '22 14:06 patrickkusebauch

@patrickkusebauch, Thank you!

vudaltsov avatar Oct 04 '22 08:10 vudaltsov