Search code examples
graphvizphpdoc

PHPDocumentor - Graphviz 'dot' command not found


I am trying to get PHPDocumentor running on a local XAMPP installation. Sadly I having a hard time doing it using package managers. Some basic questions about package managers first:

  1. How do I know where to install a package? For example: I installed PHPDocumentor using Composer. I go to my C:\xampp\htdocs\ and run a command:

    composer require "phpdocumentor/phpdocumentor:2.*"

This installs phpdocumentor in a " vendor" folder in xampp\htdocs\

  • Is this the correct path to install all these packages or is there a default dir to install this?
  • If I want to uninstall the packages, do I simply delete the "vendor" dir?

    1. After the installation I ran PHPdocumentor and got an error:

Unable to find the dot command of the GraphViz package. Is GraphViz correctly installed and present in your path?

To resolve this, I tried the following:

Installed the package graph/graphviz while my pointer was in the htdocs-folder and pointed a path to the folders:

C:\xampp\htdocs\vendor\graph\graphviz
...graph\graphviz\src
...graph\graphviz\tests

None of the above solved the problem. According to this link I have to add the \graphiz\bin directory to path, but there is no "bin" dir?

Can anyone help me out with this?

Best regards, Abayob


Solution

  • Unable to find the dot command of the GraphViz package. Is GraphViz correctly installed and present in your path?

    The steps to resolve this error are:

    1. download zip from https://graphviz.gitlab.io/_pages/Download/Download_windows.html
    2. extract to c:\some\where\graphviz
    3. add c:\some\where\graphviz\bin to your environment variable PATH
    4. run phpdoc

    I don't like to have 184MB of usefull stuff on my PC just to run the 'dot' command?

    Yes, its a lot of stuff. A more lightweight solution would be nice.