Skip to content

Commit

Permalink
Embed newest plugins to own panaly configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
DZunke committed Apr 15, 2024
1 parent a9e9511 commit 3b4b144
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/.phpunit.cache/
/tmp/
/vendor/
.phpcs-cache
.project-analyzer-cache
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ config file with the CLI Command like `vendor/bin/panaly -c my-own-config.yaml`.
<summary>panaly.dist.yaml</summary>

```yaml
# panaly.dist.yaml
plugins: # Registered plugins that deliver single metrics that could be utilized for metric groups
Namespace/Of/The/Project/FilesystemPlugin: ~ # registers a "filesystem_directory_count" and a "fielsystem_file_count" metric
Namespace/Of/Another/Project/PHPStanBaselinePlugin: ~ # registers a simple "phpstan_baseline_total_count" metric
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,15 @@
],
"require": {
"php": "^8.2",
"psr/log": "^3.0",
"symfony/console": "^7.0",
"symfony/event-dispatcher": "^7.0",
"symfony/yaml": "^7.0"
},
"require-dev": {
"doctrine/coding-standard": "^12.0",
"dzunke/panaly-files": "dev-main",
"dzunke/panaly-json-timeline-storage": "dev-main",
"dzunke/panaly-markdown-report": "dev-main",
"dzunke/panaly-symfony-dump": "dev-main",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan-deprecation-rules": "^1.1",
Expand Down
2 changes: 0 additions & 2 deletions panaly
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ include $_composer_autoload_path ?? __DIR__ . '/vendor/autoload.php';
// Give the possibility to change the runtime configuration before the metric collection starts
$runtimeConfiguration->getEventDispatcher()->dispatch(new RuntimeLoaded($runtimeConfiguration));

// TODO: Add a validation thingy here ... so the full configuration file is validated against the now existing runtime

// Execute the metric collection to get a result of all configured collection results
$collectionResult = (new Collector($configurationFile, $runtimeConfiguration))->collect();

Expand Down
9 changes: 9 additions & 0 deletions panaly.dist.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
plugins:
DZunke\PanalyFiles\FilesPlugin: ~
DZunke\PanalyJsonTimelineStorage\JsonTimelineStoragePlugin: ~
DZunke\PanalySymfonyDump\SymfonyDumpPlugin: ~
DZunke\PanalyMarkdownReport\MarkdownPlugin: ~

groups:
filesystem:
Expand All @@ -24,5 +26,12 @@ groups:
names:
- "*.php"

storage:
json-timeline-storage:
directory: "./tmp/panaly-timeline-storage"
dateFormat: "Y-m-d"

reporting:
symfony_dump: ~
markdown:
targetFile: "./tmp/my-markdown-report.md"

0 comments on commit 3b4b144

Please sign in to comment.