C.97 VisualizerTask

The VisualizerTask generates a graphical representation of your current buildfile. This allows you to see all available targets but also the calls and dependencies among targets.

VisualizerTask is able to represent:

Table C.126: Basic attributes

format String Diagram's format. Supported formats are: png, svg, puml and eps. png no
destination String Location where the diagram will be saved. It could be a file or directory path.Same location as current buildfile no
footer String A text to display at the bottom right of the diagram.n/ano
showTitle Bool Should the buildfile's title be displayed in diagram?trueno
showDescription Bool Should the buildfile's description be displayed in diagram?falseno
direction String Use this to change the diagram's layout. Valid values are: horizontal and vertical. vertical no
server String PlantUML server. Needed by all formats except puml. http://www.plantuml.com/plantumlno

If you have network connectivity issues, you should try puml format. This format doesn't require a PlantUML server (and therefore an internet connection) to generate a diagram.

C.97.1 Examples

Using VisualizerTask with default values:


Setting diagram's format to svg with horizontal arrows:

<visualizer format="svg" direction="horizontal"/>

Save diagram into resources/images/ directory:

<visualizer destination="resources/images/"/>

Display buildfile's description and custom footer text:

<visualizer showDescription="true" footer="© Copyright 2021"/>

C.97.2 Limitations

  • Special target naming is not interpreted by VisualizerTask, targets' names are used as is. Please read Target Overriding for more details.

  • As said before, VisualizerTask depends on a remote PlantUML server. Even if only buildfile's name and targets' names are sent to server, please be sure you are not sending any sensible information.

  • PlantUML limits image width and height to 4096 pixels. Overcoming this limitation will require to configure your own PlantUML server and to configure it according to PlantUML FAQ instructions.

C.97.3 Requirements

To work properly, VisualizerTask needs to have the following installed:

C.97.4 Advanced HTTP configuration

As said before VisualizerTask needs a remote server to generate the diagrams. In order to configure the connection with remote server, several attributes and nested tags are available.

Because VisualizerTask relies on an internal Phing's library, these attributes and nested tags are shared among these tasks: HttpGetTask, HttpRequestTask and VisualizerTask.

HTTP attributes

Use the following attributes if your PlanUML server requires an authentication mechanism.

Table C.127: Attributes

authUser String The authentication user namen/aNo
authPassword String The authentication passwordn/aNo
authScheme String The authentication schemebasicNo

Supported Nested Tags

  • config

    Holds additional config data. See Guzzle documentation for supported values.

    Table C.128: Attributes

    name String Config parameter namen/aYes
    value MixedConfig valuen/aYes

  • header

    Holds additional header name and value.

    Table C.129: Attributes

    name String Header namen/aYes
    value String Header valuen/aYes

Global configuration

In addition to configuring a particular instance of Guzzle via nested <config> tags it is also possible to set default configuration values for HttpGetTask / HttpRequestTask / VisualizerTask by setting phing.http.* properties.

<property name="phing.http.proxy" value="socks5://localhost:1080/"/>

<!-- This request will go through the default proxy -->

    <!-- This proxy will be used instead of the default one -->
    <config name="proxy" value="http://foo:[email protected]:3128/"/>
    <header name="user-agent" value="Phing VisualizerTask"/>