diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 51a1965..92ed361 100755 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -544,6 +544,11 @@ We already use Cloudflare for DNS/CDN on peptiderepo.com, so layering AI Gateway --- +### #20: PHPUnit test infrastructure + WordPress-Core PHPCS compliance (v0.10.1) + +Tests use Brain\Monkey for WordPress function mocking (no database required). The BaseTestCase singleton handles setup/teardown of Monkey stubs and provides fixture helpers for common data shapes (SourceData, ArticleIdea, GenerationLog, etc.). All WordPress functions used by the plugin are stubbed in BaseTestCase::setUp() so individual test classes only override what they need. In v0.10.1, missing stubs for `post_type_exists()` were added to support PeptideLinker's PR-Core guards. All 1,362 WordPress-Core coding-standards violations (short array syntax, line length, spacing) were auto-fixed via phpcbf and the CI gate was flipped to strict mode — PHPCS failures now block CI. This prevents future regressions on the code style front. + + ## Cross-System LLM Budget Coordination PRAutoBlogger and Peptide News both call OpenRouter and may share a single API key / billing account. Their combined spend should be considered when setting per-plugin budgets. diff --git a/CHANGELOG.md b/CHANGELOG.md index 81e35cc..dc711a8 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,23 @@ All notable changes to PRAutoBlogger will be documented in this file. Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project uses [Semantic Versioning](https://semver.org/). +## [0.10.1] — 2026-04-23 + +### Fixed + +- **Tests: add missing `post_type_exists()` stub to BaseTestCase.** + When PR Core is not active, PeptideLinker guards calls with `post_type_exists()`. + This WordPress function was not mocked in the base test setup, causing 8 PublisherTest errors. + +### Changed + +- **PHPCS: autofix all 1,362 WordPress-Core style violations.** + Ran `phpcbf --standard=WordPress-Core` across 75 files. + Changes include short array syntax (`array()` instead of `[]`), proper line breaking, + and consistent indentation. No logic changes. +- **CI: PHPCS gate now strict.** Changed `continue-on-error: true → false` in `.github/workflows/ci.yml`. + PHPCS failures will now block CI, preventing style regression. + ## [0.10.0] — 2026-04-21 ### Removed diff --git a/prautoblogger.php b/prautoblogger.php index 11f4be3..46cf8f5 100644 --- a/prautoblogger.php +++ b/prautoblogger.php @@ -8,7 +8,7 @@ declare(strict_types=1); * Plugin Name: PRAutoBlogger * Plugin URI: https://peptiderepo.com/prautoblogger * Description: Monitors social media for trending topics, generates SEO-friendly blog posts using AI, and publishes them on a daily schedule with full cost tracking and self-improvement metrics. - * Version: 0.10.0 + * Version: 0.10.1 * Requires at least: 6.0 * Requires PHP: 7.4 * Author: PeptideRepo