Skip to content

Commit

Permalink
chore: READMEを編集する
Browse files Browse the repository at this point in the history
  • Loading branch information
hirokinoue committed Feb 25, 2024
1 parent 0dc2706 commit d84cb89
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 13 deletions.
62 changes: 49 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,61 @@
## Overview
Dependency Visualizer is a tool that visualizes dependency among classes.

# Usage
TBD
This tool is experimental and possesses only basic functionality. For example, it doesn't have mechanism to resolve expressions and infer types, nor does it interpret PHPDoc.

# Example
TBD
# Installation
1. Edit composer.json
```
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/hirokinoue/dependency-visualizer"
}
]
}
```

2. Install using composer
`$ composer require --dev hirokinoue/dependency-visualizer`

# Configuration
Add a `config.php`, `config.php.dist` or `config.dist.php` to the directory from which you run dependency-visualizer.

# Development
## Run docker
`config.php` looks like this:
```
make run
<?php declare(strict_types=1);
return $config = [
'memoryLimit' => '1024M',
// Specify a part of a namespace to exclude classes from the analysis.
// For example, when dependencies of third-party packages are not wanted to be analyzed.
// Classes starting with the given namespace will not be analyzed and classes they depend on will not.
// Note that if A depends on B and C, and B depends on C, and B is excluded,
// the dependence from A to C will be shown, but the dependence from B to C will not be shown.
'endOfAnalysis' => [
'Foo\\',
],
// Specify a part of a namespace.
// Classes starting with the given namespace will not be analyzed.
'excludeFromAnalysis' => [
'Foo\Bar\\',
],
];
```

## Clear docker
# Usage
```
make clean
$ ./vendor/bin/dependency-visualizer -h
Usage: dependency-visualizer [options] <target php file>
Options:
-h: Show this help.
-l: Output log to current directory.
-m: Draw methods in diagram.
-s: Output analysis results in string format.
```

## Execute Dependency Visualizer
TBD
# Example
![example image](example.png "サンプル画像")

## Build phar file
https://github.com/box-project/box/tree/main?tab=readme-ov-file#usage
Items that cannot be distinguished as concrete class, abstract class, interface, trait or enum are drawn as stereotype.
Binary file added example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d84cb89

Please sign in to comment.