From 0164286c1e991550c00cf57a178d03e184b7d07b Mon Sep 17 00:00:00 2001 From: peptiderepo Date: Thu, 23 Apr 2026 02:44:07 +0000 Subject: [PATCH] =?UTF-8?q?chore(release):=20v0.10.1=20=E2=80=94=20tests?= =?UTF-8?q?=20green=20+=20PHPCS=20green?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bump version: 0.10.0 → 0.10.1 Updated CHANGELOG.md with Fixed/Changed entries: - Missing post_type_exists() stub in BaseTestCase - PHPCS autofix of 1,362 violations across 75 files - CI gate flipped to strict mode Updated ARCHITECTURE.md with ADR #20 documenting the test infra and PHPCS compliance improvements. --- ARCHITECTURE.md | 5 +++++ CHANGELOG.md | 17 +++++++++++++++++ prautoblogger.php | 2 +- 3 files changed, 23 insertions(+), 1 deletion(-) 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