fix(tests): guard error_log/wp_json_encode stubs + document idempotency limitation
- tests/unit/test-migration-0004.php: wrap error_log() stub in function_exists() guard -- prevents PHP fatal redeclaration on PHP Lint (8.1/8.2/8.3) which runs php -l on all .php files. - tests/bootstrap.php: update wp_json_encode stub to accept int $flags = 0 second arg (matches production call signature wp_json_encode($clean, JSON_UNESCAPED_UNICODE)); guard with function_exists(). - class-pr-core-migration-0004-backfill-peptide-meta.php: add code comment near idempotency check documenting the all-or-nothing limitation (post with legitimately empty aliases will re-run). - CONVENTIONS.md: one-line note under migration conventions item 5 documenting the idempotency caveat. - CHANGELOG.md: add Fixed section under v0.6.0 for CI/test-stub fix. Agent-Session: peptide-schema-backfill v0.6.0 P1 fix
This commit is contained in:
@@ -38,6 +38,7 @@ Files live in `includes/` or one level of subdirectory under `includes/`.
|
||||
3. Add the class name to `PR_Core_Migration_Runner::MIGRATIONS` array (index = version - 1).
|
||||
4. Bump `PR_CORE_TARGET_SCHEMA_VERSION` in `peptide-repo-core.php`.
|
||||
5. All migrations must be idempotent (safe to run twice).
|
||||
6. **Idempotency caveat (all-or-nothing skip):** migration 0004's skip guard requires *all* populated keys; a post with legitimately empty aliases will re-run on manual re-invoke — this is safe (write_meta only overwrites with non-empty values) but expected.
|
||||
|
||||
## How To: Add a New REST Endpoint
|
||||
|
||||
|
||||
Reference in New Issue
Block a user