Skip to content

Refactor compatibility checker - #256

Merged
dermatz merged 7 commits into
mainfrom
refactor-compatibility-checker
Sep 8, 2026
Merged

Refactor compatibility checker#256
dermatz merged 7 commits into
mainfrom
refactor-compatibility-checker

Conversation

@dermatz

@dermatz dermatz commented Sep 8, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI lite review requested due to automatic review settings September 8, 2026 07:58
@github-actions github-actions Bot added documentation Improvements or additions to documentation Command labels Sep 8, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The CLI’s vendor-module default behaviour appears inconsistent with the service default/tests, and runScan() currently ignores its $thirdPartyOnly argument, both of which should be reconciled before approval.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Refactors the Hyvä compatibility checker/CLI surface to clarify option naming and simplify “has incompatibilities” into a more general “has issues”, while expanding Hyvä-aware module detection.

Changes:

  • Rename results flag hasIncompatibilitieshasIssues across checker, command, and tests.
  • Add/rename CLI flags (--include-core, --exclude-vendor) and introduce early validation for conflicting scope options.
  • Extend module Hyvä-awareness detection to treat hyva-themes.json as Hyvä-aware (with unit tests).
File summaries
File Description
tests/Unit/Service/Hyva/ModuleScannerTest.php Adds coverage for hyva-themes.json Hyvä-awareness and adjusts isExists stubbing.
tests/Unit/Service/Hyva/CompatibilityCheckerTest.php Updates assertions/helpers to use hasIssues.
tests/Unit/Console/Command/Hyva/CompatibilityCheckCommandTest.php Updates expected results key and adds tests for new/renamed CLI options + conflict handling.
src/Service/Hyva/ModuleScanner.php Introduces isHyvaAware() to include hyva-themes.json as a Hyvä-aware signal.
src/Service/Hyva/CompatibilityChecker.php Renames results key to hasIssues and updates internal toggling accordingly.
src/Console/Command/Hyva/CompatibilityCheckCommand.php Renames --include-vendor--include-core, adds --exclude-vendor, adds option conflict validation, and switches to hasIssues.
docs/commands_reference.md Documents renamed/added CLI options for hyva:check.
CHANGELOG.md Updates listed options for the Hyvä compatibility check command.
Review details
  • Files reviewed: 8/8 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 229 to 233
$showAll = (bool) $input->getOption(self::OPTION_SHOW_ALL);
$thirdPartyOnly = (bool) $input->getOption(self::OPTION_THIRD_PARTY_ONLY);
$includeVendor = (bool) $input->getOption(self::OPTION_INCLUDE_VENDOR);
$includeCore = (bool) $input->getOption(self::OPTION_INCLUDE_CORE);
$excludeVendor = (bool) $input->getOption(self::OPTION_EXCLUDE_VENDOR);
$detailed = (bool) $input->getOption(self::OPTION_DETAILED);
Comment thread src/Console/Command/Hyva/CompatibilityCheckCommand.php Outdated
Copilot AI review requested due to automatic review settings September 8, 2026 08:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The “incompatible-only” interactive display mode is not currently enforced (the flag is not used to filter warning-only modules), which produces incorrect CLI output relative to the user’s selection.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 8/8 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment on lines 280 to 284
// default = show modules with any issues (critical or warnings)
$displayShowAll = $showAll && !$incompatibleOnly;

// Display results
$this->displayResults($results, $displayShowAll);
@dermatz
dermatz merged commit 6294a6c into main Sep 8, 2026
20 checks passed
@dermatz
dermatz deleted the refactor-compatibility-checker branch September 8, 2026 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Command documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants