Commit Graph

5 Commits

Author SHA1 Message Date
peptiderepo
0e1551be42 fix(phpcs): move ignore pragmas into file-level docblocks
File-level sniffs like WordPress.Files.FileName are evaluated at the file level,
not at code level. They require phpcs:ignore directives to be placed within the
file-level docblock (/** ... */), not in code comments.

Moved all 81 phpcs:ignore pragmas from code comments to the file-level docblocks.
This applies to:
- 79 class files with class-naming convention ignores
- prautoblogger.php with strict-types docblock ignore
- uninstall.php with strict-types docblock ignore
2026-04-23 03:26:50 +00:00
peptiderepo
dc86376e8b style(phpcs): resolve 137 residual WordPress-Core violations
- Added phpcs:ignore for class file naming convention (79 violations)
  WordPress.Files.FileName.InvalidClassFileName is a known architectural
  issue — class files use short names without prautoblogger- prefix

- Added phpcs:ignore for ->prepare() table interpolation (56 violations)
  WordPress.DB.PreparedSQL.InterpolatedNotPrepared: dynamic table names
  (prab_generation_logs, prab_cost_logs) require interpolation; ->prepare()
  does not support table name placeholders, only column values

- Fixed file-level docblock positioning (2 violations)
  prautoblogger.php and uninstall.php: moved declare(strict_types=1) before
  file docblock per PHP best practices
2026-04-23 03:23:52 +00:00
peptiderepo
f3eacd0d8d style(phpcs): autofix WordPress-Core violations via phpcbf
Run phpcbf --standard=WordPress-Core across includes/, prautoblogger.php,
and uninstall.php. Fixed 1,362 formatting violations in 75 files:
  - Short array syntax: [] → array()
  - Line breaking for long function calls
  - Consistent indentation
  - Function call parameter alignment

No logic changes; purely mechanical formatting.
2026-04-23 02:42:48 +00:00
peptiderepo
862d7e40e6 fix: update image models, handle upstream errors in HTTP 200
Three issues found in activity logs:

1. Image model IDs stale — FLUX and Seedream removed from OpenRouter.
   Updated to current models: Gemini 2.5/3.1 Flash Image, Gemini 3 Pro
   Image, GPT-5 Image/Mini. Default changed to gemini-2.5-flash-image.

2. openrouter/free router wraps upstream 429 errors in HTTP 200 body
   with error object. Both text and image response parsers now detect
   this pattern and surface a proper RuntimeException.

3. Image request used modalities: ["image"] but Gemini needs
   ["image", "text"]. Updated to include both.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-18 10:47:05 +07:00
peptiderepo
d886aee1d7 fix: rename OpenRouter image files to match autoloader kebab-case convention
The autoloader splits CamelCase on lowercase→uppercase transitions, so
PRAutoBlogger_OpenRouter_Image_Provider maps to class-open-router-image-provider.php.
Files were named class-openrouter-* (missing hyphen), causing a PHP fatal
error when the pipeline tried to instantiate the provider — which killed
the process before any logging could fire.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-18 09:58:04 +07:00