-
Notifications
You must be signed in to change notification settings - Fork 2
add Hyvä compatibility checker command #59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- New command: mageforge:hyva:compatibility:check (aliases: m:h:c:c, hyva:check) - Scans Magento modules for Hyvä theme incompatibilities - Detects RequireJS, Knockout.js, jQuery, UI Components usage - Options: --show-all, --third-party-only, --include-vendor, --detailed - Service layer: CompatibilityChecker, ModuleScanner, IncompatibilityDetector - Exit code 1 for critical issues, 0 for success - Updated CI/CD workflow and documentation
- Changed default behavior from 0 modules to third-party modules (18) - Without flags: Scans third-party only (excludes Magento_*) - With --include-vendor: Scans all 394 modules including Magento core - Updated documentation to reflect new default behavior
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a comprehensive Hyvä theme compatibility checker command to MageForge, enabling developers to scan Magento modules for incompatibilities with the Hyvä theme framework. The command detects RequireJS, Knockout.js, jQuery, and UI Components usage that would be problematic in a Hyvä environment.
Key changes:
- New CLI command with multiple aliases (mageforge:hyva:compatibility:check, m:h:c:c, hyva:check)
- Service layer architecture with three dedicated classes for scanning, detection, and orchestration
- Pattern-based detection for JavaScript, XML, and PHTML files with severity classification
- Multiple filtering options and detailed reporting capabilities
- CI/CD integration and comprehensive documentation
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 25 comments.
Show a summary per file
| File | Description |
|---|---|
| src/etc/di.xml | Registers the new CompatibilityCheckCommand in Magento's dependency injection configuration |
| src/Console/Command/Hyva/CompatibilityCheckCommand.php | Main command class implementing the CLI interface with options for filtering and detailed output |
| src/Service/Hyva/CompatibilityChecker.php | Orchestrator service that coordinates module scanning and result formatting |
| src/Service/Hyva/ModuleScanner.php | Service for recursively scanning module directories and checking for Hyvä compatibility packages |
| src/Service/Hyva/IncompatibilityDetector.php | Pattern matching service that detects incompatible code patterns in various file types |
| docs/commands.md | Comprehensive documentation of the new command including usage examples, patterns detected, and recommendations |
| .github/workflows/magento-compatibility.yml | Updated CI workflow to test the new command with help output validation |
- Interactive mode activated when no options provided - Multi-select menu for scan options: * Show all modules * Include Magento core modules * Detailed file-level issues - Displays selected configuration before scan - Falls back to direct mode if interactive fails - Consistent with theme:build command UX
- New option: Show only incompatible modules (pre-selected by default) - Improves UX by filtering out compatible modules - Users can still choose 'Show all' for complete overview - Configuration display updated to reflect selection
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Initial plan * Add actual execution tests for Hyvä compatibility checker command Co-authored-by: dermatz <6103201+dermatz@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: dermatz <6103201+dermatz@users.noreply.github.com> Co-authored-by: Mathias Elle <m.elle@dermatz.de>
#61) * Initial plan * Clarify exit code documentation for Hyvä compatibility checker Co-authored-by: dermatz <6103201+dermatz@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: dermatz <6103201+dermatz@users.noreply.github.com> Co-authored-by: Mathias Elle <m.elle@dermatz.de>
Uh oh!
There was an error while loading. Please reload this page.