Download the PHP package srmilon/graph-composer without Composer
On this page you can find all versions of the php package srmilon/graph-composer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download srmilon/graph-composer
More information about srmilon/graph-composer
Files in srmilon/graph-composer
Package graph-composer
Short Description Dependency graph visualization for composer.json
License MIT
Homepage https://github.com/clue/graph-composer
Informations about the package graph-composer
clue/graph-composer 
Graph visualization for your project's composer.json
and its dependencies:
Table of contents
- Usage
- graph-composer show
- graph-composer export
- Install
- As a phar (recommended)
- Updating phar
- Installation using Composer
- Updating dependency
- Manual Installation from Source
- Updating manually
- License
Usage
Once clue/graph-composer is installed, you can use it via command line like this.
graph-composer show
The show
command creates a dependency graph for the given project path and opens
the default desktop image viewer for you:
-
It accepts an optional argument which is the path to your project directory or composer.json file (defaults to checking the current directory for a composer.json file).
- You may optionally pass an
--format=[svg/svgz/png/jpeg/...]
option to set the image type (defaults tosvg
).
graph-composer export
The export
command works very much like the show
command, but instead of opening your
default image viewer, it will write the resulting graph to STDOUT or into an image file:
-
It accepts an optional argument which is the path to your project directory or composer.json file (defaults to checking the current directory for a composer.json file).
-
It accepts an additional optional argument which is the path to write the resulting image to. Its file extension also sets the image format (unless you also explicitly pass the
--format
option). Example call:If this argument is not given, it defaults to writing to STDOUT, which may be useful for scripting purposes:
- You may optionally pass an
--format=[svg/svgz/png/jpeg/...]
option to set the image type (defaults tosvg
).
Install
You can grab a copy of clue/graph-composer in either of the following ways.
As a phar (recommended)
You can simply download a pre-compiled and ready-to-use version as a Phar
to any directory.
Simply download the latest graph-composer.phar
file from our
releases page:
Additionally, you'll have to install GraphViz (dot
executable).
Users of Debian/Ubuntu-based distributions may simply invoke:
Windows users have to download GraphViZ for Windows and remaining users should install from GraphViz homepage.
That's it already. You can now verify everything works by running this:
If you prefer a global (system-wide) installation without having to type the
.phar
extension each time, you may simply invoke:You can verify everything works by running:
Updating phar
There's no separate update
procedure, simply download the latest release again
and overwrite the existing phar.
Installation using Composer
Alternatively, you can also install graph-composer as part of your development dependencies.
You will likely want to use the require-dev
section to exclude graph-composer in your production environment.
This method also requires PHP 5.3+, GraphViz and, of course, Composer.
You can either modify your composer.json
manually or run the following command to include the latest tagged release:
Now you should be able to invoke the following command in your project root:
Alternatively, you can install this globally for your user by running:
Now, assuming you have ~/.composer/vendor/bin
in your path, you can invoke the following command:
Note: You should only invoke and rely on the main graph-composer bin file. Installing this project as a non-dev dependency in order to use its source code as a library is not supported.
Updating dependency
Just run composer update clue/graph-composer
to update to the latest release.
If you installed it globally via composer you can run composer global update clue/graph-composer
instead.
Manual Installation from Source
This project requires PHP 5.3+, Composer and GraphViz:
You can now verify everything works by running graph-composer like this:
If you want to build the above mentioned
graph-composer.phar
yourself, you have to install clue/phar-composer and can simply invoke:
Updating manually
License
MIT
All versions of graph-composer with dependencies
jms/composer-deps-analyzer Version 0.1.*
symfony/console Version ~2.1
graphp/graphviz Version ~0.2.0