fix: reconcile WordPress DTO field coverage#11
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe PR extends the WordPress SDK's core data model classes ( ChangesData Model Constructor Extensions
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Pull request overview
This PR expands WordPress REST DTO field coverage so SDK data models preserve additional schema fields instead of dropping them during construction/normalization.
Changes:
- Added additive fields to
Comment,PostType, andTaxonomyDTOs. - Added PHPDoc array shape annotations for the new DTO array fields.
- Updated unit coverage for constructor storage and selected
toArray()normalization.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/Data/Comment.php |
Adds meta field support for comment DTOs. |
src/Data/PostType.php |
Adds additional post type schema fields including description, namespace, labels, supports, and taxonomies. |
src/Data/Taxonomy.php |
Adds taxonomy description, REST namespace, and labels support. |
tests/Unit/Data/DataModelsTest.php |
Covers the new DTO fields and default values. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
WHAT changed
WHY changed
The preserved local backup contained a few useful DTO field coverage improvements mixed into an outdated branch. These fields are valid WordPress REST response fields and current DTOs were dropping them.
HOW implemented
Candidate fields checked
Fields skipped and why
Validation
Risk / impact
Low. Changes are additive DTO field coverage only. Existing constructor fields were not removed, renamed, reordered before current optional arguments, or narrowed.
Summary by CodeRabbit