v5.0.0
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_hashcolumns 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_rfcolumns during split migration for backward compatibility - Updated user dashboard layer (UserCreator, UserManager, CapabilityManager) for split columns
- Added
identifier_typeparameter to UserCreator for targeted column lookup (CPF vs RF) test_format_csv_row_rf_onlytest 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_rfcolumns across entire plugin with@deprecatedannotations - 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:
emailfield migration (JSON→column extraction, handled at insert since v2.9)cpf_rffield migration (JSON→column extraction, handled at insert since v2.9)auth_codefield migration (JSON→column extraction, handled at insert since v2.9)magic_tokensgeneration (handled at insert since v2.10)encrypt_sensitive_data(100% complete, LGPD compliance)cleanup_unencrypted(100% complete, replaced by daily cron)user_linksubmissions→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_rfmigration remains available for legacy data- Result: 934 tests, 1830 assertions, 0 failures
Fixed
- Added split cpf/rf column support to
decrypt_submissionanddecrypt_appointment - CsvExporterTest updated for split CPF/RF columns (15 fixed headers instead of 14, indices shifted)
- CsvExporter sample_row uses separate
cpf/rffields instead of combinedcpf_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=viewhandler 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 replacedaction=viewwithappointment=Xparameter to avoid WordPressadmin_action_viewdispatch that was causing persistent 500 errors - Changed appointment action URLs from
actiontoffc_actionparameter to avoid conflicts with WordPress admin.php action processing - Corrected confirm/cancel redirect URLs to use
admin.phpinstead ofedit.phpfor consistency with menu registration - Added
class_existsguard aroundFFC_Appointments_List_Tabledefinition 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 byoverflow:hiddenon.ffc-appointments-table
Removed
- Removed legacy
cpf_rfdual-write; optimized split migration to be the single source of truth - Removed
cpf_rf_hashlegacy fallback from UserCreator queries