Installation
Requirements
- PHP 8.2 or greater
- graphp/graph package from master branch (considered as future stable v1.0.0)
- graphp/graphviz package from master branch (considered as future stable v1.0.0)
- bartlett/graph-uml Core engine to build UML diagrams in PHP
- bartlett/graph-plantuml-generator A PlantUML generator for graph-uml (optional since v4.4)
- roave/better-reflection the Reflection API
PHAR
The preferred method of installation is to use the umlWriter PHAR version which can be downloaded from the most recent Github Release. This method ensures you will not have any dependency conflict issue.
Docker
Retrieve official image with Docker
Phive
You can install application globally with Phive
To upgrade global installation of the application use the following command:
You can also install application locally to your project with Phive and configuration file .phive/phars.xml
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="llaville/umlwriter" version="^4.4" copy="false" />
</phive>
Composer
The recommended way to install this library is through composer. If you don't know yet what is composer, have a look on introduction.
If you cannot install it because of a dependency conflict, or you prefer to install it for your project, we recommend you to take a look at bamarni/composer-bin-plugin. Example:
Install the Composer Bin Plugin
And answer YES to question Do you trust "bamarni/composer-bin-plugin" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?]
This is equivalent to such composer.json
contents
{
"require-dev": {
"bamarni/composer-bin-plugin": "^1.8"
},
"config": {
"allow-plugins": {
"bamarni/composer-bin-plugin": true
}
}
}
Create the umlwriter
namespace into vendor-bin
directory (for the Composer Bin Plugin)
Then add the following composer.json
file into vendor-bin/umlwriter
{
"require-dev": {
"bartlett/umlwriter": "^4.4"
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"allow-plugins": {
"cweagans/composer-patches": true
}
}
}
And finally install the bartlett\umlwriter
package
run composer bin umlwriter update
Git
The UmlWriter can be directly used from GitHub by cloning the repository into a directory of your choice.
Extra resources
Additionally, you'll have to install GraphViz (dot
executable) and/or PlantUML jar with Java Runtime (java executable).
Users of Debian/Ubuntu-based distributions may simply invoke:
while remaining users should install from GraphViz Download page and from PlantUML Download page.