-
Notifications
You must be signed in to change notification settings - Fork 2
Address code review feedback: fix duplicate config, improve regex patterns, enhance security #65
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
Merged
dermatz
merged 4 commits into
feature-hyva-compat-checker
from
copilot/sub-pr-59-another-one
Jan 12, 2026
Merged
Address code review feedback: fix duplicate config, improve regex patterns, enhance security #65
dermatz
merged 4 commits into
feature-hyva-compat-checker
from
copilot/sub-pr-59-another-one
Jan 12, 2026
+50
−79
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…rns, safer environment handling Co-authored-by: dermatz <6103201+dermatz@users.noreply.github.com>
…ection Co-authored-by: dermatz <6103201+dermatz@users.noreply.github.com>
Co-authored-by: dermatz <6103201+dermatz@users.noreply.github.com>
Contributor
Author
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Copilot
AI
changed the title
[WIP] Add Hyvä compatibility checker command
Address code review feedback: fix duplicate config, improve regex patterns, enhance security
Jan 12, 2026
dermatz
added a commit
that referenced
this pull request
Jan 12, 2026
* Add Hyvä compatibility checker command - 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 * Fix: Default scan now includes third-party modules - 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 * Add interactive menu with Laravel Prompts - 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 * Docs: Add interactive mode documentation * Add 'incompatible only' option to interactive menu - 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 * Remove pre-selection from 'incompatible only' option * Update src/Service/Hyva/ModuleScanner.php Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update CHANGELOG for Hyvä compatibility checker * ✨ feat: update CHANGELOG and improve di.xml formatting * Update src/Service/Hyva/IncompatibilityDetector.php Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Add actual execution tests for Hyvä compatibility checker in CI (#60) * 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> * Clarify exit code behavior in Hyvä compatibility checker documentation (#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> * Update src/Console/Command/Hyva/CompatibilityCheckCommand.php Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Initial plan (#64) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Mathias Elle <m.elle@dermatz.de> * Update src/Service/Hyva/IncompatibilityDetector.php Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Address code review feedback: fix duplicate config, improve regex patterns, enhance security (#65) * Initial plan * Apply code review feedback: fix duplicate di.xml, improve regex patterns, safer environment handling Co-authored-by: dermatz <6103201+dermatz@users.noreply.github.com> * Replace error suppression with explicit exception handling in TTY detection Co-authored-by: dermatz <6103201+dermatz@users.noreply.github.com> * Fix RequireJS pattern regex to properly match module references 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: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
dermatz
added a commit
that referenced
this pull request
Jan 12, 2026
* Add Hyvä compatibility checker command - 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 * Fix: Default scan now includes third-party modules - 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 * Add interactive menu with Laravel Prompts - 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 * Docs: Add interactive mode documentation * Add 'incompatible only' option to interactive menu - 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 * Remove pre-selection from 'incompatible only' option * Update src/Service/Hyva/ModuleScanner.php Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update CHANGELOG for Hyvä compatibility checker * ✨ feat: update CHANGELOG and improve di.xml formatting * Update src/Service/Hyva/IncompatibilityDetector.php Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Add actual execution tests for Hyvä compatibility checker in CI (#60) * 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> * Clarify exit code behavior in Hyvä compatibility checker documentation (#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> * Update src/Console/Command/Hyva/CompatibilityCheckCommand.php Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Initial plan (#64) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Mathias Elle <m.elle@dermatz.de> * Update src/Service/Hyva/IncompatibilityDetector.php Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Address code review feedback: fix duplicate config, improve regex patterns, enhance security (#65) * Initial plan * Apply code review feedback: fix duplicate di.xml, improve regex patterns, safer environment handling Co-authored-by: dermatz <6103201+dermatz@users.noreply.github.com> * Replace error suppression with explicit exception handling in TTY detection Co-authored-by: dermatz <6103201+dermatz@users.noreply.github.com> * Fix RequireJS pattern regex to properly match module references 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> * Revert "Address code review feedback: fix duplicate config, improve regex patterns, enhance security (#65)" This reverts commit f77c7ac. * Update docs/commands.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * ✨ feat: register Hyvä compatibility check command in di.xml * ♻️ refactor: improve compatibility check command options and logic --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Addresses 10 code review comments from PR #59, focusing on configuration cleanup, pattern matching accuracy, and security improvements.
Configuration & Code Structure
CommandListconfiguration block (lines 6-38)isHyvaCompatibilityPackage()into public wrapper to eliminate unnecessary indirectionRegex Pattern Improvements
mage/module references indefine()/require()calls\$\(.*\)\..*\(/with specific method matching (click, on, ready, etc.) to reduce false positives/<referenceBlock\b[^>]*\bremove\s*=\s*"true"[^>]*>/sSecurity & Environment Handling
shell_exec('stty -g')withstream_isatty(STDIN)/posix_isatty(STDIN)fallback chain$_SERVER[$name]instead ofputenv()to avoid modifying global process environment@suppression with explicit try-catch blocksInteractive Mode Alignment
$excludeVendor = !$includeVendorDocumentation
Magento_*(wasMagento\_\*)✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.