Skip to content

ITC Forms 0.15.6Changelog

Extension API migration guide

This guide covers migrations to Extension API 1.x public contracts. Treat a plugin-version upgrade and a saved-data migration as separate operations: ship code that can read both shapes first, migrate in bounded batches second, and remove the old reader only after the documented compatibility window.

Do not replace an internal class with another internal class. Use the generated hook and descriptor reference to select a stable registry, lifecycle action, policy/transformation filter, or semantic UI slot. Database tables, repositories, REST controllers, localized globals, cron names, nonce actions, DOM classes, and compiled bundle modules are not public contracts.

Common replacements are:

Previous integration Current contract
itc_forms_managed_feed_execute itc_forms_feed_providers descriptor with enqueue and processor callbacks
Message text returned from itc_forms_validation_errors Error keys from itc_forms_validation_errors, copy from itc_forms_validation_feedback
Direct form metadata or arbitrary definition keys itc_forms_form_extension_registry and definition.extensions['vendor/name']
Direct entry status writes Workflow state/transition registries or authorized entry actions
Direct queue/repository calls Feed-provider callbacks; core retains claims, locks, retry timing, and terminal states
Admin menu or page-shell internals itc_forms_admin_page_registry and semantic PHP UI slots
Builder DOM manipulation Paired PHP descriptors and itcForms.builder.* JavaScript filters/slot fills

The compatibility entries in the generated reference identify the precise bridge and removal window. An undocumented behavior has no compatibility window even when it happened to work in an older release.

  1. Declare the oldest and newest supported ITC Forms and Extension API versions in the companion plugin and test both.
  2. Register the new descriptor from itc_forms_loaded. Keep the old reader or compatibility callback active, but arrange that only one path performs a mutation or external delivery.
  3. Deploy dual-read/single-write code. New writes use only the registered, normalized shape. Reading the legacy shape must not silently persist it.
  4. Migrate saved records in bounded, resumable, idempotent batches. Re-run core normalization for every record and record only identifiers and bounded error keys—not field values, credentials, tokens, or provider responses.
  5. Verify counts and representative outcomes, then disable the legacy writer.
  6. After the published bridge window and a successful rollback rehearsal, remove the legacy reader in a separate companion-plugin release.

Core authorization, nonce checks, validation, escaping, privacy, feed locking, and public-submission trust rules remain authoritative throughout rollout.

Store extension-owned configuration in a versioned envelope under a registered slash namespace. Increase the descriptor version when its data shape changes and implement migrate for every version you still support. The callback must be deterministic and return JSON-compatible data; normalize and validate run after migration and can still reject the result.

Ship migrations in this order:

  • accept the old and new versions;
  • add a pure old-to-new migration callback;
  • deploy and exercise create, edit, REST save, import, export, duplication, and inactive-extension recovery;
  • migrate stored forms in bounded batches;
  • retain the old-version callback until rollback is no longer supported.

Unknown structurally valid envelopes are deliberately preserved but inert. Never use that recovery behavior as permission to execute unknown data or send it to the browser. Secrets do not belong in browser-writable extension data.

Before migration, take the normal database backup and record the companion and core versions. A rollback-safe migration either preserves the old data until the new release is accepted or provides a tested reverse transform. When a reverse transform would lose information, stop writes during rollback and restore the backup instead of guessing.

External deliveries cannot generally be rolled back. Use stable idempotency keys and let core own feed claims/retries so running old and new application versions cannot send the same delivery twice. Append compensating audit events; never rewrite or delete authoritative history.

Compare the version passed to itc_forms_loaded, not the ITC Forms plugin version. Register only descriptor fields supported by the running API minor and feature-detect additive contracts with has_filter()/did_action() where that is meaningful. Do not infer support from an internal class or method existing.

Keep one normalized internal representation in the companion plugin and small adapters for each supported public contract. Test the oldest and newest supported pair against the executable compatibility fixtures. If a required stable contract is unavailable, show a capability-protected admin notice and leave saved data untouched; do not fall back to internal APIs.

  • The add-on contains no dependency on undocumented core classes, tables, routes, cron identifiers, bundle imports, or DOM selectors.
  • Registry keys are vendor-prefixed/namespaced as required and do not collide with core keys.
  • Invalid descriptors and callback exceptions fail closed.
  • Mutations repeat core capability and CSRF requirements; public submissions remain nonce-free and cache-safe.
  • Diagnostic, browser, audit, and error surfaces contain no secrets or unnecessary personal data.
  • Privacy export, erasure, retention, duplication, portability, and uninstall behavior are explicit and idempotent.
  • Oldest/newest compatibility, package verification, and the focused contract suites pass before removing a bridge.