Skip to content

v5.0.0

Choose a tag to compare

@github-actions github-actions released this 14 Jun 19:38
9742fd9

Multi-identifier architecture: split combined CPF/RF into independent columns, and retirement of 10 completed legacy migrations.

Added

  • Added separate cpf, cpf_encrypted, cpf_hash, rf, rf_encrypted, rf_hash columns to submissions and appointments tables
  • Updated core layer (SubmissionHandler, FormProcessor, Encryption) to read/write split columns natively
  • Updated admin, API, security, and privacy layers for split cpf/rf columns
  • Preserved legacy cpf_rf columns during split migration for backward compatibility
  • Updated user dashboard layer (UserCreator, UserManager, CapabilityManager) for split columns
  • Added identifier_type parameter to UserCreator for targeted column lookup (CPF vs RF)
  • test_format_csv_row_rf_only test case for RF-only submissions
  • Appointment detail view in admin panel with decrypted CPF/RF split fields, calendar info, and custom data

Changed

  • Deprecated legacy cpf_rf columns across entire plugin with @deprecated annotations
  • Identifier digit-count classification targets specific hash column (11→CPF, 7→RF) instead of scanning both
  • Applied digit-count classification to AppointmentRepository findByCpfRf
  • MigrationRegistry, MigrationStatusCalculator, and MigrationManager reduced to single-migration focus
  • Activator run_migrations() — no longer auto-runs retired migrations on activation
  • MigrationManager unit tests adapted to simplified architecture
  • Privacy/LGPD deletion request success message now tells admins where to find it (Tools > Erase Personal Data)
  • 10 completed migrations retired from admin panel — these ran their course and are no longer needed:
    • email field migration (JSON→column extraction, handled at insert since v2.9)
    • cpf_rf field migration (JSON→column extraction, handled at insert since v2.9)
    • auth_code field migration (JSON→column extraction, handled at insert since v2.9)
    • magic_tokens generation (handled at insert since v2.10)
    • encrypt_sensitive_data (100% complete, LGPD compliance)
    • cleanup_unencrypted (100% complete, replaced by daily cron)
    • user_link submissions→users (handled at insert by UserCreator since v3.1)
    • name_normalization (handled at insert by FormProcessor since v4.3)
    • user_capabilities (handled at insert by UserCreator since v4.4)
    • data_cleanup (flag-based, replaced by cron)
    • 7 migration strategy classes (FieldMigration, MagicToken, Encryption, Cleanup, UserLink, NameNormalization, UserCapabilities)
    • 3 legacy migration executor classes (MigrationUserLink, MigrationNameNormalization, MigrationUserCapabilities)
    • split_cpf_rf migration remains available for legacy data
    • Result: 934 tests, 1830 assertions, 0 failures

Fixed

  • Added split cpf/rf column support to decrypt_submission and decrypt_appointment
  • CsvExporterTest updated for split CPF/RF columns (15 fixed headers instead of 14, indices shifted)
  • CsvExporter sample_row uses separate cpf/rf fields instead of combined cpf_rf
  • Added defensive try-catch to MigrationStatusCalculator strategy initialization to prevent 500 errors from stale opcache or DB issues
  • Added try-catch to migrations settings tab view to gracefully handle runtime errors instead of 500
  • Implemented missing action=view handler for appointments admin page (was causing 500 error)
  • Hardened appointments view and render method with try-catch to prevent unhandled 500 errors
  • Rewrote appointment URLs to use absolute paths via admin_url() and replaced action=view with appointment=X parameter to avoid WordPress admin_action_view dispatch that was causing persistent 500 errors
  • Changed appointment action URLs from action to ffc_action parameter to avoid conflicts with WordPress admin.php action processing
  • Corrected confirm/cancel redirect URLs to use admin.php instead of edit.php for consistency with menu registration
  • Added class_exists guard around FFC_Appointments_List_Table definition to prevent class redeclaration errors
  • Added PHP shutdown function error handler to capture fatal errors in appointments page for debug logging
  • Calendar export dropdown (Exportar Calendário) was clipped by overflow:hidden on .ffc-appointments-table

Removed

  • Removed legacy cpf_rf dual-write; optimized split migration to be the single source of truth
  • Removed cpf_rf_hash legacy fallback from UserCreator queries