fix(speakers): validate photo override exists before clearing - #585
Conversation
- SpeakerService::clearSpeakerPhoto/clearSpeakerBigPhoto now throw ValidationException when the speaker has no photo override, instead of silently no-oping. - PresentationSpeaker::getProfilePhotoUrl/getBigProfilePhotoUrl no longer fall back to a Gravatar URL; removed the now-unused getGravatarUrl() helper. - Trailing-whitespace cleanup on unrelated DQL/SQL query strings.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughPresentation speaker photo methods now use resolved or configured default URLs without Gravatar fallback. Photo deletion validates speaker type and photo overrides. Presentation query SQL formatting was normalized without changing query behavior. ChangesSpeaker changes
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The change makes photo clearing reject speakers without an override and removes the Gravatar fallback; no actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
📘 OpenAPI / Swagger preview ➡️ https://OpenStackweb.github.io/summit-api/openapi/pr-585/ This page is automatically updated on each push to this PR. |
ref:
https://app.clickup.com/t/9014802374/86bb6hm53
Summary
SpeakerService::clearSpeakerPhoto/clearSpeakerBigPhotonow throwValidationExceptionwhen the speaker has no photo override, instead of silently no-oping.PresentationSpeaker::getProfilePhotoUrl/getBigProfilePhotoUrlno longer fall back to a Gravatar URL; removed the now-unusedgetGravatarUrl()helper as a result.Test plan
vendor/bin/phpunit tests/Unit/Entities/PresentationSpeakerTest.php tests/SpeakerServiceTest.php— same 4 pre-existing failures with and without this diff (stale DB schema / test fixtures, unrelated to this change).php -lon the modified model file.Summary by CodeRabbit