diff --git a/CHANGELOG.md b/CHANGELOG.md index dc711a8..06e9283 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,16 +9,24 @@ and this project uses [Semantic Versioning](https://semver.org/). ### Fixed +- **Tests: OpenRouterImageProviderTest now round-trips through real Encryption class.** + setUp was using a dead `eval()` mock that never installed because the real `PRAutoBlogger_Encryption` + class was autoloaded first. Tests now call `PRAutoBlogger_Encryption::encrypt()` directly, + leveraging the BaseTestCase-stubbed `wp_salt()` for deterministic round-trip decryption. + Fixes both `test_generate_image_success` and `test_generate_image_4xx_throws`. - **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. +- **PHPCS: backlog fully cleared (1,292 → 0 actionable violations).** + Round 1 autofix via `phpcbf` resolved 1,292 violations across 75 files (mechanically). + Round 3 hand-fixed remaining 137 violations across 81 files: + * 79 class-naming sniffs — added `phpcs:ignore` with justification (architectural debt; short names preferred for readability). + * 56 `$wpdb->prepare()` violations — table names require interpolation (`{$table}`, `{$gen_log}`); `$wpdb->prepare()` does not support table-name placeholders, only values. + * 2 file-level docblock positioning — moved `declare(strict_types=1)` before file docblock in `prautoblogger.php` and `uninstall.php`. + All ignores include inline reason per CTO discipline rules. - **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. diff --git a/prautoblogger.php b/prautoblogger.php index 29c5312..df630b0 100644 --- a/prautoblogger.php +++ b/prautoblogger.php @@ -36,7 +36,7 @@ if ( ! defined( 'ABSPATH' ) ) { | and limits without magic strings. */ -define( 'PRAUTOBLOGGER_VERSION', '0.10.0' ); +define( 'PRAUTOBLOGGER_VERSION', '0.10.1' ); define( 'PRAUTOBLOGGER_DB_VERSION', '1.1.0' ); define( 'PRAUTOBLOGGER_PLUGIN_FILE', __FILE__ ); define( 'PRAUTOBLOGGER_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );