Skip to content

Commit 3892b41

Browse files
committed
[FEATURE] Add script for generating the class diagram
1 parent 1d8b855 commit 3892b41

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/.php-cs-fixer.cache
33
/.php_cs.cache
44
/.phpunit.result.cache
5+
/class-diagram.md
56
/composer.lock
67
/coverage.xml
78
/phpstan.neon

composer.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,11 @@
101101
],
102102
"fix:php:fixer": "\"./.phive/php-cs-fixer\" --config=config/php-cs-fixer.php fix bin src tests",
103103
"fix:php:rector": "rector --config=config/rector.php",
104+
"generate:class-diagram": [
105+
"composer require --dev tasuku43/mermaid-class-diagram",
106+
"mermaid-class-diagram generate --path src > class-diagram.md",
107+
"composer remove --dev tasuku43/mermaid-class-diagram"
108+
],
104109
"phpstan:baseline": "phpstan --configuration=config/phpstan.neon --generate-baseline=config/phpstan-baseline.neon --allow-empty-baseline"
105110
},
106111
"scripts-descriptions": {
@@ -121,6 +126,7 @@
121126
"fix:php": "Autofixes all autofixable issues in the PHP code.",
122127
"fix:php:fixer": "Fixes autofixable issues found by PHP CS Fixer.",
123128
"fix:php:rector": "Fixes autofixable issues found by Rector.",
129+
"generate:class-diagram": "Updates the class diagram in the README.md file.",
124130
"phpstan:baseline": "Updates the PHPStan baseline file to match the code."
125131
}
126132
}

0 commit comments

Comments
 (0)