Skip to content

CF7 to API v2.0.0

Choose a tag to compare

@github-actions github-actions released this 25 Jan 04:28
· 95 commits to main since this release
Immutable release. Only release title and notes can be modified.

Added

  • MVC Architecture: Complete restructuring following Model-View-Controller principles
    • Model Layer: Type-safe domain models (LogEntry, FormSettings, ApiResponse, Statistics)
    • Repository Layer: Data access interfaces (LogRepositoryInterface, SettingsRepositoryInterface)
    • Controller Layer: Request routing and hook management
      • Controller/Admin/LogsController: Admin logs page routing
      • Controller/ContactForm/SubmissionController: Form submission handling
    • Service Layer: Business logic separated from controllers
      • Service/Logging/: LogWriter, LogReader, LogStatistics, RetryManager
      • Service/Security/: EncryptionService, SensitiveDataPatterns
      • Service/ContactForm/SubmissionProcessor: API communication logic
    • View Layer: Reusable partials for maintainability
      • View/Admin/Logs/Partials/: StatisticsPartial, DateFilterPartial, ExportButtonsPartial
      • View/Admin/Settings/Partials/GlobalSettingsPartial
    • Config Layer: Centralized configuration (Config/Settings)
  • Unresolved Errors Filter: New filter to show only errors that haven't been successfully retried
    • "Unresolved" tab in logs table shows errors pending resolution
    • "All Errors" renamed to distinguish from unresolved filter
    • Error resolution counts displayed in filter badges
  • Search by Sender Name/Lastname: Extended search functionality to filter logs by sender name
    • Search now includes name and lastname fields from form submissions
    • Respects anonymization rules: fields marked as sensitive via settings are excluded from search
    • Maintains existing SQL-based search for endpoint and error_message (full dataset)
    • PHP-based filtering for name/lastname applied to the first 5,000 logs in the current sort order; on sites with more than 5,000 logs, name/lastname searches may not include older matches

Changed

  • Visual Resolved Indicator: Errors with successful retries now show a "Resolved" badge
    • Green badge appears next to error status when retry was successful
    • Tooltip explains the error was resolved via manual retry
    • Makes it easy to identify resolved errors at a glance

Developer

  • New Service Classes: Specialized services following Single Responsibility Principle
    • Service\Logging\LogWriter: Log creation, updates, deletion with encryption
    • Service\Logging\LogReader: Log retrieval with decryption
    • Service\Logging\LogStatistics: Statistics and metrics calculations
    • Service\Logging\RetryManager: Retry management and error resolution tracking
    • Service\ContactForm\SubmissionProcessor: Form submission business logic
  • New Model Classes: Type-safe domain models with full PHPStan Level 8 compliance
    • Model\LogEntry: API request log representation
    • Model\FormSettings: Form configuration
    • Model\ApiResponse: API response data
    • Model\Statistics: Aggregated statistics
  • Exception Classes: Custom exceptions for better error handling
    • Exception\ApiException: API-related errors
    • Exception\ValidationException: Validation errors with detailed tracking
  • PSR-4 Namespace Organization: Proper directory structure
    • Service\Security\*: Security-related services
    • Config\Settings: Configuration management
  • Architecture Documentation: See docs/ARCHITECTURE.md for complete structure
  • Migration Guide: See docs/UPGRADE.md for 2.0.0 migration instructions

Notes

  • Quality Gates: PHPCS WordPress-Extra (0 errors) and PHPStan Level 8 (0 errors) compliance
  • All logging functionality migrated to dedicated services in Service\Logging\
  • See docs/UPGRADE.md for migration guidance