From: Seb35 <se...@se...> - 2016-11-09 11:22:48
|
Hello, I was interested in obtaining the call graph for one of my software, and found phpCallGraph. I got issues running it with PHP 5.6/7.0, so I fixed the major bugs I encountered. The resulting patched phpCallGraph is on my GitHub account [1], with the last versions of ezcomponents, CodeAnalyzer, and PEAR librairies. When running it, the major issues I still have are related to autoloading classes. I successfully ran it on: * src/PHPCallgraph.php * my MediaWiki extension [2] * some other MediaWiki extensions or packages [3] I plan to improve the quality of phpCallGraph, apart if there is another more recent call graph creator for PHP I’m not aware of: * fixing major bugs: autoloading (e.g. Composer autoloader), missing indices in arrays * in the longer term, improve the inner quality: * I was surprised because ezReflection does not add a lot of features compared to the standard (today’s) Reflection and it is responsible of quite a lot of warnings/fatal errors, * perhaps use some phpDocumentor Reflection packages (Reflection [4], TypeResolver [5]) if they prove to be good quality, * in parallel, given the huge graphs it creates for huge packages like MediaWiki, I had the idea of creating a visualisation with D3.js to dive into the call graph with various zoom levels, perhaps linking the call graph of a plugin/extension to a high-level graph of the underlying software, displaying only relevant parts of it (exceptions, router, global functions, hooks); just an idea to be better defined and improved. [1] https://github.com/Seb35/phpcallgraph [2] https://www.mediawiki.org/wiki/File:Call_graph_of_extension_MediaWikiFarm.svg [3] see https://lists.wikimedia.org/pipermail/wikitech-l/2016-November/date.html (in the few hours) [4] https://github.com/phpDocumentor/Reflection [5] https://github.com/phpDocumentor/TypeResolver Thanks, Seb35 |