Skip to content

v1.5.0

Choose a tag to compare

@dgtlss dgtlss released this 27 Feb 20:22
· 11 commits to main since this release
44a7d37

🚀 Overview

This release focuses on backward compatibility, code quality improvements, enhanced documentation, and developer experience enhancements. Warden now supports Laravel 7 through 11 with graceful handling of different Symfony Console versions.


🔄 Upgrade Guide

No breaking changes! This release is fully backward compatible.

Recommended actions:

  1. Update to v1.5.0: composer update dgtlss/warden
  2. Replace --silent with --no-notify in your scripts (optional, --silent still works)
  3. Review the new Command Reference in the README for all available options

✨ New Features

Security Development Tools

  • Snyk Integration: Added automated security scanning rules for new code
    • New .cursor/rules/snyk_rules.mdc with Snyk code-scan guidance
    • Auto-select organization in VSCode with .vscode/settings.json
    • Updated .gitignore for Snyk-generated files

Enhanced Command Reference

  • Comprehensive CLI Documentation: Added quick-reference table for all commands and options
  • Improved Flag Documentation: Documented --no-notify as the preferred flag over --silent

🔧 Improvements

Backward Compatibility (Laravel 7-10 Support)

  • Multi-Version Console Support: Added runtime check for isSilent() method with graceful fallback
    • Supports Symfony Console 7.2+ (Laravel 11+) via isSilent()
    • Provides safe fallback for older Symfony Console versions (Laravel 7-10)
    • Fixes potential fatal errors on older framework versions
  • Fixed Notification Suppression Logic:
    • Corrected inverted fallback logic in shouldSuppressNotifications()
    • Notifications now work correctly on older Laravel versions by default
    • Only suppress when explicitly requested via --no-notify

Code Quality

  • Rector Refactoring: Applied automated code improvements
    • SimplifyIfReturnBool: Simplified boolean return statements
    • NewlineAfterStatement: Improved code readability
    • RenameParamToMatchType: Better parameter naming
    • NullableCompareToNull: Cleaner null comparisons
  • PHPStan Compliance: Resolved static analysis issues
    • Added appropriate @PHPStan-Ignore comments with explanations
    • Removed unnecessary null checks where type guarantees exist
    • All code now passes PHPStan level checks
  • Interface Contract Adherence:
    • Fixed handleAuditFailure() to use AuditServiceInterface methods directly
    • Removed brittle instanceof checks
    • Better support for custom audit implementations

CI/CD Performance

  • Faster GitHub Actions: Added Composer dependency caching
    • Significantly reduces CI build times
    • Uses actions/cache@v4 with proper cache keys

📚 Documentation

README Improvements

  • Fixed TOC Links: Updated all table of contents anchors to match GitHub's standard slugification
    • Changed from #-configuration to #configuration format
    • All links now properly resolve
  • Corrected Cross-References: Fixed directional references
    • Changed "See Command Reference below" to "above" where appropriate
  • Removed Deprecated Config: Cleaned up documentation
    • Removed WARDEN_OUTPUT_JSON, WARDEN_OUTPUT_JUNIT, WARDEN_SEVERITY_FILTER
    • Removed retry_attempts, retry_delay, severity_filter from examples
  • Added PHP Syntax Audit: Documented WARDEN_PHP_SYNTAX_AUDIT_ENABLED environment variable
  • Updated CI Examples:
    • Examples now use PHP 8.4
    • GitLab CI example uses --no-notify flag
  • Enhanced Custom Audit Examples: Added source field to custom audit documentation

🐛 Bug Fixes

  • WardenServiceProvider: Fixed to use --no-notify instead of legacy option
  • Service Name Handling: Improved fallback for empty/null audit service names
  • Audit Failure Messages: More robust error messaging for all audit service types

🔒 Security

  • Snyk Code Scanning: Automated security analysis for new code
  • Editor Integration: VSCode configured for immediate security feedback
  • Best Practices Enforcement: Security rules applied during development

💻 Developer Experience

  • Better IDE Support: Added VSCode settings for Snyk
  • Code Coverage Artifacts: Added coverage-html/ to .gitignore
  • Cleaner Repository: Improved ignore rules for development tools