Skip to content

Commit

Permalink
v1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
smeghead committed Dec 7, 2024
1 parent 1c33b21 commit dd6e182
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# CHANGELOG

## v1.5.0 (2024-12-07)

### Features

* feat: Filter relations from and to class #90 (@jose-ba)

### Bug fix

* Add argument to `--svg-topurl` in help message.
Expand Down
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ OPTIONS
--header='header string' additional header string. You can specify multiple header values.
--include='wildcard' include target file pattern. (default: `*.php`) You can specify multiple include patterns.
--exclude='wildcard' exclude target file pattern. You can specify multiple exclude patterns.
--rel-target-from='clases' comma separated list of classes to filter dependencies from
--rel-target-to='classes' comma separated list of classes to filter dependencies to
--rel-target='classes' comma separated list of classes to filter dependencies from or to. this option overrides
--rel-target-from and --rel-target-to if set.
--rel-target-depth=integer max depth of dependencies to show when using --from or --to filters
```
## How to execute
Expand Down Expand Up @@ -229,6 +234,26 @@ $ vendor/bin/php-class-diagram \
path/to/src
```
#### option `rel-target`
If there are a very large number of target classes, the class diagram will be cumbersome and difficult to understand.
In such a case, you can specify the classes you want to study in the `--rel-target` field to generate a class diagram for only the related classes.
By using `--rel-target-from` and `--rel-target-to`, it is also possible to further narrow down the list according to the direction of dependencies.
```bash
$ vendor/bin/php-class-diagram \
--rel-target-from=Entry \
--rel-target-depth=3 \
path/to/src
```
```bash
$ vendor/bin/php-class-diagram \
--rel-target-from-from=Entry \
--rel-target-depth=3 \
path/to/src
```
### Package Diagram
You can visualize package dependencies by creating a package relationship diagram using php-class-diagram.
Expand Down
2 changes: 1 addition & 1 deletion src/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

final class Main
{
public const VERSION = 'v1.4.2';
public const VERSION = 'v1.5.0';

public function __construct(
private string $directory,
Expand Down

0 comments on commit dd6e182

Please sign in to comment.