Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

Hope features requests are okay. I'll ask for forgiveness and ask anyway because this one has been on my mind for a while.

As seen below:

https://www.dropbox.com/s/yve8gtkroqsntv5/Screenshot%202014-03-28%2022.10.55.png

Extremely useful when you're trying to quickly grok the scope of a refactoring change or familiarizing yourself with a new system.

You must be logged in to vote

Replies: 5 comments

Comment options

Hello @jacobstr, all feature requests are more than welcome so there is nothing to forgive.

The biggest problem with generating a callgraph is that phpDocumentor does not collect usage data (except when an @uses tag is used). This is partly because phpDocumentor collects static data and does not execute your application, hence missing dynamic calls.

Nonetheless I think your suggestion is interesting and worth researching if we can implement such a thing. However due to other running issues it might take a long time to implement it.

You must be logged in to vote
0 replies
Comment options

mvriel - I was thinking about this and wondering how Doxygen was even doing it. It runs incredibly fast so I feel it must be doing static analysis as well.

How far does phpdocumentor go? Does it for example, generate an AST of the source code of each file or does it only parse annotations?

You must be logged in to vote
0 replies
Comment options

PhpDocumentor generates a complete AST but it is currently limited to the static aspect of a project. This means that we currently do not have a callgraph available.

The data source that we use would probably make it possible to generate a callgraph (I'd have to review it to be sure) but I expect that it would require a non trivial amount of time.

This means I will keep this feature request open because I do see value in it but other issues have precedence and I do not expect this to be implemented in the short run.

You must be logged in to vote
0 replies
Comment options

@mvriel Care to point me to this data source?

You must be logged in to vote
0 replies
Comment options

Sure! We use our own library phpDocumentor/Reflection, which on turn uses the parser nikic/PHP-Parser to interpret the information returned by php. It is this latter project that I'd have to check if it exposes the internals of functions and methods

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
💡
Ideas
2 participants
Converted from issue

This discussion was converted from issue #1190 on January 26, 2024 16:21.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.