Skip to content

Commit ecfc298

Browse files
committed
v0.1.0
1 parent 7484087 commit ecfc298

File tree

3 files changed

+30
-1
lines changed

3 files changed

+30
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# CHANGELOG
22

3+
## v0.1.0 (2202-12-08)
4+
35
### Features
46

57
* add package diagram description to README.

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ A CLI tool that parses the PHP source directory and outputs PlantUML class diagr
4747

4848
OPTIONS
4949
-h, --help show this help page.
50+
-v, --version show version.
5051
--class-diagram output class diagram script. (default)
5152
--package-diagram output package diagram script.
5253
--jig-diagram output class diagram and package diagram script.
@@ -58,6 +59,8 @@ OPTIONS
5859
--php7 parse php source file as php7.
5960
--php8 parse php source file as php8. (not suppoted)
6061
--header='header string' additional header string. You can specify multiple header values.
62+
--include='wildcard' include target file pattern. (default: `*.php`) You can specify multiple include patterns.
63+
--exclude='wildcard' exclude target file pattern. You can specify multiple exclude patterns.
6164
```
6265

6366
## How to execute
@@ -135,6 +138,30 @@ Use PlnatUML to convert the PlantUML script to an image.
135138
![PlantUML output image.](output.png)
136139
137140
141+
#### option `header`
142+
143+
You can specify the string to be output to the PlantUML header.
144+
145+
```bash
146+
$ vendor/bin/php-class-diagram --header='title "This is the class diagram"' test/fixtures/no-namespace
147+
```
148+
149+
#### option `include`
150+
151+
You can add patterns to find target files to process.
152+
153+
```bash
154+
$ vendor/bin/php-class-diagram --include='*.php' --include='*.php4' test/fixtures/no-namespace
155+
```
156+
157+
#### option `exclude`
158+
159+
You can specify patterns to exclude files from being processed.
160+
161+
```bash
162+
$ vendor/bin/php-class-diagram --exclude='test' --include='*Exception.php' test/fixtures/no-namespace
163+
```
164+
138165
### Package Diagram
139166
140167
You can visualize package dependencies by creating a package relationship diagram with php-class-diagram.

src/Main.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function __construct(string $directory, Options $options) {
1818
$finder->files()->name($options->includes());
1919
$excludes = $options->excludes();
2020
if (count($excludes) > 0) {
21-
$finder->files()->notName($excludes);
21+
$finder->files()->notName($excludes)->notPath($excludes);
2222
}
2323
$entries = [];
2424
foreach ($finder as $file) {

0 commit comments

Comments
 (0)