From 52aa5e384389032d0bec1162526a84a4e0a6a160 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 25 Jan 2026 14:41:10 +0000 Subject: [PATCH 1/4] Initial plan From 495d3b70c7b38fe9ebaabcf651cbaaa932b35c08 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 25 Jan 2026 14:44:46 +0000 Subject: [PATCH 2/4] Make namespace filters configurable via --exclude-namespace option Co-authored-by: makomweb <1567373+makomweb@users.noreply.github.com> --- src/Command/ReportCommand.php | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/src/Command/ReportCommand.php b/src/Command/ReportCommand.php index 58f48ba..c3b8a67 100644 --- a/src/Command/ReportCommand.php +++ b/src/Command/ReportCommand.php @@ -42,6 +42,7 @@ protected function configure(): void $this ->addArgument('folder', InputArgument::REQUIRED, 'The source code folder to be checked') ->addOption('out-dir', null, InputOption::VALUE_REQUIRED, 'Base output directory for reports (defaults to project root)') + ->addOption('exclude-namespace', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Namespace prefix to exclude from the report (can be used multiple times)') ; } @@ -78,27 +79,25 @@ private function doExecute(InputInterface $input, OutputInterface $output): void $io = new SymfonyStyle($input, $output); $io->title(sprintf('Report for "%s"', $folder)); + // Get user-provided namespace exclusions or use sensible defaults + /** @var string[] $excludeNamespaces */ + $excludeNamespaces = $input->getOption('exclude-namespace'); + + // If no exclusions provided, use common vendor/framework namespaces as defaults + if (empty($excludeNamespaces)) { + $excludeNamespaces = [ + 'Doctrine\\', + 'Symfony\\', + 'Psr\\', + ]; + } + /** @var Node[] */ $nodes = array_reduce( iterator_to_array(YieldNodes::from($folder)), new NodeReducer( ignoreTypes: IgnoreableTypes::VALUES, - shouldNotStartWith: [ - 'App\\Kernel', - 'App\\CLI\\', - 'App\\DDD\\', - 'Doctrine\\', - 'Symfony\\', - 'Psr\\', - 'PhpParser\\', - 'phpDocumentor\\', - 'Monolog\\', - 'OpenTelemetry\\', - 'Rx\\', - 'React\\', - 'InfluxDB2\\', - 'EasyCorp\\Bundle\\EasyAdminBundle\\', - ], + shouldNotStartWith: $excludeNamespaces, shouldNotContain: [ 'array<', 'array{', From 5d1a0024b1318d76603caa44a59c33a12f8a2dbc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 25 Jan 2026 14:45:03 +0000 Subject: [PATCH 3/4] Document --exclude-namespace option in README Co-authored-by: makomweb <1567373+makomweb@users.noreply.github.com> --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 2dd385b..fd7eb46 100644 --- a/README.md +++ b/README.md @@ -66,8 +66,14 @@ Tactix provides a Symfony Console command `tactix:report` that creates a static bin/console tactix:report # or, when installed as a dependency with optional output directory vendor/bin/console tactix:report --out-dir= +# Exclude specific namespaces from the report (can be used multiple times) +vendor/bin/console tactix:report --exclude-namespace="App\\Kernel" --exclude-namespace="App\\CLI\\" ``` +Options: +- `--out-dir`: Base output directory for reports (defaults to project root) +- `--exclude-namespace`: Namespace prefix to exclude from the report (can be used multiple times). By default, `Doctrine\`, `Symfony\`, and `Psr\` namespaces are excluded. When you provide your own exclusions, you replace these defaults. + Notes: - the output files index.html, report.js, chart.js, styles.css are created - the command prints discovered classes and forbidden relations and finishes with `Report written to: ./report/index.html`. From f84e194655493c70d15b8092a277b61307c1581b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 25 Jan 2026 14:45:47 +0000 Subject: [PATCH 4/4] Fix documentation: consistent namespace prefix examples Co-authored-by: makomweb <1567373+makomweb@users.noreply.github.com> --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fd7eb46..3356142 100644 --- a/README.md +++ b/README.md @@ -67,12 +67,12 @@ bin/console tactix:report # or, when installed as a dependency with optional output directory vendor/bin/console tactix:report --out-dir= # Exclude specific namespaces from the report (can be used multiple times) -vendor/bin/console tactix:report --exclude-namespace="App\\Kernel" --exclude-namespace="App\\CLI\\" +vendor/bin/console tactix:report --exclude-namespace="App\\CLI\\" --exclude-namespace="App\\Infrastructure\\" ``` Options: - `--out-dir`: Base output directory for reports (defaults to project root) -- `--exclude-namespace`: Namespace prefix to exclude from the report (can be used multiple times). By default, `Doctrine\`, `Symfony\`, and `Psr\` namespaces are excluded. When you provide your own exclusions, you replace these defaults. +- `--exclude-namespace`: Namespace prefix to exclude from the report (can be used multiple times). By default, `Doctrine\\`, `Symfony\\`, and `Psr\\` namespaces are excluded. When you provide your own exclusions, you replace these defaults. Notes: - the output files index.html, report.js, chart.js, styles.css are created