Daniel Kinzler
Daniel Kinzler
@patrickkusebauch It looks to me like depeendencies from method signatures are not tracked at all right now. Is this expected? In FileReferenceVisitor, the relevant code for handling parameters and returns...
Ok I'm clearly misunderstanding something here... Looking at the test failures, some dependencies are now tracked twice. What am I missing?
> Once you are in the context of the class, the parsing of class methods is not done inside this class. Instead it is processed by https://github.com/qossmic/deptrac/blob/main/src/Core/Ast/Parser/Extractors/FunctionLikeExtractor.php Ah, thank you...
> I see. Transitive dependencies are not tracked as per #449. It is a very difficult problem to solve and likely would require plugging into something like PHPStan AST parser...
> I have to say I do not like altering the AstParsing based on a config variable. It feels like lying to me. And I am not even sure how...
> You might want to do something similar to what the FileReferenceVisitor does with currentReference and tokenTemplates. Thanks, I'll have a look! Re adding a method to DependencyInterface - since...
> The should have no reason to, but you are right. Luckily, we are planning a breaking release soon anyway. For MediaWiki, we have found it useful to define that...
@patrickkusebauch I have pushed a branch that experiments with introducing DependencyContext: https://github.com/brightbyte/deptrac/pull/new/DependencyContext I'm not really happy with it... Looping the context through the various classes is a bit painful, and...
> @brightbyte I took a look. And I think we should not only combine it with FileOccurence, but with DependencyType as well. So at the end you have just Depender,...
> If you'd like, I can write up the refactor into the DependencyContext as a separate PR and you can just piggyback on it with the "state of deprecated" so...