Merged
Conversation
Deprecates unmaintained PHPLOC task and introduces modern PHPMetrics as replacement for code metrics analysis. Changes: - PHPLOC (loc) task now opt-in only (removed from default pipeline) - New Metrics task using PHPMetrics (opt-in, not in default yet) - Comprehensive metrics: MI score, complexity, coupling, cohesion - HTML reports + JSON output for CI - Updated documentation BREAKING CHANGE: LOC task removed from default QC pipeline. Use 'horde-components qc loc' to run explicitly (deprecated). Prefer 'horde-components qc metrics' for modern analysis.
Promotes PHPMetrics to default QC pipeline, replacing deprecated PHPLOC. The metrics task now runs automatically with 'horde-components qc'. Default pipeline order: 1. gitignore - VCS configuration 2. lint - syntax validation 3. phpcsfixer - code style 4. unit - test suite 5. phpstan - static analysis 6. metrics - code quality metrics (NEW) PHPLOC (loc) remains available for explicit use but is deprecated.
Adds separators before and after deactivated task warnings to match the visual formatting of active tasks. Improves readability of QC pipeline output when optional dependencies are missing.
Extends binary detection to check global Composer installations: - ~/.composer/vendor/bin/phpmetrics (legacy) - ~/.config/composer/vendor/bin/phpmetrics (XDG standard) - %APPDATA%/Composer/vendor/bin/phpmetrics (Windows) Supports tools installed with: composer global require phpmetrics/phpmetrics
…ibility Makes QC Tasks compatible with the SystemCall trait by implementing the pretend() method. This allows QC tasks to respect the --pretend flag like Release tasks do. Benefits: - QC tasks can now use SystemCall trait methods (system, exec, etc.) - --pretend mode works for QC operations - Consistent behavior between QC and Release tasks Fixes fatal error: Call to undefined method pretend() when running the metrics task.
PHPMetrics v2.x has issues with multiple directory arguments, resulting in incomplete analysis. Changed to analyze only the primary source directory (src/ or lib/) to ensure all classes are properly scanned. Before: 9 classes analyzed (broken) After: 179 classes analyzed (correct) The task now properly analyzes all subdirectories within src/ including Runner/, Helper/, Module/, Component/, etc.
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
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.
Modernize code metrics