Skip to content

Latest commit

 

History

History
282 lines (230 loc) · 14.2 KB

File metadata and controls

282 lines (230 loc) · 14.2 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[Unreleased]

[1.1.0] - 2026-07-16

Added

  • Opt-in wrapper overwriteextra.code-review-guardian.auto_update_wrapper in the consuming project's composer.json controls whether an existing code-review-guardian.sh is overwritten on install/update (default: false).
  • Bundle standards alignment — Root Makefile targets (release-check, composer-sync, Rector, PHPStan, check-no-cursor-coauthor), composer.json archive.exclude, canonical documentation index and badges, docs/INSTALLATION.md, docs/USAGE.md, docs/RELEASE.md, docs/ENGRAM.md, docs/SECURITY.md, CODE_OF_CONDUCT.md, coverage helper scripts, phpstan-baseline.neon, and issue/PR templates.
  • Git hygiene (REQ-GIT-001) — CI job and local hooks/scripts that reject Cursor Co-authored-by trailers in commit history.

Changed

  • Wrapper script install behaviorcode-review-guardian.sh is installed when missing; if a local copy differs from the package, the plugin warns and leaves it unchanged unless auto_update_wrapper is enabled (or a force update path is used). Identical checksums are skipped silently.
  • CI matrix — Tests PHP 8.2–8.5 against Symfony 7.4 / 8.0 / 8.1 (with incompatible pairs excluded); coverage on PHP 8.2 + Symfony 7.4. Dependabot groups for symfony/* and phpstan/*.
  • Development tooling — Makefile release pipeline, setup-hooks installs commit-msg, Docker Compose project name and coverage volume (from earlier 1.x work).

Fixed

  • Composer lock vs Docker PHP 8.2config.platform.php set to 8.1.0 so composer.lock resolves Symfony 6.4 / compatible dev tools (not Symfony 8, which requires PHP ≥8.4).

Documentation

  • README / INSTALLATION — Documented opt-in wrapper updates; clarified package removal (docs/GGA.md is kept); expanded documentation index (CI, Spec Kit, Code of Conduct).
  • UPGRADING — Notes for 1.1.0 wrapper behavior change.

[1.0.1] - 2026-01-11

Fixed

  • Fixed PHPUnit test failures by improving callback assertions to handle multiple message formats
  • Fixed test testUpdateGitignoreDoesNotUpdateIfEntriesExist to correctly handle framework detection messages
  • Fixed test testUninstallRemovesGitignoreEntries to accept all uninstall progress messages

Added

  • Xdebug configuration in Dockerfile for code coverage generation
  • Improved Makefile consistency: all commands now use docker-compose run --rm instead of exec

Changed

  • Improved test stability by using flexible callback assertions in PHPUnit tests
  • Makefile commands now work without requiring a running container (using run --rm instead of exec)

[1.0.0] - 2026-01-11

Added

  • Stable Release: First stable version of Code Review Guardian
  • Complete modular architecture: Refactored script structure for improved maintainability
    • Minimal entry point script (code-review-guardian.sh) in project root (~40 lines)
    • All logic executed from vendor/nowo-tech/code-review-guardian/bin/
    • Modular sub-scripts: functions.sh, config.sh, review.sh, comments.sh
    • Better separation of concerns and easier updates

Changed

  • Script architecture: Major refactoring to modular design (from v0.0.7)
    • Main script acts as lightweight wrapper
    • All implementation code in vendor directory
    • Improved maintainability and code organization

Technical Details

  • Complete YAML configuration parsing and validation
  • Framework detection (Symfony, Laravel, Generic)
  • Comprehensive test suite (38 tests, 100% code coverage)
  • Full documentation in English
  • Composer plugin with automatic installation and updates

[0.0.7] - 2026-01-11

Changed

  • Major refactoring: Script architecture restructured
    • Main script (code-review-guardian.sh) is now minimal (~40 lines)
    • The main script acts only as an entry point and delegates to the implementation in vendor
    • All logic is executed from vendor/nowo-tech/code-review-guardian/bin/main.sh
    • Modular structure with sub-scripts for better maintainability
    • The script in the project root is now just a lightweight wrapper

Technical Details

  • Main script automatically detects the vendor directory location
  • Executes the main script from the package installed in vendor
  • Improves separation of concerns and facilitates updates
  • Package code is maintained in vendor, not copied to the project

[0.0.6] - 2026-01-11

Fixed

  • Fixed YAML parser to correctly remove comments from parsed values
    • Values with inline comments (e.g., provider: codex # codex, claude) now parse correctly
    • Comments after # are stripped before parsing the value
  • Fixed PHP version check to avoid warnings in output
    • PHP warnings are now redirected to stderr
    • Output is cleaned with head -1 and tr -d '\n' to prevent parsing errors
    • Resolves issues with PHP timezone warnings appearing in script output

Added

  • Added --debug mode for verbose debugging
    • New debug() function outputs debug messages to stderr
    • Debug messages show configuration loading, file filtering, and other internal operations
    • Use ./code-review-guardian.sh --debug to enable debug output
  • Improved token handling in .env files
    • Token is now automatically added to .env.dist if it exists
    • Informative message displayed when token is added to .env.dist
    • Better guidance for users when tokens are missing

[0.0.5] - 2026-01-11

Added

  • Complete implementation of all YAML configuration options
    • All configuration values are now parsed, validated, displayed, and applied correctly
    • Full support for nested configuration values (e.g., agents.behavior.*)
    • Configuration validation (types, ranges, valid values)
    • All settings are shown in script output when relevant

Changed

  • Updated all GitHub URLs to use correct repository name (CodeReviewGuardian instead of code-review-guardian)
    • README.md badges and links corrected
    • composer.json homepage and support URLs corrected
    • All documentation files updated (AGENTS_CONFIG.md, GGA.md, CONTRIBUTING.md)
  • Improved README.md with "Current Status" section
    • Clearly distinguishes between implemented features and features in development
    • Updated usage descriptions to reflect actual functionality
  • Enhanced script output to show all configuration values
    • GGA settings: auto_review, post_comments, max_comments, strict_mode
    • Agents settings: temperature, behavior.* (suggest_fixes, explain_issues, provide_examples, severity_threshold)
    • Rules settings: block_on_critical_issues, block_on_security_issues
    • Comments settings: enabled, post_review_summary, include_suggestions, format
  • Improved configuration validation
    • Validates max_comments is a number
    • Validates severity_threshold (low/medium/high/critical)
    • Validates temperature (0-2 range)
    • Validates comments.format (markdown/text)
    • Shows warnings for invalid values

Fixed

  • Fixed AGENTS_CONFIG.md not being included in Composer package
    • Added docs/AGENTS_CONFIG.md to files array in composer.json
    • File is now available in vendor/nowo-tech/code-review-guardian/docs/AGENTS_CONFIG.md
  • Fixed configuration parsing for nested values
    • agents.behavior.* values now parse correctly
    • All configuration options from YAML are now properly loaded

Documentation

  • Updated AUDIT_REPORT.md to reflect current state (100% operational)
  • All documentation files reviewed and verified for accuracy
  • GitHub repository URLs corrected throughout all documentation

[0.0.4] - 2025-12-26

Improved

[0.0.3] - 2025-12-26

Changed

  • Renamed configuration file from .code-review-guardian.yml to code-review-guardian.yaml
    • Removed leading dot so code-review-guardian.sh and code-review-guardian.yaml appear together alphabetically
    • Changed extension from .yml to .yaml (standard YAML extension)
    • All configuration files in config/*/ have been renamed accordingly
    • Migration: If you have an existing .code-review-guardian.yml file, you can safely rename it to code-review-guardian.yaml. The content remains compatible.

Fixed

  • Fixed script file (code-review-guardian.sh) not being copied or updated during installation and updates
    • The script now always updates on composer install and composer update to ensure users have the latest version with bug fixes and new features
    • Previously, the script would only be copied on first installation and never updated, even when updating to a newer package version
    • Updated tests to verify script updates correctly on both install and update commands

Migration Guide (0.0.2 → 0.0.3)

If you're upgrading from version 0.0.2 or earlier:

  1. Rename your configuration file (if you have one):

    # If you have .code-review-guardian.yml, rename it to code-review-guardian.yaml
    mv .code-review-guardian.yml code-review-guardian.yaml
  2. Update the package:

    composer update nowo-tech/code-review-guardian
  3. Update your .gitignore (if you have manual entries):

    • Remove: .code-review-guardian.yml
    • Ensure: code-review-guardian.yaml is present (automatically added during installation)
  4. Verify:

    # The script should work with the new config file name
    ./code-review-guardian.sh

The configuration file format and content remain the same - only the filename changed.

[0.0.2] - 2025-12-26

Added

  • Comprehensive test suite with 100% code coverage
    • 36 tests covering all code paths and edge cases
    • FrameworkDetectorTest: 15 tests covering all framework detection scenarios
    • PluginTest: 21 tests covering installation, update, uninstall, and edge cases
    • Tests for all frameworks (Symfony, Laravel, Yii, CakePHP, Laminas, CodeIgniter, Slim, Generic)
    • Tests for JSON parsing edge cases, file handling, gitignore management, and force updates
  • Token setup guide (docs/TOKEN_SETUP.md) with step-by-step instructions for GitHub, GitLab, and Bitbucket
  • Improved environment variable handling in code-review-guardian.sh:
    • Support for .env and .env.local files (following Symfony/Laravel convention)
    • Automatic creation of .env file with template if missing
    • Automatic addition of missing environment variables
    • Proper handling of quoted values and comments in .env files
  • .gitattributes file to ensure proper package distribution (excludes development files)
  • Explicit files field in composer.json to ensure bin/code-review-guardian.sh, config/, and docs/GGA.md are included in the package

Changed

  • Improved code documentation: All PHP code now has complete PHPDoc comments in English
  • Updated GitHub Actions CI/CD pipeline to require 100% code coverage (previously 90%)
  • Enhanced environment file loading order: .env (base) → .env.local (overrides, higher priority)

Fixed

  • Fixed package distribution: bin/code-review-guardian.sh is now explicitly included in the Composer package via composer.json files field
  • Fixed .gitattributes configuration to ensure all necessary files are included while excluding development-only files

[0.0.1] - 2025-12-26

Added

  • Initial release
  • Provider-agnostic code review guardian for PHP projects
  • Multi-framework support with automatic framework detection:
    • Symfony: Optimized configuration for Symfony projects
    • Laravel: Optimized configuration for Laravel projects
    • Generic: Works with any PHP framework (Yii, CakePHP, CodeIgniter, Slim, Laminas, etc.)
  • Automatic configuration: Installs framework-specific configuration files (code-review-guardian.yaml)
  • Git Guardian Angel (GGA): Provider-agnostic code review system
    • Automatic review of pull requests and merge requests
    • Post review comments to PRs/MRs
    • Works with GitHub, GitLab, Bitbucket, and any Git hosting service
  • AI Agents support: Configuration for AI-powered code review agents
    • Support for OpenAI, Anthropic, and GitHub Copilot
    • Configurable review scope and behavior
    • Severity thresholds and review settings
  • Git provider integration:
    • Automatic provider detection (GitHub, GitLab, Bitbucket)
    • Token configuration via .env file (GIT_TOKEN)
    • Repository URL auto-detection
  • Documentation files: Automatic installation of documentation
    • docs/AGENTS.md - Code review rules file (framework-specific, used by GGA)
    • docs/GGA.md - Git Guardian Angel setup guide
  • Configuration file (code-review-guardian.yaml):
    • Git provider settings
    • Git Guardian Angel (GGA) configuration
    • AI Agents configuration
    • Code review rules
    • Comment settings for PRs/MRs
  • Shell script (code-review-guardian.sh) for running code review guardian
  • Framework detector that reads composer.json to identify the framework
  • Automatic installation via Composer plugin
  • Comprehensive documentation (README, CONTRIBUTING, BRANCHING, UPGRADING, CONFIGURATION)
  • PHPUnit tests with comprehensive test coverage (36 tests covering all code paths)
  • PHP-CS-Fixer configuration (PSR-12)
  • Docker and Makefile setup for development
  • GitHub Actions CI/CD pipeline with code coverage validation
  • .gitignore automatic updates

Features

  • ✅ Works with any PHP project (Symfony, Laravel, Yii, CodeIgniter, etc.)
  • ✅ Works with any Git provider (GitHub, GitLab, Bitbucket, etc.)
  • ✅ Automatic framework detection from composer.json
  • ✅ Framework-specific configuration files
  • ✅ Git Guardian Angel (GGA) for automated code reviews
  • ✅ AI Agents configuration (OpenAI, Anthropic, GitHub Copilot)
  • ✅ Token configuration via .env file
  • ✅ Provider-agnostic design
  • ✅ Configurable via YAML
  • ✅ Automatic documentation installation
  • ✅ Comprehensive test suite with 100% code coverage