refactor: consolidate ImageHelper resize paths + drop unused validate() (#104) #117

Merged
jmiller merged 2 commits from fix/imagehelper-consolidate-104 into dev 2026-06-29 17:26:46 +00:00
Owner

Finishes the remaining #104 cleanup (the dead-code/leak parts shipped earlier in PR #111).

  • resize() → thin wrapper over resizeToSize() (which gained a $quality param). This removes ~80 lines of duplicated crop/resample/encode logic. resize(path) and resizeToSize(path, 1200, 630, '') compute the same output hash/path and write the same file, so behavior is unchanged.
  • Removed ImageHelper::validate() — no callers anywhere in source/.

Net −130 / +11 lines, php -l clean. No call-site changes needed (resize()/resizeForPlatform() signatures unchanged).

Closes #104.

🤖 Generated with Claude Code

Finishes the remaining #104 cleanup (the dead-code/leak parts shipped earlier in PR #111). - **`resize()` → thin wrapper** over `resizeToSize()` (which gained a `$quality` param). This removes ~80 lines of duplicated crop/resample/encode logic. `resize(path)` and `resizeToSize(path, 1200, 630, '')` compute the **same** output hash/path and write the same file, so behavior is unchanged. - **Removed `ImageHelper::validate()`** — no callers anywhere in `source/`. Net **−130 / +11** lines, `php -l` clean. No call-site changes needed (`resize()`/`resizeForPlatform()` signatures unchanged). Closes #104. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
jmiller added 2 commits 2026-06-29 17:26:33 +00:00
refactor: consolidate ImageHelper resize paths, drop unused validate() (#104)
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 12s
236baed80d
- resize() is now a thin wrapper over resizeToSize() (added a $quality param),
  removing ~80 lines of duplicated crop/resample/encode logic. resize(path)
  and resizeToSize(path, 1200, 630, '') produce identical output paths/files,
  so behavior is unchanged.
- Removed the unused ImageHelper::validate() method (no callers).

Net: -130/+11 lines. Closes the remaining #104 consolidation items.
chore(version): pre-release bump to 01.07.02-dev [skip ci]
Branch Cleanup / Delete merged branch (pull_request) Successful in 1s
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
3e6c8d685b
jmiller merged commit d6d93bddd9 into dev 2026-06-29 17:26:46 +00:00
jmiller deleted branch fix/imagehelper-consolidate-104 2026-06-29 17:26:46 +00:00
Sign in to join this conversation.
No Reviewers
Priority -
Type -
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoSuiteOpenGraph#117