fix: add WordPress status slug field#12
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? |
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 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 |
WHAT changed
slugfield toJOOservices\WordPress\Sdk\Data\Status.WHY changed
The WordPress REST API post-status schema includes
slug, and current SDK status DTOs preserved the status name and flags but dropped the slug value returned by/wp/v2/statusesresponses.HOW implemented
slugafter the existingnameconstructor argument with a default empty string.Statusclass name and all existing fields.PostStatusbecause that would alter the public API.Candidate fields checked
slug: ADD, present in official WordPress REST API post-status schema and missing locally.name,public,protected,private,queryable,show_in_list,date_floating: SKIP_ALREADY_PRESENT.Fields skipped and why
Status->PostStatusrename: SKIP_BREAKING/SKIP_OUTDATED.date_floatingnullable change: SKIP_BREAKING because current DTO defaults to boolean false.Validation
vendor/bin/phpunit tests/Unit/Data/DataModelsTest.php: passed, 11 tests / 44 assertionscomposer validate: passedcomposer lint: passedcomposer test: passed, 179 tests / 615 assertionscomposer security: passed, no advisoriescomposer quality: passedcomposer test:coverage: passed, 97.0% statements, coverage gate passedcomposer test:integration: exited successfully with no tests executed in this local invocationpint --test,phpstan,phpcspassedcomposer auditpassedRisk / impact
Low. This is additive DTO field coverage only. Existing constructor usage such as
new Status('Published')remains compatible.